Write Tag API
Write Tag Data API enables you to create data for tags. You can write data to a tag for different data types such as integer, float, array, multifield and so on. Once created, you can view the data using other end points. Only REST API Administrator and users with write permission can perform this operation.
Method | POST |
---|---|
URI |
|
SAMPLE URI |
|
SAMPLE RESPONSE |
|
SAMPLE CURL COMMAND |
|
Query Parameters
Parameter | Description | Required? | Values |
---|---|---|---|
Payload | JSON format of Property Name and Property Value. | Yes | Multi-data types. It can have integer, float, array, multifield data types. |
Response Parameters
Parameter | Data Type | Required? | Description |
---|---|---|---|
Error Code | Integer | Yes | For example, ErrorCode = 0, which means the operation was successful. |
Error Message | String | Yes | For example, NULL. |
Sample Payload
{
"TagName": "Testt",
"samples": [
{
"TimeStamp": "2019-09-24T05:00:00.000Z",
"Value": "{\"FD1\":\"true\",\"FD2\":\"101\"}",
"Quality": 3
}
]
}
Sample Response
{
"ErrorCode": 0,
"ErrorMessage": ""
}
Sample Payload
{
"TagName": "GDW14NV2E.Simulation000151",
"samples": [
{
"TimeStamp": "2019-09-24T05:00:00.000Z",
"Value": "{\"FD1\":\"true\",\"FD2\":\"101\"}",
"Quality": 3
}
]
}
Sample Response
{
"ErrorCode": 6,
"ErrorMessage": "Tag doesn't exist"
}