Date: Fri, 29 Mar 2024 04:15:39 +0100 (CET) Message-ID: <560085984.47313.1711682139556@docs.flashphoner.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_47312_1771522869.1711682139556" ------=_Part_47312_1771522869.1711682139556 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Nodes can be managed using Websocket API or REST API.
New node is created automatically when WCS server, which is not in the d= atabase, connects to backend server.
Node parameters can be changed wit= h /api/node/update request
API | Request | Response | Response status |
---|---|---|---|
WS API |
=20
SEND destination:/app/api/node/update content-length:121 { "requestId":"70ed9798-6463-4741-818f-b0b9d7299b6f", "realm":"/api/node/update", "payload": { "id":"2", "profiles":["1","2"] } }=20 |
=20
MESSAGE destination:/user/service content-type:application/json;charset=3DUTF-8 subscription:sub-1 message-id:3-25 content-length:84 { "requestId":"70ed9798-6463-4741-818f-b0b9d7299b6f", "status":200, "reason":"SUCCESS"}=20 |
200 OK 404 Object not found 500 P= ersist exception |
REST API |
=20
POST: /api/node/u= pdate "application/json; charset=3Dutf-8" { "id":"2", "profiles":["1","2"] }=20 |
=20
{ "status":200, "reason":"SUCCESS" }=20 |
200 OK 404 Object not found 500 P= ersist exception |
Where
A node can be deleted with = /api/node/delete request
API | Request | Response | Response status |
---|---|---|---|
WS API |
=20
SEND destination:/app/api/node/delete content-length:100 { "requestId":"a2d3fd81-4598-41cf-8840-e40770d597b4", "realm":"/api/node/delete", "payload": { "id":"2" } }=20 |
=20
MESSAGE destination:/user/service content-type:application/json;charset=3DUTF-8 subscription:sub-1 message-id:3-25 content-length:84 { "requestId":"a2d3fd81-4598-41cf-8840-e40770d597b4", "status":200, "reason":"SUCCESS"}=20 |
200 OK 404 Object not found 500 P= ersist exception |
REST API |
=20
POST: /api/node/d= elete "application/json; charset=3Dutf-8" { "id":"2" }=20 |
=20
{ "status":200, "reason":"SUCCESS" }=20 |
200 OK 404 Object not found 500 P= ersist exception |
Where
The node monitoring stops when it is deleted.
A node information can be obtained= with /api/node/list request
API | Request | Response | Response status |
---|---|---|---|
WS API |
=20
SEND destination:/app/api/node/list content-length:98 { "requestId":"5c809c02-1082-418e-8423-db7dbff9605c", "realm":"/api/node/list", "payload": { "id":"3" } }=20 |
=20
MESSAGE destination:/user/service content-type:application/json;charset=3DUTF-8 subscription:sub-1 message-id:3-28 content-length:143 { "requestId":"5c809c02-1082-418e-8423-db7dbff9605c", "status":200, "reason":"SUCCESS", "payload":[ { "id":3, "host":"192.168.1.64", "profiles":[1] } ] }=20 |
200 OK 404 Object not found 500 P= ersist exception |
REST API |
=20
POST: /api/node/l= ist "application/json; charset=3Dutf-8" { "id":"3" }=20 |
=20
{ "status": 200, "reason": "SUCCESS", "payload": [ { "id": 3, "host": "192.168.1.64", "profiles": [ 1 ] } ] }=20 |
200 OK 404 Object not found 500 P= ersist exception |
Where
If node Id is set, the response wi= ll contain only that node information. If Id is not set, = span>the response will contain list with all the nodes on backend server.= span>
A node current state can be obtain= ed with /api/node_status/list query
API | Request | Response | Response status |
---|---|---|---|
WS API |
=20
SEND destination:/app/api/node_status/list content-length:105 { "requestId":"404ae542-b729-4b6e-bf28-ef85dc1f8630", "realm":"/api/node_status/list", "payload": { "id":"3" } }=20 |
=20
MESSAGE destination:/user/service content-type:application/json;charset=3DUTF-8 subscription:sub-1 message-id:3-31 content-length:171 { "requestId":"404ae542-b729-4b6e-bf28-ef85dc1f8630", "status":200, "reason":"SUCCESS", "payload":[ { "id":3, "rate":160 } ] }=20 |
200 OK 404 Object not found 500 P= ersist exception |
REST API |
=20
POST: /api/node_s= tatus/list "application/json; charset=3Dutf-8" { "id":"3" }=20 |
=20
{ "status": 200, "reason": "SUCCESS", "payload": [ { "id": 3, "rate": 160 } ] }=20 |
200 OK 404 Object not found 500 P= ersist exception |
Where
If node Id is set, the response wi= ll contain only that node state. If Id is not set, t= he response will contain current state of all the nodes on backend server.<= /span>
If the node is not connected to ba= ckend server, or if this node never be connected, the response will be 404 = OBJECT_NOT_FOUND