Edge Node
note
This resource is used for interacting with edge node configurations in SENSR.
A node configuration has configs related to edge node setup. (e.g. username
, bin
...)
GET
/[SENSR version]/settings/edge-node
Get an config table of the desired edge node.
- Parameters
- edge-node-uri : ID of edge node.
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X GET 'http://localhost:9080/[SENSR version]/settings/edge-node?edge-node-uri=edge_0000'
** Respond **
{
"uid":"edge_0000",
"ip":"172.17.0.1",
"name":"Edge Node 1",
"disabled":false
}
PUT
/[SENSR version]/settings/edge-node
This command creates a new edge node.
The command takes in the edge node configuration table as can be seen in the example below. Please refer to the POST command section for details about the format of the data as it is almost identical. The only difference is that you can skip the
uid
here, SENSR will create one for the newly created edge node.If this command was successful, the uid of the new edge node is returned.
You should also call /commands/apply-change to save your changes.
- Parameters
- N/A
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X PUT 'http://localhost:9080/[SENSR version]/settings/edge-node'
--data '{
"algo_uid": "algo_0000",
"ip": "192.168.0.100",
"name": "Edge_1",
"disabled":false
}'
** Respond **
"edge_0001"
POST
/[SENSR version]/settings/edge-node
Update the config of the edge node specified by the
uid
-field in the request body. Note that the combination of IP address and port should be unique.You should also call /commands/apply-change to save your changes.
- Parameters
- N/A
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X POST 'http://localhost:9080/[SENSR version]/settings/edge-node'
--data '{
"uid": "edge_0001",
"ip": "192.168.0.100",
"name": "Edge_1 Updated",
"disabled":false
}'
** Respond **
200 OK
DELETE
/[SENSR version]/settings/edge-node
Delete an edge node.
- Parameters
- edge-node-uri : ID of edge node.
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X DELETE 'http://localhost:9080/[SENSR version]/settings/edge-node?edge-node-uri=edge_0001'
** Respond **
200 OK