account / register

ALL account register

curl -XALL "/account/register"
const axios = require('axios')

await axios.all('/account/register')

HTTP Request

ALL /account/register

Register a new account

curl -XPOST "/account/register"
const axios = require('axios')

await axios.post('/account/register')

Returns account object when accepted

HTTP Request

POST /account/register

Body Parameters

ParameterTypeRequired
emailstringtrue
passwordstringtrue
deviceIdstringtrue

account / login

ALL account login

curl -XALL "/account/login"
const axios = require('axios')

await axios.all('/account/login')

HTTP Request

ALL /account/login

Login to your account

curl -XPOST "/account/login"
const axios = require('axios')

await axios.post('/account/login')

Returns object with email and array with devices

HTTP Request

POST /account/login

Body Parameters

ParameterTypeRequired
emailstringtrue
passwordstringtrue

data

Get all data entries from each device

curl -XGET "/data"
const axios = require('axios')

await axios.get('/data')

Returns an array containing objects with "device" information, and a "transactionHistory" array.

HTTP Request

GET /data

Query Parameters

ParameterTypeRequired
rawbooleanfalse
deviceIdstringfalse

transactions

Get all transactions

curl -XGET "/transactions"
const axios = require('axios')

await axios.get('/transactions')

Returns an array containing all the transactions in the BigchainDB.

HTTP Request

GET /transactions

Query Parameters

ParameterTypeRequired
rawbooleanfalse
deviceIdstringfalse
startstringfalse
endstringfalse

transactionsCount

Get number of transactions for a deviceId

curl -XGET "/transactionsCount"
const axios = require('axios')

await axios.get('/transactionsCount')

Returns the number of transactions in the BigchainDB of a asset id

HTTP Request

GET /transactionsCount

Query Parameters

ParameterTypeRequired
deviceIdstringtrue

statistics

Get some cool statistics

curl -XGET "/statistics"
const axios = require('axios')

await axios.get('/statistics')

HTTP Request

GET /statistics

Query Parameters

ParameterTypeRequired
rawbooleanfalse
deviceIdstringfalse
startstringfalse
endstringfalse

statistics / dashboard

Returns dashboard statistics

curl -XGET "/statistics/dashboard"
const axios = require('axios')

await axios.get('/statistics/dashboard')

HTTP Request

GET /statistics/dashboard

Query Parameters

ParameterTypeRequired
deviceIdstringfalse
daysnumberfalse
datastringfalse

devices

Get objects with deviceId and metadata

curl -XGET "/devices"
const axios = require('axios')

await axios.get('/devices')

HTTP Request

GET /devices

Query Parameters

ParameterTypeRequired
deviceIdstringfalse