Get multiple Tag values

Fetches the values of specified tags identified by their names, with optional filters for time range and status.

Example URL

https://api.icube.co.th/integration/webapi/tag/value?name=B15-Status,VT-01&starttime=*-10y&endtime=*&statusData=18

Last Update: 5 NOV 2024

Retrieve Tag Values with Filters

Method: GET

URL: {{base_url}}/tag/value?name={tagname}&starttime={starttime}&endtime={endtime}&statusData={statusData}


Query Parameters:

ParameterRequiredDescription

name

Yes

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

starttime

Yes

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

endtime

Yes

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

statusData

No

A filter for the status of the tag values, acting like a WHERE clause in PostgreSQL (only integer).

Time Expression:

ExpressionDescription

sec

Second

m

Minute

h

Hour

d

Day

mo

Month

y

Year

*

Present

-

Go back (e.g., *-10d means go back 10 days)

+

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


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

The value of 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