Operations

Use the blockchain as your trusted database.

Saves data to selected blockchain network you can later retrieve using select operation.

POST https://api.bws.ninja/v1/call

Request Body

Name
Type
Value

solution*

string

BWS.Blockchain.Hash

version*

number

1

network*

string

operation*

string

insert

parameters*

JSON

Parameter
Type
Max. Size
Desciption

key

string

network limits

value

string

network limits

The value to save to the selected blockchain

Curl Example

This operation is asynchronous. Once executed, check the results using fetch API and the providedjobId.

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.Blockchain.Hash",
    "version": 1,
    "network": "matchain",
    "operation": "insert",
    "parameters": {
        "key": "my patient id",
        "value": "my patient data"
    }
}'

Retrieve previously saved data using insert operation.

POST https://api.bws.ninja/v1/call

Request Body

Name
Type
Description

solution*

string

BWS.Blockchain.Hash

version*

number

1

network*

string

operation*

string

select

parameters*

JSON

Method Parameters

Parameter
Type
Max. Size
Desciption

key

string

network limits

Curl Example

This operation is asynchronous. Once executed, check the results using fetch API and the providedjobId.

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "contract": "Ethereum.Database.Mutable",
    "version": 1,
    "network": "matchain",
    "operation": "select",
    "parameters": {
        "key": "my patient id"
    }
}'

Last updated