# Get multiple Tag Relation values (with Body)

**Example URL**

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

`Last Update: 7 NOV 2024`

#### Retrieve Tag Relation Values

**Method:** `POST`

**URL:** `{{base_url}}/tagrelation/value?mode=read`

***

**Query Parameters:**

<table><thead><tr><th width="180">Parameter</th><th width="118">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mode</code></td><td>string</td><td><p><strong>Mode of the Request</strong></p><ul><li><code>read</code>: Use this mode to retrieve data.</li><li><code>write</code>: Use this mode to insert data.</li></ul><p>(Default: <code>mode=read</code>)</p></td></tr><tr><td><code>updateStatus</code></td><td>bool</td><td><p></p><p><strong>Update Status of data</strong></p><ul><li><code>True</code>: Use this when need to update the status of data</li><li><code>False</code>: Use this when don't need to update the status of data</li></ul><p>(Default: <code>updateStatus=False</code>)</p></td></tr><tr><td><code>clearAll</code></td><td>bool</td><td><p></p><p><strong>Clear records of data</strong></p><ul><li><code>True</code>: Use this when need to clear all records of data before insert the new one</li><li><code>False</code>: Use this when don't need to clear all records of data before insert the new one</li></ul><p>(Default: <code>clearAll=False</code>)</p></td></tr></tbody></table>

***

**Request Body:**

<table><thead><tr><th width="196">Parameter</th><th width="139">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tagrelations</code></td><td>string</td><td>Comma-separated list of tag relation names to retrieve values for (e.g., <code>bronze_relation_raw,TagRelationManagementSystem</code>)</td></tr><tr><td><code>starttime</code></td><td>string</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>string</td><td>Ending time for filtering the data (e.g., <code>*</code>)<br>(Default: <code>endtime=*</code>)</td></tr><tr><td><code>statusData</code></td><td>integer</td><td>Status filter for the tag relation values</td></tr></tbody></table>

***

**Time Expression:**

<table><thead><tr><th width="209">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>Go back (e.g., <code>*-10y</code> means go back 10 years)</td></tr><tr><td><code>*</code></td><td>Present</td></tr><tr><td><code>+</code></td><td>Go forward (e.g., <code>*+10mo</code> means go forward 10 months)</td></tr></tbody></table>

***

**Example Request Body:**

```json
{
    "tagrelations": "tagrelationname,tagrelationname",
    "starttime": "*-10y",
    "endtime": "*",
    "statusData": 9
}

```

***

**Response Example:**

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

<table><thead><tr><th width="207">Object</th><th width="150">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>tagRelationName</code></td><td>string</td><td>Name of the tag relation.</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>
