Get multiple Tag Relation values

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

Example URL

https://api.icube.co.th/integration/webapi/tagrelation/value?name=bronze_relation_raw,Testmultiple&starttime=*-5mo&endtime=*&statusData=9

Last Update: 7 NOV 2024

Retrieve Tag Relation Values with Filters

Method: GET

URL: {{base_url}}/tagrelation/value?name={tagrelationname}&starttime={starttime}&endtime={endtime}&statusData={statusData}


Query Parameters:

ParameterRequiredDescription

name

Yes

Comma-separated list of tag relation names to retrieve values for (e.g., bronze_relation_raw,Testmultiple).

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 relation 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": [
        {
            "tagRelationName": "string",
            "Id": "string",
            "name": "string",
            "tel": "string",
            "quality": integer,
            "status": integer,
            "timeStamp": "datetime"
        }
    ]
}

Note: The fields Id, name, and tel are placeholders and will vary depending on the specific tag relation being represented in the request. Ensure you refer to the specific tag relation schema for exact field details.

Response Details:

ObjectData TypeDescription

data

array

Array of tag relation value objects returned from the API.

tagRelationName

string

Name of the tag relation.

Id

string

Unique identifier for the tag relation entry.

name

string

Name associated with the tag relation.

tel

string

Telephone number associated with the tag relation.

quality

integer

Quality indicator of the tag relation value.

status

integer

Status code associated with the tag relation value.

timeStamp

datetime

Timestamp when the tag relation value was recorded.

Last updated