GenoBank.io Docs / Certificates

Blockchain gateway

The Ethereum gateway is language-independent software as a service with a RESTful API endpoint that allows for scanning and creating transactions for a specific smart contract on the Ethereum blockchain.

Property Environment Value
Rinkeby endpoint production https://blockchain.genobank.io
Rinkeby endpoint test https://blockchain-test.genobank.io
Ledger address production 0xcfe0161f1b24cbca200cb4cdd3028fb048ed4b6f
Ledger address test 0x531a972901ed27d49fea8b77276d1418d009f87e

Authentication

Most of the API routes restrict public access and require authentication. Authenticated requests must include a HTTP header Authorization holding a valid JWT token.

$ curl ... -H 'Authorization: JWT {TOKEN}' \

Requests

The server speaks JSON. It’s recommended that every call to the server includes a ContentType header set to application/json; charset=utf-8;.

Requests with POST or PUT method must send data as application/json or multipart/form-data when files are included in the request body.

$ curl -X 'POST' ... \
       -H 'Content-Type: application/json; charset=utf-8' \
       -d $'{}'

Responses

Every response has a unique ID which helps to identify potential problems. It also includes a status code that can help identifying the cause of a potential problem.

Successful requests include a data key, which holds a valid response object, and a meta key, which holds additional information about the result.

{
  "id": ...,
  "status": ...,
  "data": { ... },
  "meta": { ... },
}

In case of failure, the server responds with errors key, which holds a list of error objects.

{
  "id": ...,
  "status": ...,
  "errors": [ ... ]
}

Query requests through GET method can return status codes 200, 400, 401, 403 or 500. Mutations through POST, PUT and DELETE can return also codes 201 and 422. Invalid routes return status code 404.

Error Handling

Errors include a unique code number and an error message. The code number helps identifying potential problems and points to the exact position in the system.

{
  ...
  "errors": [
    {
      "code": 400004,
      "message": "Invalid path."
    }
  ]
}

Routes

Transactions

[private] GET /transactions

Shows a paginated list of transactions.

Path parameters
Name Description
fromBlock An integer representing the first block.
limit An integer representing the maximum number of items.
skip An integer that defines the number of items to be skipped.
toBlock An integer representing the last block.

[private] POST /transactions

Sends the received signed transaction to the Ethereum blockchain.

Body fields

An array of strings representing signed transactions.