Get multiple Tag values (with Body)

Fetches the values of specified tags based on the provided criteria.

Example URL

https://api.icube.co.th/integration/webapi/tag/value?mode=read

Last Update: 7 NOV 2024

Retrieve Tag Values

Method: POST

URL: {{base_url}}/tag/value?mode=read


Query Parameters:

ParameterData TypeDescription

mode

string

Mode of the Request

  • read: Use this mode to retrieve data.

  • write: Use this mode to insert data.

(Default: mode=read)

updateStatus

bool

Update Status of data

  • True: Use this when need to update the status of data

  • False: Use this when don't need to update the status of data

(Default: updateStatus=False)

clearAll

bool

Clear records of data

  • True: Use this when need to clear all records of data before insert the new one

  • False: Use this when don't need to clear all records of data before insert the new one

(Default: clearAll=False)


Request Body:

ParameterData TypeDescription

tagnames

string

Comma-separated list of tag names to retrieve values for (e.g., VT-01,B15-Status)

starttime

string

Starting time for filtering the data (e.g., *-10y) (Default: starttime=*-10m)

endtime

string

Ending time for filtering the data (e.g., *) (Default: endtime=*)

statusData

integer

Status filter for the tag values


Time Expression:

ExpressionDescription

sec

Second

m

Minute

h

Hour

d

Day

mo

Month

y

Year

*

Present

-

Go back (e.g., *-10y means go back 10 years)

+

Go forward (e.g., *+10mo means go forward 10 months)


Example Request Body:

{
  "tagnames": "tagname,tagname",
  "starttime": "*-10y",
  "endtime": "*",
  "statusData": 9
}

Response Example:

{
    "data": [
        {
            "tagname": "string",
            "description": "string or null",
            "subDescription": "string or null",
            "value": "string",
            "unit": "string",
            "quality": integer,
            "status": integer,
            "timeStamp": "datetime"
        }
    ]
}

Response Details:

ObjectData TypeDescription

data

array

Array of tag value objects returned from the API.

tagname

string

Name of the tag.

description

string/null

Description of the tag.

subDescription

string/null

Additional description of the tag (if available).

value

string

Value associated with the tag.

unit

string

Unit of measurement for the tag value.

quality

integer

Quality indicator of the tag value.

status

integer

Status code associated with the tag value.

timeStamp

datetime

Timestamp when the tag value was recorded.

Last updated