Insert multiple tagrelation values

Add the specified tag relation values with their field mappings and timestamps.

Last Update: 7 NOV 2024

Example URL

https://{api_base_url}/integration/webapi/tagrelation/value?mode=write

Note: This endpoint demonstrates querying the value for a specific tag relation with the mode=write query parameter. In this example, the query specifies that the data should be in write mode, indicating the insertion of new values.

Add Tagrelation Values

Method: POST

URL: {{base_url}}/tagrelation/value?mode=write


Query Parameters:

ParameterData TypeDescription

mode

string

Mode of the Request

  • read: Use this mode to retrieve data.

  • write: Use this mode to insert data.

(Default: mode=read)

updateStatus

bool

Update Status of data

  • true: Use this when need to update the status of data

  • false: Use this when don't need to update the status of data

(Default: updateStatus=false)

clearAll

bool

Clear records of data

  • true: Use this when need to clear all records of data before insert the new one

  • false: Use this when don't need to clear all records of data before insert the new one

(Default: clearAll=false)


Request Body:

The request body must be an array of tag relation value objects, each containing the following parameters:

ParameterData TypeDescription

tagRelationName

string

Name of the tag relation to which the values belong.

fieldMappings

array

An array of field mapping objects for the tag relation.

timeStamp

datetime

Timestamp of the value being written.

Field Mappings:

Each object in the fieldMappings array must contain the following parameters:

ParameterData TypeDescription

field_Name

string

Name of the field being mapped.

value

variant

Value associated with the field. It can be one of the following data types:

Value Data Types:

Data TypeDescription

string

Represents text data.

int

Represents integer data.

big int

Represents large integer data.

boolean

Represents boolean values (true/false).

double

Represents floating-point data.


Example Request Body:

[
    {
        "tagRelationName": "string",
        "fieldMappings": [
            {
                "field_Name": "string",
                "value": "variant"
            },
            {
                "field_Name": "string",
                "value": "variant"
            },
            {
                "field_Name": "string",
                "value": "variant"
            }
        ],
        "timeStamp": "datetime"
    }
]

Response Example:

{
    "message": "string"
}

Response Details:

ObjectData TypeDescription

message

string

Success message indicating the result of the write operation.

Last updated