NeoEdge X OT Device RESTful API

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
說明

origin

數據擷取的Timestamp,單位為ns

deviceName

OT Device Name

resourceName

OT Tag Name

profileName

OT Profile Name,預設值為 <Device_Name>-profile

valueType

OT Tag Type

依照設定的tag資料型別,可能數值為:

[“Bool”, “Int16”, “Int32”, “Int64”, “Uint16”, “Uint32”, “Uint64”, “Float32”, “Float64”, “String”]

value Tag的讀值
寫入OT Device Tag 數值
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
說明

statusCode

HTTP狀態碼

發佈留言

Your email address will not be published. 必填欄位標示為 *