Node management¶
Nodes can be managed using Websocket API or 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 /api/node/update
request:
API | Request | Response | Response status |
---|---|---|---|
WS API | 200 OK 400 Object not found 500 Persist exception | ||
REST API | 200 OK 400 Object not found 500 Persist exception |
Where
id
– node identifierprofiles
– list of identifiers of profiles defining which metrics are acquired from this node
Node deletion¶
A node can be deleted with /api/node/delete
request:
API | Request | Response | Response status |
---|---|---|---|
WS API | 200 OK 400 Object not found 500 Persist exception | ||
REST API | 200 OK 400 Object not found 500 Persist exception |
Where
id
– node identifier
The node monitoring stops when it is deleted.
Obtaining node information¶
A node information can be obtained with /api/node/list
request:
API | Request | Response | Response status |
---|---|---|---|
WS API | 200 OK 400 Object not found 500 Persist exception | ||
REST API | 200 OK 400 Object not found 500 Persist exception |
Where
id
– node identifierhost
- WCS server addressprofiles
- profiles list
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.
Obtaining node current state¶
A node current state can be obtained with /api/node_status/list
query:
API | Request | Response | Response status |
---|---|---|---|
WS API | 200 OK 400 Object not found 500 Persist exception | ||
REST API | 200 OK 400 Object not found 500 Persist exception |
Where
id
– node identifierrate
– metrics acquisition rate
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.
If the node is not connected to backend server, or if this node never be connected, the response will be 404 OBJECT_NOT_FOUND