Service Requester API

Chain

configureChain

Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain

The requester uses this service to configure the requirements for the sidechain and for producers participation


/api/Chain/ConfigureChain

Usage and SDK Samples

curl -X POST "//api/Chain/ConfigureChain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        ContractInformationTable body = ; // ContractInformationTable | The sidechain configuration
        try {
            apiInstance.configureChain(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#configureChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        ContractInformationTable body = ; // ContractInformationTable | The sidechain configuration
        try {
            apiInstance.configureChain(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#configureChain");
            e.printStackTrace();
        }
    }
}
ContractInformationTable *body = ; // The sidechain configuration (optional)

ChainApi *apiInstance = [[ChainApi alloc] init];

// Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain
[apiInstance configureChainWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.configureChain(, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class configureChainExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();
            var body = new ContractInformationTable(); // ContractInformationTable | The sidechain configuration (optional) 

            try
            {
                // Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain
                apiInstance.configureChain(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.configureChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();
$body = ; // ContractInformationTable | The sidechain configuration

try {
    $api_instance->configureChain($body);
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->configureChain: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();
my $body = WWW::SwaggerClient::Object::ContractInformationTable->new(); # ContractInformationTable | The sidechain configuration

eval { 
    $api_instance->configureChain(body => $body);
};
if ([email protected]) {
    warn "Exception when calling ChainApi->configureChain: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()
body =  # ContractInformationTable | The sidechain configuration (optional)

try: 
    # Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain
    api_instance.configure_chain(body=body)
except ApiException as e:
    print("Exception when calling ChainApi->configureChain: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Chain configured with success

Status: 400 - Configuration parameters invalid

Status: 500 - Error configurating the chain


endChain

Sends a transaction to the BlockBase Operations Contract to terminate the sidechain

The requester uses this service to terminate a given sidechain


/api/Chain/EndChain

Usage and SDK Samples

curl -X POST "//api/Chain/EndChain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChain");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Sends a transaction to the BlockBase Operations Contract to terminate the sidechain
[apiInstance endChainWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.endChain(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class endChainExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Sends a transaction to the BlockBase Operations Contract to terminate the sidechain
                apiInstance.endChain();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.endChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->endChain();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->endChain: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->endChain();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->endChain: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Sends a transaction to the BlockBase Operations Contract to terminate the sidechain
    api_instance.end_chain()
except ApiException as e:
    print("Exception when calling ChainApi->endChain: %s\n" % e)

Parameters

Responses

Status: 200 - Chain terminated with success

Status: 500 - Error terminating the chain


endChainMaintenance

Terminates the sidechain maintenance

The requester uses this service to end the maintenance of the sidechain


/api/Chain/EndChainMaintenance

Usage and SDK Samples

curl -X POST "//api/Chain/EndChainMaintenance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChainMaintenance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChainMaintenance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChainMaintenance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChainMaintenance");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Terminates the sidechain maintenance
[apiInstance endChainMaintenanceWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.endChainMaintenance(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class endChainMaintenanceExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Terminates the sidechain maintenance
                apiInstance.endChainMaintenance();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.endChainMaintenance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->endChainMaintenance();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->endChainMaintenance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->endChainMaintenance();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->endChainMaintenance: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Terminates the sidechain maintenance
    api_instance.end_chain_maintenance()
except ApiException as e:
    print("Exception when calling ChainApi->endChainMaintenance: %s\n" % e)

Parameters

Responses

Status: 200 - Chain maintenance terminated with success

Status: 500 - Error terminating the chain maintenance


getBlock

Gets the block of a given sidechain

Gets the block object requested


/api/Chain/GetBlock

Usage and SDK Samples

curl -X GET "//api/Chain/GetBlock?chainName=&blockNumber="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        String chainName = chainName_example; // String | Name of the Sidechain
        Long blockNumber = 789; // Long | Number of the block
        try {
            apiInstance.getBlock(chainName, blockNumber);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#getBlock");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        String chainName = chainName_example; // String | Name of the Sidechain
        Long blockNumber = 789; // Long | Number of the block
        try {
            apiInstance.getBlock(chainName, blockNumber);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#getBlock");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the Sidechain (optional)
Long *blockNumber = 789; // Number of the block (optional)

ChainApi *apiInstance = [[ChainApi alloc] init];

// Gets the block of a given sidechain
[apiInstance getBlockWith:chainName
    blockNumber:blockNumber
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var opts = { 
  'chainName': chainName_example, // {{String}} Name of the Sidechain
  'blockNumber': 789 // {{Long}} Number of the block
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getBlock(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBlockExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();
            var chainName = chainName_example;  // String | Name of the Sidechain (optional) 
            var blockNumber = 789;  // Long | Number of the block (optional) 

            try
            {
                // Gets the block of a given sidechain
                apiInstance.getBlock(chainName, blockNumber);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.getBlock: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();
$chainName = chainName_example; // String | Name of the Sidechain
$blockNumber = 789; // Long | Number of the block

try {
    $api_instance->getBlock($chainName, $blockNumber);
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->getBlock: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();
my $chainName = chainName_example; # String | Name of the Sidechain
my $blockNumber = 789; # Long | Number of the block

eval { 
    $api_instance->getBlock(chainName => $chainName, blockNumber => $blockNumber);
};
if ([email protected]) {
    warn "Exception when calling ChainApi->getBlock: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()
chainName = chainName_example # String | Name of the Sidechain (optional)
blockNumber = 789 # Long | Number of the block (optional)

try: 
    # Gets the block of a given sidechain
    api_instance.get_block(chainName=chainName, blockNumber=blockNumber)
except ApiException as e:
    print("Exception when calling ChainApi->getBlock: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the Sidechain
blockNumber
Long (int64)
Number of the block

Responses

Status: 200 - Block retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving the block


getLooseTransactions

Gets the loose transactions a given sidechain

Gets all the loose transactions saved to be included in the specified sidechain


/api/Chain/GetLooseTransactions

Usage and SDK Samples

curl -X GET "//api/Chain/GetLooseTransactions?chainName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        String chainName = chainName_example; // String | Name of the Sidechain
        try {
            apiInstance.getLooseTransactions(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#getLooseTransactions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        String chainName = chainName_example; // String | Name of the Sidechain
        try {
            apiInstance.getLooseTransactions(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#getLooseTransactions");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the Sidechain (optional)

ChainApi *apiInstance = [[ChainApi alloc] init];

// Gets the loose transactions a given sidechain
[apiInstance getLooseTransactionsWith:chainName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var opts = { 
  'chainName': chainName_example // {{String}} Name of the Sidechain
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getLooseTransactions(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLooseTransactionsExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();
            var chainName = chainName_example;  // String | Name of the Sidechain (optional) 

            try
            {
                // Gets the loose transactions a given sidechain
                apiInstance.getLooseTransactions(chainName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.getLooseTransactions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();
$chainName = chainName_example; // String | Name of the Sidechain

try {
    $api_instance->getLooseTransactions($chainName);
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->getLooseTransactions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();
my $chainName = chainName_example; # String | Name of the Sidechain

eval { 
    $api_instance->getLooseTransactions(chainName => $chainName);
};
if ([email protected]) {
    warn "Exception when calling ChainApi->getLooseTransactions: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()
chainName = chainName_example # String | Name of the Sidechain (optional)

try: 
    # Gets the loose transactions a given sidechain
    api_instance.get_loose_transactions(chainName=chainName)
except ApiException as e:
    print("Exception when calling ChainApi->getLooseTransactions: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the Sidechain

Responses

Status: 200 - Transactions retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving transactions


getTransaction

Gets the transaction of a given sidechain

Gets the transaction object requested


/api/Chain/GetTransaction

Usage and SDK Samples

curl -X GET "//api/Chain/GetTransaction?chainName=&transactionNumber="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        String chainName = chainName_example; // String | Name of the Sidechain
        Long transactionNumber = 789; // Long | Number of the transaction
        try {
            apiInstance.getTransaction(chainName, transactionNumber);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#getTransaction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        String chainName = chainName_example; // String | Name of the Sidechain
        Long transactionNumber = 789; // Long | Number of the transaction
        try {
            apiInstance.getTransaction(chainName, transactionNumber);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#getTransaction");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the Sidechain (optional)
Long *transactionNumber = 789; // Number of the transaction (optional)

ChainApi *apiInstance = [[ChainApi alloc] init];

// Gets the transaction of a given sidechain
[apiInstance getTransactionWith:chainName
    transactionNumber:transactionNumber
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var opts = { 
  'chainName': chainName_example, // {{String}} Name of the Sidechain
  'transactionNumber': 789 // {{Long}} Number of the transaction
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getTransaction(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTransactionExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();
            var chainName = chainName_example;  // String | Name of the Sidechain (optional) 
            var transactionNumber = 789;  // Long | Number of the transaction (optional) 

            try
            {
                // Gets the transaction of a given sidechain
                apiInstance.getTransaction(chainName, transactionNumber);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.getTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();
$chainName = chainName_example; // String | Name of the Sidechain
$transactionNumber = 789; // Long | Number of the transaction

try {
    $api_instance->getTransaction($chainName, $transactionNumber);
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->getTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();
my $chainName = chainName_example; # String | Name of the Sidechain
my $transactionNumber = 789; # Long | Number of the transaction

eval { 
    $api_instance->getTransaction(chainName => $chainName, transactionNumber => $transactionNumber);
};
if ([email protected]) {
    warn "Exception when calling ChainApi->getTransaction: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()
chainName = chainName_example # String | Name of the Sidechain (optional)
transactionNumber = 789 # Long | Number of the transaction (optional)

try: 
    # Gets the transaction of a given sidechain
    api_instance.get_transaction(chainName=chainName, transactionNumber=transactionNumber)
except ApiException as e:
    print("Exception when calling ChainApi->getTransaction: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the Sidechain
transactionNumber
Long (int64)
Number of the transaction

Responses

Status: 200 - Transaction retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving the block


startChain

Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration

The requester uses this service to request a new sidechain for storing his databases


/api/Chain/StartChain

Usage and SDK Samples

curl -X POST "//api/Chain/StartChain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChain");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration
[apiInstance startChainWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.startChain(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class startChainExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration
                apiInstance.startChain();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.startChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->startChain();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->startChain: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->startChain();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->startChain: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration
    api_instance.start_chain()
except ApiException as e:
    print("Exception when calling ChainApi->startChain: %s\n" % e)

Parameters

Responses

Status: 200 - Chain started with success

Status: 500 - Error starting chain


startChainMaintenance

Starts the maintenance of the sidechain

The requester uses this service to start the maintenance of the sidechain


/api/Chain/StartChainMaintenance

Usage and SDK Samples

curl -X POST "//api/Chain/StartChainMaintenance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChainMaintenance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChainMaintenance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChainMaintenance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChainMaintenance");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Starts the maintenance of the sidechain
[apiInstance startChainMaintenanceWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.startChainMaintenance(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class startChainMaintenanceExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Starts the maintenance of the sidechain
                apiInstance.startChainMaintenance();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.startChainMaintenance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->startChainMaintenance();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->startChainMaintenance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->startChainMaintenance();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->startChainMaintenance: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Starts the maintenance of the sidechain
    api_instance.start_chain_maintenance()
except ApiException as e:
    print("Exception when calling ChainApi->startChainMaintenance: %s\n" % e)

Parameters

Responses

Status: 200 - Chain maintenance started with success

Status: 500 - Error starting the maintenance of the chain


Query

executeQuery

Sends query to be executed

The requester uses this service to create databases, update them and delete them


/api/Query/ExecuteQuery

Usage and SDK Samples

curl -X POST "//api/Query/ExecuteQuery"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryApi;

import java.io.File;
import java.util.*;

public class QueryApiExample {

    public static void main(String[] args) {
        
        QueryApi apiInstance = new QueryApi();
        String body = ; // String | The query to execute
        try {
            apiInstance.executeQuery(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#executeQuery");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryApi;

public class QueryApiExample {

    public static void main(String[] args) {
        QueryApi apiInstance = new QueryApi();
        String body = ; // String | The query to execute
        try {
            apiInstance.executeQuery(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#executeQuery");
            e.printStackTrace();
        }
    }
}
String *body = ; // The query to execute (optional)

QueryApi *apiInstance = [[QueryApi alloc] init];

// Sends query to be executed
[apiInstance executeQueryWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.QueryApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.executeQuery(, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class executeQueryExample
    {
        public void main()
        {

            var apiInstance = new QueryApi();
            var body = new String(); // String | The query to execute (optional) 

            try
            {
                // Sends query to be executed
                apiInstance.executeQuery(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryApi.executeQuery: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiQueryApi();
$body = ; // String | The query to execute

try {
    $api_instance->executeQuery($body);
} catch (Exception $e) {
    echo 'Exception when calling QueryApi->executeQuery: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QueryApi;

my $api_instance = WWW::SwaggerClient::QueryApi->new();
my $body = WWW::SwaggerClient::Object::String->new(); # String | The query to execute

eval { 
    $api_instance->executeQuery(body => $body);
};
if ([email protected]) {
    warn "Exception when calling QueryApi->executeQuery: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.QueryApi()
body =  # String | The query to execute (optional)

try: 
    # Sends query to be executed
    api_instance.execute_query(body=body)
except ApiException as e:
    print("Exception when calling QueryApi->executeQuery: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Query executed with success

Status: 400 - Query invalid

Status: 500 - Error executing query


getAllTableValues

Sends a query to get all the values from a certain table in a certain database

The requester uses this service to see all values encrypted or not from a certain table


/api/Query/GetAllTableValues

Usage and SDK Samples

curl -X POST "//api/Query/GetAllTableValues"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryApi;

import java.io.File;
import java.util.*;

public class QueryApiExample {

    public static void main(String[] args) {
        
        QueryApi apiInstance = new QueryApi();
        SidebarQueryInfo body = ; // SidebarQueryInfo | 
        try {
            apiInstance.getAllTableValues(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#getAllTableValues");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryApi;

public class QueryApiExample {

    public static void main(String[] args) {
        QueryApi apiInstance = new QueryApi();
        SidebarQueryInfo body = ; // SidebarQueryInfo | 
        try {
            apiInstance.getAllTableValues(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#getAllTableValues");
            e.printStackTrace();
        }
    }
}
SidebarQueryInfo *body = ; //  (optional)

QueryApi *apiInstance = [[QueryApi alloc] init];

// Sends a query to get all the values from a certain table in a certain database
[apiInstance getAllTableValuesWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.QueryApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getAllTableValues(, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAllTableValuesExample
    {
        public void main()
        {

            var apiInstance = new QueryApi();
            var body = new SidebarQueryInfo(); // SidebarQueryInfo |  (optional) 

            try
            {
                // Sends a query to get all the values from a certain table in a certain database
                apiInstance.getAllTableValues(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryApi.getAllTableValues: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiQueryApi();
$body = ; // SidebarQueryInfo | 

try {
    $api_instance->getAllTableValues($body);
} catch (Exception $e) {
    echo 'Exception when calling QueryApi->getAllTableValues: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QueryApi;

my $api_instance = WWW::SwaggerClient::QueryApi->new();
my $body = WWW::SwaggerClient::Object::SidebarQueryInfo->new(); # SidebarQueryInfo | 

eval { 
    $api_instance->getAllTableValues(body => $body);
};
if ([email protected]) {
    warn "Exception when calling QueryApi->getAllTableValues: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.QueryApi()
body =  # SidebarQueryInfo |  (optional)

try: 
    # Sends a query to get all the values from a certain table in a certain database
    api_instance.get_all_table_values(body=body)
except ApiException as e:
    print("Exception when calling QueryApi->getAllTableValues: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Query executed with success

Status: 400 - Query invalid

Status: 500 - Error executing query


getStructure

Asks for databases, tables and columns structure

The requester uses this service to know databases structure


/api/Query/GetStructure

Usage and SDK Samples

curl -X GET "//api/Query/GetStructure"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryApi;

import java.io.File;
import java.util.*;

public class QueryApiExample {

    public static void main(String[] args) {
        
        QueryApi apiInstance = new QueryApi();
        try {
            apiInstance.getStructure();
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#getStructure");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryApi;

public class QueryApiExample {

    public static void main(String[] args) {
        QueryApi apiInstance = new QueryApi();
        try {
            apiInstance.getStructure();
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#getStructure");
            e.printStackTrace();
        }
    }
}

QueryApi *apiInstance = [[QueryApi alloc] init];

// Asks for databases, tables and columns structure
[apiInstance getStructureWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.QueryApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getStructure(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStructureExample
    {
        public void main()
        {

            var apiInstance = new QueryApi();

            try
            {
                // Asks for databases, tables and columns structure
                apiInstance.getStructure();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryApi.getStructure: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiQueryApi();

try {
    $api_instance->getStructure();
} catch (Exception $e) {
    echo 'Exception when calling QueryApi->getStructure: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QueryApi;

my $api_instance = WWW::SwaggerClient::QueryApi->new();

eval { 
    $api_instance->getStructure();
};
if ([email protected]) {
    warn "Exception when calling QueryApi->getStructure: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.QueryApi()

try: 
    # Asks for databases, tables and columns structure
    api_instance.get_structure()
except ApiException as e:
    print("Exception when calling QueryApi->getStructure: %s\n" % e)

Parameters

Responses

Status: 200 - Structure retrieved with success

Status: 400 - Invalid request

Status: 500 - Error getting structure information