Appearance
Operations
Insert
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 | check networks |
| operation* | string | insert |
| parameters* | JSON | check Method Parameters |
json
{
"statusCode": 200,
"statusMessage": "",
"info": {
"jobId": "59d0f46b-0b58-4972-8aca-51d06f69f25e"
}
}Method Parameters
| Parameter | Type | Max. Size | Desciption |
|---|---|---|---|
| key | string | network limits | The key for your data. You can use this key to select the data using select operation. |
| value | string | network limits | The value to save to the selected blockchain |
Curl Example
INFO
This operation is asynchronous.
Once executed, check the results using fetch API and the providedjobId.
powershell
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"
}
}'Select
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 | check networks |
| operation* | string | select |
| parameters* | JSON | check Method Parameters |
json
{
"statusCode": 200,
"statusMessage": "",
"info": {
"jobId": "59d0f46b-0b58-4972-8aca-51d06f69f25e"
}
}Method Parameters
| Parameter | Type | Max. Size | Desciption |
|---|---|---|---|
| key | string | network limits | The hash key you previously used to save data using insert operation. |
Curl Example
INFO
This operation is asynchronous.
Once executed, check the results using fetch API and the providedjobId.
powershell
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"
}
}'