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

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjE1NiwiYXVkIjpbImFkbWluIl0sImV4cCI6MTc3MjIxMjAwN30.SRwn7sLqlD0MqFEUVVe-2jQEXHfXYWrroakPjLHYhSg
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-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/vnd.api+json
location: http://example.org/api/rest/admin/nodes/11
vary: Accept
etag: W/"3c04f300026d736bfcce9113fef38cba"
cache-control: max-age=0, private, must-revalidate
x-request-id: ef35480a-6604-4fd4-ab6a-6752d17ed9e4
x-runtime: 0.011982
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"
        }
      }
    }
  }
}