Description:
Handle data using InfluxDB2 interface.
Syntax:
influx2_rest(url, method, content; httpHeader1, httpHeader2, …)
Note:
The InfluxdbCli external library function (See External Library Guide) uses InfluxDB2 REST interface to handle data. Detailed directions are explained in InfluxDB API. It is valid only with InfluxDB 2.x.
Parameter:
url |
The connection URL. |
method |
An HTTP method, whose value can be GET/PUT/POST/DELETE/PATCH. |
content |
The to-be-submitted content an HTTP request contains; the parameter can be absent when an operation does not submit anything. |
httpHeader |
An HTTP header, including information such as token for authenticating a user agent and specification of content format. |
Return value:
Query result set
Example:
|
A |
1 |
>token=ZHL...fxWg== |
2 |
=influx2_rest("http://localhost:8086/api/v2/buckets", "GET"; "Authorization: TOKEN"+token) |
3 |
=influx2_close(A1) |