Code Contract - Smartcheck API

Login

userLogin

Genera un token JWT


/login

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;

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

public class LoginApiExample {

    public static void main(String[] args) {
        
        LoginApi apiInstance = new LoginApi();
        UserLogin body = ; // UserLogin | Email y contraseña para acceder
        try {
            userToken result = apiInstance.userLogin(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#userLogin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginApi;

public class LoginApiExample {

    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        UserLogin body = ; // UserLogin | Email y contraseña para acceder
        try {
            userToken result = apiInstance.userLogin(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#userLogin");
            e.printStackTrace();
        }
    }
}
UserLogin *body = ; // Email y contraseña para acceder

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

// Genera un token JWT
[apiInstance userLoginWith:body
              completionHandler: ^(userToken output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeContractSmartcheckApi = require('code_contract___smartcheck_api');

var api = new CodeContractSmartcheckApi.LoginApi()
var body = ; // {{UserLogin}} Email y contraseña para acceder

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

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

            var apiInstance = new LoginApi();
            var body = new UserLogin(); // UserLogin | Email y contraseña para acceder

            try
            {
                // Genera un token JWT
                userToken result = apiInstance.userLogin(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.userLogin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLoginApi();
$body = ; // UserLogin | Email y contraseña para acceder

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

my $api_instance = WWW::SwaggerClient::LoginApi->new();
my $body = WWW::SwaggerClient::Object::UserLogin->new(); # UserLogin | Email y contraseña para acceder

eval { 
    my $result = $api_instance->userLogin(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoginApi->userLogin: $@\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.LoginApi()
body =  # UserLogin | Email y contraseña para acceder

try: 
    # Genera un token JWT
    api_response = api_instance.user_login(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->userLogin: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Token válido

Status: 401 - Usuario no autorizado


Smartcheck

smartCheckCreateTree

Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash

Un Árbol Merkle es una compresión de códigos Hash que al ser combinados por pares dan como resultado un sólo código llamado Merkle Root o Raíz Merkle que representa al conjunto.


/smart-check/create-tree

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/smart-check/create-tree"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SmartcheckApi;

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

public class SmartcheckApiExample {

    public static void main(String[] args) {
        
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckSmartCheckCreateTree body = ; // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.
        try {
            merkleRoot result = apiInstance.smartCheckCreateTree(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckCreateTree");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SmartcheckApi;

public class SmartcheckApiExample {

    public static void main(String[] args) {
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckSmartCheckCreateTree body = ; // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.
        try {
            merkleRoot result = apiInstance.smartCheckCreateTree(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckCreateTree");
            e.printStackTrace();
        }
    }
}
SmartCheckSmartCheckCreateTree *body = ; // Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

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

// Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash
[apiInstance smartCheckCreateTreeWith:body
              completionHandler: ^(merkleRoot output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeContractSmartcheckApi = require('code_contract___smartcheck_api');

var api = new CodeContractSmartcheckApi.SmartcheckApi()
var body = ; // {{SmartCheckSmartCheckCreateTree}} Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

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

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

            var apiInstance = new SmartcheckApi();
            var body = new SmartCheckSmartCheckCreateTree(); // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

            try
            {
                // Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash
                merkleRoot result = apiInstance.smartCheckCreateTree(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmartcheckApi.smartCheckCreateTree: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSmartcheckApi();
$body = ; // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

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

my $api_instance = WWW::SwaggerClient::SmartcheckApi->new();
my $body = WWW::SwaggerClient::Object::SmartCheckSmartCheckCreateTree->new(); # SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

eval { 
    my $result = $api_instance->smartCheckCreateTree(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SmartcheckApi->smartCheckCreateTree: $@\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.SmartcheckApi()
body =  # SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

try: 
    # Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash
    api_response = api_instance.smart_check_create_tree(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SmartcheckApi->smartCheckCreateTree: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Token válido

Status: 401 - Invalid credentials / Error user


smartCheckCreateTreeAndRegisterMerkleRoot

Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash, e inserta el Merkle Root en Blockchain

Un Árbol Merkle es una compresión de códigos Hash que al ser combinados por pares dan como resultado un sólo código llamado Merkle Root o Raíz Merkle que representa al conjunto.


/smart-check/create-tree-and-register-merkle-root

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/smart-check/create-tree-and-register-merkle-root"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SmartcheckApi;

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

public class SmartcheckApiExample {

    public static void main(String[] args) {
        
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckSmartCheckCreateTree body = ; // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.
        try {
            merkleRoot result = apiInstance.smartCheckCreateTreeAndRegisterMerkleRoot(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckCreateTreeAndRegisterMerkleRoot");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SmartcheckApi;

public class SmartcheckApiExample {

    public static void main(String[] args) {
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckSmartCheckCreateTree body = ; // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.
        try {
            merkleRoot result = apiInstance.smartCheckCreateTreeAndRegisterMerkleRoot(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckCreateTreeAndRegisterMerkleRoot");
            e.printStackTrace();
        }
    }
}
SmartCheckSmartCheckCreateTree *body = ; // Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

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

// Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash, e inserta el Merkle Root en Blockchain 
[apiInstance smartCheckCreateTreeAndRegisterMerkleRootWith:body
              completionHandler: ^(merkleRoot output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeContractSmartcheckApi = require('code_contract___smartcheck_api');

var api = new CodeContractSmartcheckApi.SmartcheckApi()
var body = ; // {{SmartCheckSmartCheckCreateTree}} Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

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

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

            var apiInstance = new SmartcheckApi();
            var body = new SmartCheckSmartCheckCreateTree(); // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

            try
            {
                // Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash, e inserta el Merkle Root en Blockchain 
                merkleRoot result = apiInstance.smartCheckCreateTreeAndRegisterMerkleRoot(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmartcheckApi.smartCheckCreateTreeAndRegisterMerkleRoot: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSmartcheckApi();
$body = ; // SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

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

my $api_instance = WWW::SwaggerClient::SmartcheckApi->new();
my $body = WWW::SwaggerClient::Object::SmartCheckSmartCheckCreateTree->new(); # SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

eval { 
    my $result = $api_instance->smartCheckCreateTreeAndRegisterMerkleRoot(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SmartcheckApi->smartCheckCreateTreeAndRegisterMerkleRoot: $@\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.SmartcheckApi()
body =  # SmartCheckSmartCheckCreateTree | Hashes requeridos para hacer el arbol, metadatos con clave y valor (opcional) y el identificador del contrato.

try: 
    # Crea un Árbol Merkle o Merkle Tree a partir de una lista de huellas electrónicas o Hash, e inserta el Merkle Root en Blockchain 
    api_response = api_instance.smart_check_create_tree_and_register_merkle_root(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SmartcheckApi->smartCheckCreateTreeAndRegisterMerkleRoot: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Token válido

Status: 401 - Invalid credentials / Error user


smartCheckGetSmackCheckMerkle

Devuelve los contratos del usuario

Devuelve un listado con los nombres, los merkle_root y root_hash_id pertenecientes a ese contrato, y el identificador de cada uno de los contratos que tiene el usuario.


/smart-check/get-smart-check-merkle

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"/api/smart-check/get-smart-check-merkle"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SmartcheckApi;

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

public class SmartcheckApiExample {

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

public class SmartcheckApiExample {

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

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

// Devuelve los contratos del usuario
[apiInstance smartCheckGetSmackCheckMerkleWithCompletionHandler: 
              ^(smartCheckGetSmartCheckMerkle output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeContractSmartcheckApi = require('code_contract___smartcheck_api');

var api = new CodeContractSmartcheckApi.SmartcheckApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.smartCheckGetSmackCheckMerkle(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new SmartcheckApi();

            try
            {
                // Devuelve los contratos del usuario
                smartCheckGetSmartCheckMerkle result = apiInstance.smartCheckGetSmackCheckMerkle();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmartcheckApi.smartCheckGetSmackCheckMerkle: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->smartCheckGetSmackCheckMerkle();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SmartcheckApi->smartCheckGetSmackCheckMerkle: $@\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.SmartcheckApi()

try: 
    # Devuelve los contratos del usuario
    api_response = api_instance.smart_check_get_smack_check_merkle()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SmartcheckApi->smartCheckGetSmackCheckMerkle: %s\n" % e)

Parameters

Responses

Status: 200 - OK

Status: 401 - Invalid credentials / Error user


smartCheckNewSmartCheckMerkle

Crea un contrato nuevo

Crea un contrato nuevo donde luego se pueden guardar los Arboles Merkle o Merkle Tree. Los nombres o descripciones de los contratos deben ser unicos.


/smart-check/new-smart-check-merkle

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/smart-check/new-smart-check-merkle"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SmartcheckApi;

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

public class SmartcheckApiExample {

    public static void main(String[] args) {
        
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckNewSmartCheckMerkle body = ; // SmartCheckNewSmartCheckMerkle | Nombre que se le quiera dar al contrato.
        try {
            smartCheckNewSmartCheckMerkleResponse result = apiInstance.smartCheckNewSmartCheckMerkle(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckNewSmartCheckMerkle");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SmartcheckApi;

public class SmartcheckApiExample {

    public static void main(String[] args) {
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckNewSmartCheckMerkle body = ; // SmartCheckNewSmartCheckMerkle | Nombre que se le quiera dar al contrato.
        try {
            smartCheckNewSmartCheckMerkleResponse result = apiInstance.smartCheckNewSmartCheckMerkle(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckNewSmartCheckMerkle");
            e.printStackTrace();
        }
    }
}
SmartCheckNewSmartCheckMerkle *body = ; // Nombre que se le quiera dar al contrato.

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

// Crea un contrato nuevo
[apiInstance smartCheckNewSmartCheckMerkleWith:body
              completionHandler: ^(smartCheckNewSmartCheckMerkleResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeContractSmartcheckApi = require('code_contract___smartcheck_api');

var api = new CodeContractSmartcheckApi.SmartcheckApi()
var body = ; // {{SmartCheckNewSmartCheckMerkle}} Nombre que se le quiera dar al contrato.

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

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

            var apiInstance = new SmartcheckApi();
            var body = new SmartCheckNewSmartCheckMerkle(); // SmartCheckNewSmartCheckMerkle | Nombre que se le quiera dar al contrato.

            try
            {
                // Crea un contrato nuevo
                smartCheckNewSmartCheckMerkleResponse result = apiInstance.smartCheckNewSmartCheckMerkle(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmartcheckApi.smartCheckNewSmartCheckMerkle: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSmartcheckApi();
$body = ; // SmartCheckNewSmartCheckMerkle | Nombre que se le quiera dar al contrato.

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

my $api_instance = WWW::SwaggerClient::SmartcheckApi->new();
my $body = WWW::SwaggerClient::Object::SmartCheckNewSmartCheckMerkle->new(); # SmartCheckNewSmartCheckMerkle | Nombre que se le quiera dar al contrato.

eval { 
    my $result = $api_instance->smartCheckNewSmartCheckMerkle(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SmartcheckApi->smartCheckNewSmartCheckMerkle: $@\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.SmartcheckApi()
body =  # SmartCheckNewSmartCheckMerkle | Nombre que se le quiera dar al contrato.

try: 
    # Crea un contrato nuevo
    api_response = api_instance.smart_check_new_smart_check_merkle(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SmartcheckApi->smartCheckNewSmartCheckMerkle: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Token válido

Status: 401 - Invalid credentials / Error user


smartCheckRegisterMerkleRoot

Inserta un Merkle Root en Blockchain

Para poder insertar un Merkle Root en Blockchain será necesario tener un enlace a Blockchain.


/smart-check/register-merkle-root

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"/api/smart-check/register-merkle-root"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SmartcheckApi;

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

public class SmartcheckApiExample {

    public static void main(String[] args) {
        
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckRegisterMerkleRoot body = ; // SmartCheckRegisterMerkleRoot | Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.
        try {
            apiInstance.smartCheckRegisterMerkleRoot(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckRegisterMerkleRoot");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SmartcheckApi;

public class SmartcheckApiExample {

    public static void main(String[] args) {
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckRegisterMerkleRoot body = ; // SmartCheckRegisterMerkleRoot | Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.
        try {
            apiInstance.smartCheckRegisterMerkleRoot(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckRegisterMerkleRoot");
            e.printStackTrace();
        }
    }
}
SmartCheckRegisterMerkleRoot *body = ; // Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.

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

// Inserta un Merkle Root en Blockchain
[apiInstance smartCheckRegisterMerkleRootWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeContractSmartcheckApi = require('code_contract___smartcheck_api');

var api = new CodeContractSmartcheckApi.SmartcheckApi()
var body = ; // {{SmartCheckRegisterMerkleRoot}} Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.

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

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

            var apiInstance = new SmartcheckApi();
            var body = new SmartCheckRegisterMerkleRoot(); // SmartCheckRegisterMerkleRoot | Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.

            try
            {
                // Inserta un Merkle Root en Blockchain
                apiInstance.smartCheckRegisterMerkleRoot(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmartcheckApi.smartCheckRegisterMerkleRoot: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSmartcheckApi();
$body = ; // SmartCheckRegisterMerkleRoot | Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.

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

my $api_instance = WWW::SwaggerClient::SmartcheckApi->new();
my $body = WWW::SwaggerClient::Object::SmartCheckRegisterMerkleRoot->new(); # SmartCheckRegisterMerkleRoot | Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.

eval { 
    $api_instance->smartCheckRegisterMerkleRoot(body => $body);
};
if ($@) {
    warn "Exception when calling SmartcheckApi->smartCheckRegisterMerkleRoot: $@\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.SmartcheckApi()
body =  # SmartCheckRegisterMerkleRoot | Identificador del contrato y el Merkle Root, es decir, el resultado de crear un Arbol Merkle.

try: 
    # Inserta un Merkle Root en Blockchain
    api_instance.smart_check_register_merkle_root(body)
except ApiException as e:
    print("Exception when calling SmartcheckApi->smartCheckRegisterMerkleRoot: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - OK

Status: 401 - Invalid credentials / Error user


smartCheckReportsProofDetail

Deuelve un archivo binario para descargar los PDF

Devuelve un archivo binario para poder descargar los PDF de las pruebas y las evidencias que pertenecen al Arbol Merkle de ese ID.


/smart-check/print-reports

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"/api/smart-check/print-reports"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SmartcheckApi;

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

public class SmartcheckApiExample {

    public static void main(String[] args) {
        
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckReportsProofDetail body = ; // SmartCheckReportsProofDetail | Root hash ID que devuelve "/smart-check/create-tree"
        try {
            apiInstance.smartCheckReportsProofDetail(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckReportsProofDetail");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SmartcheckApi;

public class SmartcheckApiExample {

    public static void main(String[] args) {
        SmartcheckApi apiInstance = new SmartcheckApi();
        SmartCheckReportsProofDetail body = ; // SmartCheckReportsProofDetail | Root hash ID que devuelve "/smart-check/create-tree"
        try {
            apiInstance.smartCheckReportsProofDetail(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmartcheckApi#smartCheckReportsProofDetail");
            e.printStackTrace();
        }
    }
}
SmartCheckReportsProofDetail *body = ; // Root hash ID que devuelve "/smart-check/create-tree"

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

// Deuelve un archivo binario para descargar los PDF
[apiInstance smartCheckReportsProofDetailWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeContractSmartcheckApi = require('code_contract___smartcheck_api');

var api = new CodeContractSmartcheckApi.SmartcheckApi()
var body = ; // {{SmartCheckReportsProofDetail}} Root hash ID que devuelve "/smart-check/create-tree"

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

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

            var apiInstance = new SmartcheckApi();
            var body = new SmartCheckReportsProofDetail(); // SmartCheckReportsProofDetail | Root hash ID que devuelve "/smart-check/create-tree"

            try
            {
                // Deuelve un archivo binario para descargar los PDF
                apiInstance.smartCheckReportsProofDetail(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmartcheckApi.smartCheckReportsProofDetail: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSmartcheckApi();
$body = ; // SmartCheckReportsProofDetail | Root hash ID que devuelve "/smart-check/create-tree"

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

my $api_instance = WWW::SwaggerClient::SmartcheckApi->new();
my $body = WWW::SwaggerClient::Object::SmartCheckReportsProofDetail->new(); # SmartCheckReportsProofDetail | Root hash ID que devuelve "/smart-check/create-tree"

eval { 
    $api_instance->smartCheckReportsProofDetail(body => $body);
};
if ($@) {
    warn "Exception when calling SmartcheckApi->smartCheckReportsProofDetail: $@\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.SmartcheckApi()
body =  # SmartCheckReportsProofDetail | Root hash ID que devuelve "/smart-check/create-tree"

try: 
    # Deuelve un archivo binario para descargar los PDF
    api_instance.smart_check_reports_proof_detail(body)
except ApiException as e:
    print("Exception when calling SmartcheckApi->smartCheckReportsProofDetail: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - OK

Status: 401 - Invalid credentials / Error user