API Specification of the Relay

The OpenAPI specification of the Relay

Resources

The JSON schema of the OpenAPI Specification of the Relay can be found at:

The rendered document of the specification can be accessed at:

API List

Get total TFLOPS of the network

get
Responses
200
OK
application/json
get
GET /v1/network HTTP/1.1
Host: 
Accept: */*
{
  "data": {
    "tflops": 1
  },
  "message": "text"
}

Get the info of all the nodes in the network

get
Query parameters
startinteger · int32Optional
totalinteger · int32 · min: 1 · max: 100Required
Responses
200
OK
application/json
get
GET /v1/network/nodes/data?total=1 HTTP/1.1
Host: 
Accept: */*
{
  "data": [
    {
      "address": "text",
      "balance": {},
      "card_model": "text",
      "qos": 1,
      "v_ram": 1
    }
  ],
  "message": "text"
}

Get total nodes number in the network

get
Responses
200
OK
application/json
get
GET /v1/network/nodes/number HTTP/1.1
Host: 
Accept: */*
{
  "data": {
    "active_nodes": 1,
    "all_nodes": 1,
    "busy_nodes": 1
  },
  "message": "text"
}

Get total task number in the network

get
Responses
200
OK
application/json
get
GET /v1/network/tasks/number HTTP/1.1
Host: 
Accept: */*
{
  "data": {
    "queued_tasks": 1,
    "running_tasks": 1,
    "total_tasks": 1
  },
  "message": "text"
}

Other APIs

Get current unix timestamp of server

get
Responses
200
OK
application/json
get
GET /v1/now HTTP/1.1
Host: 
Accept: */*
{
  "data": {
    "now": 1
  },
  "message": "text"
}

Last updated