Nodes API

create new entry

POST /api/rest/admin/nodes

Parameters

Name Description
data[type] Resource type (nodes)
data[id] Node ID
data[attributes][name] Name
data[attributes][rpc-endpoint] Rpc endpoint
data[relationships][pop] Pop

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NTcsInN1YiI6MTM3fQ.r1gMmnDN-Fa5KeeCqzTIy3OPtF0O_ANY-mk26vEcCxQ
Host: example.org
Cookie: 

Route

POST /api/rest/admin/nodes

Body

{"data":{"type":"nodes","id":11,"attributes":{"name":"name","rpc-endpoint":"127.0.0.1:8099"},"relationships":{"pop":{"data":{"type":"pops","id":7}}}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"3c04f300026d736bfcce9113fef38cba"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: ef6ff1c5-9141-4d82-b766-83bf892c276b
X-Runtime: 0.019220
Content-Length: 355

Status

201 Created

Body

{
  "data": {
    "id": "11",
    "type": "nodes",
    "links": {
      "self": "http://example.org/api/rest/admin/nodes/11"
    },
    "attributes": {
      "name": "name",
      "rpc-endpoint": "127.0.0.1:8099"
    },
    "relationships": {
      "pop": {
        "links": {
          "self": "http://example.org/api/rest/admin/nodes/11/relationships/pop",
          "related": "http://example.org/api/rest/admin/nodes/11/pop"
        },
        "data": {
          "type": "pops",
          "id": "7"
        }
      }
    }
  }
}