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 |
IdResponse chainIdExists(context, chainId)
Determine chain id exists
Determine whether the Id of a chain exists in the blockchain
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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.
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);
Name | Type | Description | Notes |
---|---|---|---|
backend | Backend | backend |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
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.
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);
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! |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
Context createContext(context)
Create context
Create a new context
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);
Name | Type | Description | Notes |
---|---|---|---|
context | Context | context |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entry | Entry | Create a new entry for the specified chain | |
currentAnchorTime | Date | [optional] |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
Backend deleteBackend(backendId)
Delete a backend
Delete backend by id (not by name)
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);
Name | Type | Description | Notes |
---|---|---|---|
backendId | String | backendId |
- Content-Type: application/json
- Accept: /
Context deleteContext(context)
Delete context
Delete an existing context
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
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] |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
IdResponse determineEntryId(context, chainId, entry, opts)
Predetermine id of an entry
Pre determine the Id of an entry request without anchoring the entry
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);
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] |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
AnchoredEntryResponse entryById(context, chainId, entryId, opts)
Get an existing entry in the provided chain
Get an existing entry in the provided chain
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entryId | String | entryId | |
currentAnchorTime | Date | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
AnchoredEntryResponse entryByRequest(context, chainId, entry, opts)
Get an existing entry in the provided chain
Get an existing entry in the provided chain
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entry | Entry | Retrieve the entry | |
currentAnchorTime | Date | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
IdResponse entryIdExists(context, chainId, entryId)
Determine entry id exists
Determine whether the Id of an entry exists in the blockchain
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entryId | String | entryId |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[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
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);
Name | Type | Description | Notes |
---|---|---|---|
backendId | String | backendId | |
includePublic | Boolean | includePublic | [optional] [default to false] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
backendId | String | backendId | |
includePublic | Boolean | includePublic | [optional] [default to false] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
Context getContext(context)
Get context
Get an existing context
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[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
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);
Name | Type | Description | Notes |
---|---|---|---|
includePublic | Boolean | includePublic | [optional] [default to false] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entryId | String | entryId | |
currentAnchorTime | Date | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entry | Entry | Retrieve the entry | |
currentAnchorTime | Date | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entryId | String | entryId | |
currentAnchorTime | Date | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
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
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);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entry | Entry | Retrieve the entry | |
currentAnchorTime | Date | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8