All URIs are relative to https://gw.api.cloud.sphereon.com/blockchain/easy/0.10
| Method | HTTP request | Description |
|---|---|---|
| createEntry | POST /{context}/chains/{chainId}/entries | Create a new entry in the provided chain |
| 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 |
| firstEntry | GET /{context}/chains/{chainId}/entries/first | Get the first entry in the provided chain |
| lastEntry | GET /{context}/chains/{chainId}/entries/last | Get the last entry in the provided chain. |
| 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 |
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.EntryApi();
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
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.EntryApi();
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.EntryApi();
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
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.EntryApi();
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
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.EntryApi();
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
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.EntryApi();
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.EntryApi();
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.EntryApi();
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.EntryApi();
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