Blockchain APIs

This section shows the Rest API end-points of Blockchain.

Table of contents

Get Device

GET /device/:id

Get a device.

Request Headers
  • Content-Type – application/json

  • X-Access-Token – JWT-TOKEN

Example request:

$ curl 'https://bc-server/device/:id' \
-H 'Content-Type: application/json' \
-H 'X-Access-Token: <JWT-TOKEN>

Example response:

{
  "mac": "AC:AC:CC:CC:34:34",
  "fwId": "3",
  "dType": "ESP"
}
Response Headers
Status Codes

Get Firmware

GET /firmware/:id

Get a device.

Request Headers
  • Content-Type – application/json

  • X-Access-Token – JWT-TOKEN

Example request:

$ curl 'https://bc-server/device/:id' \
-H 'X-Access-Token: <JWT-TOKEN>

Example response:

{
  "md": "6f5902ac237024bdd0c176cb93063dc4",
  "cid": "QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u",
  "version": "1.9",
}
Response Headers
Status Codes