> For the complete documentation index, see [llms.txt](https://docs.icube.co.th/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.icube.co.th/icube-platform/icube-server/integration/provider/integration-provider-api-document/get-single-tag-relation-value.md).

# Get single Tag Relation value

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

**Example URL**

```
https://api.icube.co.th/integration/webapi/tagrelation/bronze_relation_raw/value?starttime=*-10d&endtime=*&query=name like 'K%'
```

`Last Update: 5 NOV 2024`

#### Retrieve Tag Relation Value with Conditions

**Method:** `GET`

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

***

**Query Parameters:**

<table><thead><tr><th width="201">Parameter</th><th width="111">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>starttime</code></td><td>Yes</td><td>Starting time for filtering the data (e.g., <code>*-10y</code>)<br>(Default: <code>starttime=*-10m</code>)</td></tr><tr><td><code>endtime</code></td><td>Yes</td><td>Ending time for filtering the data (e.g., <code>*</code>)<br>(Default: <code>endtime=*</code>)</td></tr><tr><td><code>query</code></td><td>No</td><td>A condition to filter the results, acting like a WHERE clause in PostgreSQL.</td></tr></tbody></table>

**Time Expression:**

<table><thead><tr><th width="226">Expression</th><th>Description</th></tr></thead><tbody><tr><td><code>sec</code></td><td>Second</td></tr><tr><td><code>m</code></td><td>Minute</td></tr><tr><td><code>h</code></td><td>Hour</td></tr><tr><td><code>d</code></td><td>Day</td></tr><tr><td><code>mo</code></td><td>Month</td></tr><tr><td><code>y</code></td><td>Year</td></tr><tr><td><code>*</code></td><td>Present</td></tr><tr><td><code>-</code></td><td>Go back (e.g., <code>*-10d</code> means go back 10 days)</td></tr><tr><td><code>+</code></td><td>Go forward (e.g., <code>*+10mo</code> means go forward 10 months)</td></tr></tbody></table>

***

**Response Example:**

```json
{
    "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:**

<table><thead><tr><th width="184">Object</th><th width="160">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><code>data</code></td><td>array</td><td>Array of tag relation value objects returned from the API.</td></tr><tr><td><code>Id</code></td><td>string</td><td>Unique identifier for the tag relation.</td></tr><tr><td><code>name</code></td><td>string</td><td>Name associated with the tag relation.</td></tr><tr><td><code>tel</code></td><td>string</td><td>Telephone number associated with the tag relation.</td></tr><tr><td><code>quality</code></td><td>integer</td><td>Quality indicator of the tag relation value.</td></tr><tr><td><code>status</code></td><td>integer</td><td>Status code associated with the tag relation value.</td></tr><tr><td><code>timeStamp</code></td><td>datetime</td><td>Timestamp when the tag relation value was recorded.</td></tr></tbody></table>
