Get single tagrelation value

Fetches the values of a specific tagrelation identified by its name, along with optional filters for time range and conditions.

Last Update: 7 NOV 2024

Example URL

https://{api_base_url}/integration/webapi/tagrelation/bronze_relation_raw/value?starttime=*-10d&endtime=*&query=name like 'K%'

Note: This endpoint demonstrates querying the value of a specific tag relation (bronze_relation_raw) with additional query parameters. In this example:

  • starttime=*-10d specifies the start time as 10 days ago.

  • endtime=* indicates no specific end time (or the most recent data).

  • query=name like 'K%' filters the results to include only those where the name starts with the letter "K."

Retrieve Tagrelation Value with Conditions

Method: GET

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


Query Parameters:

Parameter
Required
Description

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=*)

query

No

A condition to filter the results, acting like a WHERE clause in PostgreSQL.

Time Expression:

Expression
Description

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": [
        {
            "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:

Object
Data Type
Description

data

array

Array of tag relation value objects returned from the API.

Id

string

Unique identifier for the tag relation.

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