# REST API

This Application Programming Interface can be used to retrieve information from hybrixd. The requests are formatted as forward-slash ('/') separated commands (similar to a website url or file path.)

## Examples

`/asset` returns the assets supported by the hybrixd node.

`/asset/btc/balance/32FCGFdRGeho2HBeWQPaAYawJfPqHHvsCJ` returns the balance of the Bitcoin address 32FCGFdRGeho2HBeWQPaAYawJfPqHHvsCJ.

`/command/reload` reload hybrixd and reinitialize modules and recipes.

(root only)

`/proc` returns the list of processes running on the hybrixd node.

`/proc/1543921378626236` returns the progress and result of process 1543921378626236.

The response will be in JSON format. For the balance request `/asset/btc/balance/32FCGFdRGeho2HBeWQPaAYawJfPqHHvsCJ` this will be of the form:

    {"error":0,"info":"Process data.","id":"1543921378626236","progress":1,"started":1543923093402,"stopped":1543923093695,"data":"0.00000000","request":"/asset/btc/balance/32FCGFdRGeho2HBeWQPaAYawJfPqHHvsCJ"}

From which we see that the balance on this address is 0.00000000.

## Two-Stage Requests

For some requests, the response will consist of a process reference. This means that the response to your request is not yet finished, but you can follow up on it using the given process id.

Example

`/asset/btc/balance/32FCGFdRGeho2HBeWQPaAYawJfPqHHvsCJ`

Result

    {"error":0,"info":"Command process ID.","id":"id","request":"/asset/btc/balance/32FCGFdRGeho2HBeWQPaAYawJfPqHHvsCJ","data":"1543921378626236"}

The same is true for the following request.

Example

`/proc/1543921378626236`

Result

    {"error":0,"info":"Process data.","id":"1543921378626236","progress":1,"started":1543923093402,"stopped":1543923093695,"data":"0.00000000","request":"/asset/btc/balance/32FCGFdRGeho2HBeWQPaAYawJfPqHHvsCJ"}

## hybrix JS library

To facilitate integration of the API into you Javascript projects we have created a library. This library will handle two stage request and all client side steps for the encyrption and signing of transactions.

Read more about the hybrix JS library »

## Reference

No results. Change your search filter or reset the filter.