Skip to content

Latest commit

 

History

History
1266 lines (866 loc) · 35.7 KB

AllApi.md

File metadata and controls

1266 lines (866 loc) · 35.7 KB

EasyBlockchainApi.AllApi

All URIs are relative to https://gw.api.cloud.sphereon.com/blockchain/easy/0.10

Method HTTP request Description
chainIdExists GET /{context}/chains/id/{chainId} Determine chain id exists
createBackend POST /backends Create a new backend
createChain POST /{context}/chains Create a new chain
createContext POST /contexts Create context
createEntry POST /{context}/chains/{chainId}/entries Create a new entry in the provided chain
deleteBackend DELETE /backends/{backendId} Delete a backend
deleteContext DELETE /contexts/{context} Delete context
determineChainId POST /{context}/chains/id Predetermine id of chain
determineEntryId POST /{context}/chains/id/{chainId}/entries Predetermine id of an entry
entryById GET /{context}/chains/{chainId}/entries/{entryId} Get an existing entry in the provided chain
entryByRequest POST /{context}/chains/{chainId}/entries/entry Get an existing entry in the provided chain
entryIdExists GET /{context}/chains/id/{chainId}/entries/{entryId} Determine entry id exists
findBackends GET /backends/{backendId}/find Find backends
firstEntry GET /{context}/chains/{chainId}/entries/first Get the first entry in the provided chain
getBackend GET /backends/{backendId} Get backend by id
getContext GET /contexts/{context} Get context
lastEntry GET /{context}/chains/{chainId}/entries/last Get the last entry in the provided chain.
listBackends GET /backends List backends
nextEntryById GET /{context}/chains/{chainId}/entries/{entryId}/next Get the entry after the supplied entry Id (the next) in the provided chain
nextEntryByRequest POST /{context}/chains/{chainId}/entries/entry/next Get the entry after the supplied entry Id (the next) in the provided chain
previousEntryById GET /{context}/chains/{chainId}/entries/{entryId}/previous Get the entry before the supplied entry Id (the previous) in the provided chain
previousEntryByRequest POST /{context}/chains/{chainId}/entries/entry/previous Get the entry before the supplied entry Id (the previous) in the provided chain

chainIdExists

IdResponse chainIdExists(context, chainId)

Determine chain id exists

Determine whether the Id of a chain exists in the blockchain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.chainIdExists(context, chainId, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId

Return type

IdResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

createBackend

Backend createBackend(backend)

Create a new backend

Create a new backend. A Backend is the link to one blockchain implementation and it' s nodes. Unless you create your own private blockchain network, you should not have to create a new backend. Just use one of the public backends available.

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var backend = new EasyBlockchainApi.Backend(); // Backend | backend


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createBackend(backend, callback);

Parameters

Name Type Description Notes
backend Backend backend

Return type

Backend

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/json;charset=UTF-8

createChain

CommittedChainResponse createChain(context, chain)

Create a new chain

Create a new chain. Create a new chain. You can regard a chain as a blockchain within a blockchain, All entries in a chain are linked and relies on data from previous entries in the chain.

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chain = new EasyBlockchainApi.Chain(); // Chain | Create a chain using the first entry supplied. The entry needs at least a (combination of) globaly unique external Id in the complete Blockchain network!


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createChain(context, chain, callback);

Parameters

Name Type Description Notes
context String context
chain Chain Create a chain using the first entry supplied. The entry needs at least a (combination of) globaly unique external Id in the complete Blockchain network!

Return type

CommittedChainResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/json;charset=UTF-8

createContext

Context createContext(context)

Create context

Create a new context

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = new EasyBlockchainApi.Context(); // Context | context


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createContext(context, callback);

Parameters

Name Type Description Notes
context Context context

Return type

Context

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/json;charset=UTF-8

createEntry

CommittedEntryResponse createEntry(context, chainId, entry, opts)

Create a new entry in the provided chain

Create a new entry in the provided chain. The entry will be linked to the previous entry. If the entry already exists, the API will add an anchor time, since the entry Id would be the same as the previously registered entry

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entry = new EasyBlockchainApi.Entry(); // Entry | Create a new entry for the specified chain

var opts = { 
  'currentAnchorTime': new Date("2013-10-20T19:20:30+01:00") // Date | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createEntry(context, chainId, entry, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entry Entry Create a new entry for the specified chain
currentAnchorTime Date [optional]

Return type

CommittedEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/json;charset=UTF-8

deleteBackend

Backend deleteBackend(backendId)

Delete a backend

Delete backend by id (not by name)

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var backendId = "backendId_example"; // String | backendId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteBackend(backendId, callback);

Parameters

Name Type Description Notes
backendId String backendId

Return type

Backend

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: /

deleteContext

Context deleteContext(context)

Delete context

Delete an existing context

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteContext(context, callback);

Parameters

Name Type Description Notes
context String context

Return type

Context

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

determineChainId

IdResponse determineChainId(context, chain, opts)

Predetermine id of chain

Pre determine the Id of a chain without anchoring it in the blockchain. You determine the Id that the chain would receive once it would have been anchored

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chain = new EasyBlockchainApi.Chain(); // Chain | Determine a chain hash. The entry needs at least a (combination of) globally unique external Id in the complete Blockchain network!

var opts = { 
  'checkExistence': false // Boolean | Check whether the id exists
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.determineChainId(context, chain, opts, callback);

Parameters

Name Type Description Notes
context String context
chain Chain Determine a chain hash. The entry needs at least a (combination of) globally unique external Id in the complete Blockchain network!
checkExistence Boolean Check whether the id exists [optional] [default to false]

Return type

IdResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/json;charset=UTF-8

determineEntryId

IdResponse determineEntryId(context, chainId, entry, opts)

Predetermine id of an entry

Pre determine the Id of an entry request without anchoring the entry

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entry = new EasyBlockchainApi.Entry(); // Entry | The entry to determine the hash for on the specified chain

var opts = { 
  'checkExistence': false // Boolean | Check whether the id exists
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.determineEntryId(context, chainId, entry, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entry Entry The entry to determine the hash for on the specified chain
checkExistence Boolean Check whether the id exists [optional] [default to false]

Return type

IdResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/json;charset=UTF-8

entryById

AnchoredEntryResponse entryById(context, chainId, entryId, opts)

Get an existing entry in the provided chain

Get an existing entry in the provided chain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entryId = "entryId_example"; // String | entryId

var opts = { 
  'currentAnchorTime': new Date("2013-10-20T19:20:30+01:00") // Date | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.entryById(context, chainId, entryId, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entryId String entryId
currentAnchorTime Date [optional]

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

entryByRequest

AnchoredEntryResponse entryByRequest(context, chainId, entry, opts)

Get an existing entry in the provided chain

Get an existing entry in the provided chain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entry = new EasyBlockchainApi.Entry(); // Entry | Retrieve the entry

var opts = { 
  'currentAnchorTime': new Date("2013-10-20T19:20:30+01:00") // Date | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.entryByRequest(context, chainId, entry, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entry Entry Retrieve the entry
currentAnchorTime Date [optional]

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

entryIdExists

IdResponse entryIdExists(context, chainId, entryId)

Determine entry id exists

Determine whether the Id of an entry exists in the blockchain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entryId = "entryId_example"; // String | entryId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.entryIdExists(context, chainId, entryId, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entryId String entryId

Return type

IdResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

findBackends

[Backend] findBackends(backendId, opts)

Find backends

Find existing backend(s) by id (single result) and/or name (multiple results). Optionally including public backends of others. Please note that we never return sensitive information like password or rpc hosts. Even not for backend owners themselves

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var backendId = "backendId_example"; // String | backendId

var opts = { 
  'includePublic': false // Boolean | includePublic
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.findBackends(backendId, opts, callback);

Parameters

Name Type Description Notes
backendId String backendId
includePublic Boolean includePublic [optional] [default to false]

Return type

[Backend]

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

firstEntry

AnchoredEntryResponse firstEntry(context, chainId)

Get the first entry in the provided chain

Get the first entry in the provided chain. This is the oldest entry also called the chain tail. Please note that the achorTimes will only contain the first anchor time. Call getEntry to retrieve all times

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.firstEntry(context, chainId, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

getBackend

Backend getBackend(backendId, opts)

Get backend by id

Get existing backend by id (not by name). Optionally including public backend of others. Please note that we never return sensitive information like password or rpc hosts. Even not for backend owners themselves

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var backendId = "backendId_example"; // String | backendId

var opts = { 
  'includePublic': false // Boolean | includePublic
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getBackend(backendId, opts, callback);

Parameters

Name Type Description Notes
backendId String backendId
includePublic Boolean includePublic [optional] [default to false]

Return type

Backend

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

getContext

Context getContext(context)

Get context

Get an existing context

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getContext(context, callback);

Parameters

Name Type Description Notes
context String context

Return type

Context

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

lastEntry

AnchoredEntryResponse lastEntry(context, chainId)

Get the last entry in the provided chain.

Get the last entry in the provided chain. This is the most recent entry also called the chain head. Please note that the achorTimes will only contain the latest anchor time. Call getEntry to retrieve all times

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.lastEntry(context, chainId, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

listBackends

[Backend] listBackends(opts)

List backends

List existing backends. Optionally including public backends of others. Please note that we never return sensitive information like password or rpc hosts. Even not for backend owners themselves

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var opts = { 
  'includePublic': false // Boolean | includePublic
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listBackends(opts, callback);

Parameters

Name Type Description Notes
includePublic Boolean includePublic [optional] [default to false]

Return type

[Backend]

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

nextEntryById

AnchoredEntryResponse nextEntryById(context, chainId, entryId, opts)

Get the entry after the supplied entry Id (the next) in the provided chain

Get the entry after the supplied entry Id (the next) in the provided chain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entryId = "entryId_example"; // String | entryId

var opts = { 
  'currentAnchorTime': new Date("2013-10-20T19:20:30+01:00") // Date | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.nextEntryById(context, chainId, entryId, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entryId String entryId
currentAnchorTime Date [optional]

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

nextEntryByRequest

AnchoredEntryResponse nextEntryByRequest(context, chainId, entry, opts)

Get the entry after the supplied entry Id (the next) in the provided chain

Get the entry after the supplied entry Id (the next) in the provided chain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entry = new EasyBlockchainApi.Entry(); // Entry | Retrieve the entry

var opts = { 
  'currentAnchorTime': new Date("2013-10-20T19:20:30+01:00") // Date | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.nextEntryByRequest(context, chainId, entry, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entry Entry Retrieve the entry
currentAnchorTime Date [optional]

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

previousEntryById

AnchoredEntryResponse previousEntryById(context, chainId, entryId, opts)

Get the entry before the supplied entry Id (the previous) in the provided chain

Get the entry before the supplied entry Id (the previous) in the provided chain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entryId = "entryId_example"; // String | entryId

var opts = { 
  'currentAnchorTime': new Date("2013-10-20T19:20:30+01:00") // Date | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.previousEntryById(context, chainId, entryId, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entryId String entryId
currentAnchorTime Date [optional]

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

previousEntryByRequest

AnchoredEntryResponse previousEntryByRequest(context, chainId, entry, opts)

Get the entry before the supplied entry Id (the previous) in the provided chain

Get the entry before the supplied entry Id (the previous) in the provided chain

Example

var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new EasyBlockchainApi.AllApi();

var context = "context_example"; // String | context

var chainId = "chainId_example"; // String | chainId

var entry = new EasyBlockchainApi.Entry(); // Entry | Retrieve the entry

var opts = { 
  'currentAnchorTime': new Date("2013-10-20T19:20:30+01:00") // Date | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.previousEntryByRequest(context, chainId, entry, opts, callback);

Parameters

Name Type Description Notes
context String context
chainId String chainId
entry Entry Retrieve the entry
currentAnchorTime Date [optional]

Return type

AnchoredEntryResponse

Authorization

oauth2schema

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8