NeoEdge X provides RESTful APIs that allow your external applications to read device data and send control commands to operate OT devices. This document explains how to use the NeoEdge X RESTful API and defines each field to help you integrate it seamlessly into your application system.
Reading OT Device Tag Values
curl -X 'GET' 'http://<Gatewap_IP>:59882/api/v3/device/name/<Device_Name>/<Tag_Nme>' | jq '.event.readings[0]'
Response
{
"id": "5522d833-8383-48a5-b8ed-7a534a701ef3",
"origin": <timestamp>,
"deviceName": "<Device_Name>",
"resourceName": "<Tag_Name>",
"profileName": "<Porfile_Name>",
"valueType": "<Tag_Type>",
"value": "<Tag_Value>"
}
Field Names
|
Explanation
|
origin |
The timestamp of the data capture, with units in nanoseconds (ns). |
deviceName |
OT Device Name |
resourceName |
OT Tag Name |
profileName |
OT Profile Name, with the default value as -profile. |
valueType |
OT Tag Type Depending on the configured tag data type, the possible values are: [“Bool”, “Int16”, “Int32”, “Int64”, “Uint16”, “Uint32”, “Uint64”, “Float32”, “Float64”, “String”] |
value | Tag value reading |
Write the OT Device Tag value.
curl -X 'PUT' 'http://<Gatewap_IP>:59882/api/v3/device/name/<Device_Name>/<Tag_Nme>' \
-H 'Content-Type: application/json' \
-d '{"<Tag_Nme>":<New_Value>}'
Response
{
"apiVersion": "v3",
"statusCode": 200
}
Field Names
|
Explanation
|
statusCode |
HTTP status code |