All URIs are relative to https://gw.api.cloud.sphereon.com/blockchain/easy/0.10
Method | HTTP request | Description |
---|---|---|
createContext | POST /contexts | Create context |
deleteContext | DELETE /contexts/{context} | Delete context |
getContext | GET /contexts/{context} | Get context |
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.ContextApi();
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
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.ContextApi();
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
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.ContextApi();
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