Skip to content

Latest commit

 

History

History
164 lines (109 loc) · 3.86 KB

ContextApi.md

File metadata and controls

164 lines (109 loc) · 3.86 KB

EasyBlockchainApi.ContextApi

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

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.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);

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

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.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);

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

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.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);

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