The Xentara InfluxDB Client v1.1
User Manual
Loading...
Searching...
No Matches
JSON Format for Influxdb write request

A JSON object describing an Influxdb WriteRequest has following syntax:

{
"@Microservice.InfluxDB.WriteRequest" : {
"id": "Request",
"uuid": "ce30fa69-c291-4813-9cc6-b7897a2bd16a",
"batchSize":{
"loops": 1,
"requests": 1
},
"recordGroups": [
{
"measurements":{
"1stfloor/room101/temperature": "1st Floor.Room 101.Temperature",
"1stfloor/room101/pressure": "1st Floor.Room 101.Pressure",
"2ndtfloor/room201/temperature": "2nd Floor.Room 201.Temperature",
"2ndfloor/room201/pressure": "2nd Floor.Room 201.Pressure",
"3rdfloor/room301/temperature": "3rd Floor.Room 301.Temperature",
"3rdfloor/room301/pressure": "3rd Floor.Room 301.Pressure"
},
"tags": {
"unit": "units",
"UUID": "UUID",
"quality": "quality"
},
"fields": {
"value": "value",
"changeTime": "changeTime"
}
}
]
}
}

Object Members
idA string value containing the ID of the WriteRequest. The ID is used to construct the primary key of the WriteRequest .
uuidA string value containing the unique UUID of the WriteRequest.
batchsizeAn optional array of parameters to set the BatchSize . If BatchSize is not defined the default values are 5000 for the records and 1 for the loops as it has been suggested to be the optimal values by Influxdb.
loopsAn optional integer which defines the number of loops required to send the measurements. The default value is 1.
requestsAn optional integer which defines the number of requests of records required to wait until a measurement is been send. The default value is 5000.
recordGroupsA JSON array containing properties of the measurements, tags and fields.
measurementsAn array containing string values paired with datapoints in form of string values. The first string defines the name of the measurement in the InfluxDB server and the second is the corresponding key of the datapoint.
tagsAn optional array containing string values paired with attribute of the datapoints. The first string value defines the name of the tag in the Influxdb Server and the second the name of the datapoint attribute.
fieldsAn array containing string values paired with attribute of the datapoints. The first string value defines the name of the field in the Influxdb Server and the second the name of the datapoint attribute.

Please remember that each element block requires two layers of {} due to the syntax restrictions of the JSON format.