Nodes can be managed using REST API.

Node creation

New node is created automatically when WCS server, which is not in the database, connects to backend server.

Node changing

Node parameters can be changed with REST API query /api/node/update

https://hostname:8090/api/node/update
{
  "id": "15",
  "profiles": ["14", "17"]
}

Where

Node deletion

A node can be deleted with REST API query /api/node/delete

https://hostname:8090/api/node/delete
{
  "id": "3"
}

Where

The node monitoring stops when it is deleted.

Obtaining node information

Node information can be obtained with REST API query /api/node/list

https://hostname:8090/api/node/list
{
  "id": "3"
}

Where

If node Id is set, the response will contain only that node information. If Id is not set, the response will contain list with all the nodes on backend server.

The response contains the following fields

[
    {
        "id": 3,
        "host": "95.191.131.64",
        "profiles": [
            2
        ]
    }
]

Where

Obtaining node current state

Node current state can be obtained with REST API query  /api/node_status/list

https://hostname:8090/api/node_status/list
{
  "id": "13"
}

Where

If node Id is set, the response will contain only that node state. If Id is not set, the response will contain current state of all the nodes on backend server.

The response contains the following fields

[
    {
        "id": 15,
        "connectTimestamp": 1545645928951,
        "connectCounter": 1,
        "connected": true,
        "rate": 0
    }
]

Where