The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance.
The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. Access the InfluxDB API using /api/v2/
and InfluxDB v1-compatible endpoints.
This documentation is generated from the InfluxDB OpenAPI specification.
See the API Quick Start to get up and running authenticating with tokens, writing to buckets, and querying data.
InfluxDB API client libraries are available for popular languages and ready to import into your application.
Use one of the following schemes to authenticate to the InfluxDB API:
Use the HTTP Basic authentication scheme for InfluxDB /api/v2
API operations that support it:
Authorization: Basic BASE64_ENCODED_CREDENTIALS
To construct the BASE64_ENCODED_CREDENTIALS
, combine the username and
the password with a colon (USERNAME:PASSWORD
), and then encode the
resulting string in base64.
Many HTTP clients encode the credentials for you before sending the
request.
Warning: Base64-encoding can easily be reversed to obtain the original username and password. It is used to keep the data intact and does not provide security. You should always use HTTPS when authenticating or sending a request with sensitive information.
In the examples, replace the following:
USERNAME
: InfluxDB usernamePASSWORD
: InfluxDB API tokenINFLUX_URL
: your InfluxDB URLThe following example shows how to use cURL to send an API request that uses Basic authentication.
With the --user
option, cURL encodes the credentials and passes them
in the Authorization: Basic
header.
curl --get "INFLUX_URL/api/v2/signin"
--user "USERNAME":"PASSWORD"
The Flux http.basicAuth()
function returns a Base64-encoded
basic authentication header using a specified username and password combination.
The following example shows how to use the JavaScript btoa()
function
to create a Base64-encoded string:
btoa('USERNAME:PASSWORD')
The output is the following:
'VVNFUk5BTUU6UEFTU1dPUkQ='
Once you have the Base64-encoded credentials, you can pass them in the
Authorization
header--for example:
curl --get "INFLUX_URL/api/v2/signin"
--header "Authorization: Basic VVNFUk5BTUU6UEFTU1dPUkQ="
To learn more about HTTP authentication, see Mozilla Developer Network (MDN) Web Docs, HTTP authentication._
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | basic |
Use the Token authentication scheme to authenticate to the InfluxDB API.
In your API requests, send an Authorization
header.
For the header value, provide the word Token
followed by a space and an InfluxDB API token.
The word Token
is case-sensitive.
Authorization: Token INFLUX_API_TOKEN
The following example shows how to use cURL to send an API request that uses Token authentication:
curl --request GET "INFLUX_URL/api/v2/buckets" \
--header "Authorization: Token INFLUX_API_TOKEN"
Replace the following:
INFLUX_URL
: your InfluxDB URLINFLUX_API_TOKEN
: your InfluxDB API tokenSecurity Scheme Type | API Key |
---|---|
Header parameter name: | Authorization |
The following table shows the most common operations that the InfluxDB /api/v2
API supports.
Some resources may support other operations that perform functions more specific to those resources.
For example, you can use the PATCH /api/v2/scripts
endpoint to update properties of a script
resource.
Operation | |
---|---|
Write | Writes (POST ) data to a bucket. |
Run | Executes (POST ) a query or script and returns the result. |
List | Retrieves (GET ) a list of zero or more resources. |
Create | Creates (POST ) a new resource and returns the resource. |
Update | Modifies (PUT ) an existing resource to reflect data in your request. |
Delete | Removes (DELETE ) a specific resource. |
InfluxDB HTTP API endpoints use standard HTTP request and response headers.
The following table shows common headers used by many InfluxDB API endpoints.
Some endpoints may use other headers that perform functions more specific to those endpoints--for example,
the POST /api/v2/write
endpoint accepts the Content-Encoding
header to indicate the compression applied to line protocol in the request body.
Header | Value type | Description |
---|---|---|
Accept |
string | The content type that the client can understand. |
Authorization |
string | The authorization scheme and credential. |
Content-Length |
integer | The size of the entity-body, in bytes, sent to the database. |
Content-Type |
string | The format of the data in the request body. |
Some InfluxDB API list operations may support the following query parameters for paginating results:
Query parameter | Value type | Description |
---|---|---|
limit |
integer | The maximum number of records to return (after other parameters are applied). |
offset |
integer | The number of records to skip (before limit , after other parameters are applied). |
after |
string (resource ID) | Only returns resources created after the specified resource. |
For specific endpoint parameters and examples, see the endpoint definition.
If you specify an offset
parameter value greater than the total number of records,
then InfluxDB returns an empty list in the response
(given offset
skips the specified number of records).
The following example passes offset=50
to skip the first 50 results,
but the user only has 10 buckets:
curl --request GET "INFLUX_URL/api/v2/buckets?limit=1&offset=50" \
--header "Authorization: Token INFLUX_API_TOKEN"
The response contains the following:
{
"links": {
"prev": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=49\u0026orgID=ORG_ID",
"self": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=50\u0026orgID=ORG_ID"
},
"buckets": []
}
InfluxDB HTTP API endpoints use standard HTTP status codes for success and failure responses. The response body may include additional details. For details about a specific operation's response, see Responses and Response Samples for that operation.
API operations may return the following HTTP status codes:
Code | Status | Description |
---|---|---|
200 |
Success | |
204 |
Success. No content | InfluxDB doesn't return data for the request. |
400 |
Bad request | May indicate one of the following:
|
401 |
Unauthorized | May indicate one of the following:
|
404 |
Not found | Requested resource was not found. message in the response body provides details about the requested resource. |
413 |
Request entity too large | Request payload exceeds the size limit. |
422 |
Unprocessable entity | Request data is invalid. code and message in the response body provide details about the problem. |
429 |
Too many requests | API token is temporarily over the request quota. The Retry-After header describes when to try the request again. |
500 |
Internal server error | |
503 |
Service unavailable | Server is temporarily unavailable to process the request. The Retry-After header describes when to try the request again. |
Deletes data from a bucket.
Use this endpoint to delete points from a bucket in a specified time range.
Does the following when you send a delete request:
2xx
status code); error otherwise.To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
wait for a success response (HTTP 2xx
status code) before you send the next request.
Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response.
write-buckets
or write-bucket BUCKET_ID
.BUCKET_ID
is the ID of the destination bucket.
write
rate limits apply.
For more information, see limits and adjustable quotas.
bucket | string A bucket name or ID.
Specifies the bucket to delete data from.
If you pass both |
bucketID | string A bucket ID.
Specifies the bucket to delete data from.
If you pass both |
org | string An organization name or ID. InfluxDB Cloud
InfluxDB OSS
|
orgID | string An organization ID. InfluxDB Cloud
InfluxDB OSS
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Time range parameters and an optional delete predicate expression.
To select points to delete within the specified time range, pass a
delete predicate expression in the predicate
property of the request body.
If you don't pass a predicate
, InfluxDB deletes all data with timestamps
in the specified time range.
predicate | string An expression in delete predicate syntax. |
start required | string <date-time> A timestamp (RFC3339 date/time format). The earliest time to delete from. |
stop required | string <date-time> A timestamp (RFC3339 date/time format). The latest time to delete from. |
{- "predicate": "tag1=\"value1\" and (tag2=\"value2\" and tag3!=\"value3\")",
- "start": "2019-08-24T14:15:22Z",
- "stop": "2019-08-24T14:15:22Z"
}
{- "code": "invalid",
- "message": "failed to decode request body: organization not found"
}
Retrieves data from buckets.
Use this endpoint to send a Flux query request and retrieve data from a bucket.
read
rate limits apply.
For more information, see limits and adjustable quotas.
org | string An organization name or ID. InfluxDB Cloud
InfluxDB OSS
|
orgID | string An organization ID. InfluxDB Cloud
InfluxDB OSS
|
Accept-Encoding | string Default: identity Enum: "gzip" "identity" The content encoding (usually a compression algorithm) that the client can understand. |
Content-Type | string Enum: "application/json" "application/vnd.flux" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Flux query or specification to execute
object (Dialect) Options for tabular data output. Default output is annotated CSV with headers. For more information about tabular data dialect, see W3 metadata vocabulary for tabular data. | |
object (File) Represents a source from a single file | |
now | string <date-time> Specifies the time that should be reported as |
query required | string The query script to execute. |
type | string Value: "flux" The type of query. Must be "flux". |
{- "dialect": {
- "annotations": [
- "group"
], - "commentPrefix": "#",
- "dateTimeFormat": "RFC3339",
- "delimiter": ",",
- "header": true
}, - "extern": {
- "body": [
- {
- "text": "string",
- "type": "string"
}
], - "imports": [
- {
- "as": {
- "name": "string",
- "type": "string"
}, - "path": {
- "type": "string",
- "value": "string"
}, - "type": "string"
}
], - "name": "string",
- "package": {
- "name": {
- "name": "string",
- "type": "string"
}, - "type": "string"
}, - "type": "string"
}, - "now": "2019-08-24T14:15:22Z",
- "query": "string",
- "type": "flux"
}
result,table,_start,_stop,_time,region,host,_value mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62
Retrieves a list of tasks.
To limit which tasks are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all tasks up to the default limit
.
after | string A task ID. Only returns tasks created after the specified task. |
limit | integer [ 1 .. 500 ] Default: 100 The maximum number of tasks to return.
Default is To reduce the payload size, combine |
name | string A task name. Only returns tasks with the specified name. Different tasks may have the same name. |
org | string An organization name. Only returns tasks owned by the specified organization. |
orgID | string An organization ID. Only returns tasks owned by the specified organization. |
status | string Enum: "active" "inactive" A task status.
Only returns tasks that have the specified status ( |
type | string Default: "" Enum: "basic" "system" A task type ( |
user | string A user ID. Only returns tasks owned by the specified user. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl https://localhost:8086/api/v2/tasks/?limit=-1&type=basic \ --header 'Content-Type: application/json' \ --header 'Authorization: Token INFLUX_API_TOKEN'
A sample response body for the ?type=basic
parameter.
type=basic
omits some task fields (createdAt
and updatedAt
)
and field values (org
, flux
) in the response.
{- "links": {
- "self": "/api/v2/tasks?limit=100"
}, - "tasks": [
- {
- "every": "30m",
- "flux": "",
- "id": "09956cbb6d378000",
- "labels": [ ],
- "lastRunStatus": "success",
- "latestCompleted": "2022-06-30T15:00:00Z",
- "links": {
- "labels": "/api/v2/tasks/09956cbb6d378000/labels",
- "logs": "/api/v2/tasks/09956cbb6d378000/logs",
- "members": "/api/v2/tasks/09956cbb6d378000/members",
- "owners": "/api/v2/tasks/09956cbb6d378000/owners",
- "runs": "/api/v2/tasks/09956cbb6d378000/runs",
- "self": "/api/v2/tasks/09956cbb6d378000"
}, - "name": "task1",
- "org": "",
- "orgID": "48c88459ee424a04",
- "ownerID": "0772396d1f411000",
- "status": "active"
}
]
}
Creates a task and returns the task.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The task to create.
description | string An optional description of the task. |
flux required | string The Flux script to run for this task. |
org | string The name of the organization that owns this Task. |
orgID | string The ID of the organization that owns this Task. |
status | string (TaskStatusType) Enum: "active" "inactive"
|
{- "description": "string",
- "flux": "string",
- "org": "string",
- "orgID": "string",
- "status": "active"
}
{- "authorizationID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "cron": "string",
- "description": "string",
- "every": "string",
- "flux": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/tasks/1/labels",
- "logs": "/api/v2/tasks/1/logs",
- "members": "/api/v2/tasks/1/members",
- "owners": "/api/v2/tasks/1/owners",
- "runs": "/api/v2/tasks/1/runs",
- "self": "/api/v2/tasks/1"
}, - "name": "string",
- "offset": "string",
- "org": "string",
- "orgID": "string",
- "ownerID": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Retrieves a task.
taskID required | string The ID of the task to retrieve. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "authorizationID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "cron": "string",
- "description": "string",
- "every": "string",
- "flux": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/tasks/1/labels",
- "logs": "/api/v2/tasks/1/logs",
- "members": "/api/v2/tasks/1/members",
- "owners": "/api/v2/tasks/1/owners",
- "runs": "/api/v2/tasks/1/runs",
- "self": "/api/v2/tasks/1"
}, - "name": "string",
- "offset": "string",
- "org": "string",
- "orgID": "string",
- "ownerID": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Schedules a task run to start immediately, ignoring scheduled runs.
Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks.
To retry a previous run (and avoid creating a new run),
use the POST /api/v2/tasks/{taskID}/runs/{runID}/retry
endpoint.
taskID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
scheduledFor | string or null <date-time> The time RFC3339 date/time format
used for the run's |
{- "scheduledFor": "2019-08-24T14:15:22Z"
}
{- "finishedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "flux": "string",
- "id": "string",
- "links": {
- "retry": "/api/v2/tasks/1/runs/1/retry",
- "self": "/api/v2/tasks/1/runs/1",
- "task": "/api/v2/tasks/1"
}, - "log": [
- {
- "message": "Halt and catch fire",
- "runID": "string",
- "time": "2006-01-02T15:04:05.999999999Z07:00"
}
], - "requestedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "scheduledFor": "2019-08-24T14:15:22Z",
- "startedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "status": "scheduled",
- "taskID": "string"
}
Writes data to a bucket.
Use this endpoint to send data in line protocol format to InfluxDB.
Does the following when you send a write request:
2xx
status code); error otherwise.To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
wait for a success response (HTTP 2xx
status code) before you send the next request.
Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response.
2xx
status code;
otherwise, returns the first line that failed.write-buckets
or write-bucket BUCKET_ID
.
BUCKET_ID
is the ID of the destination bucket.
write
rate limits apply.
For more information, see limits and adjustable quotas.
bucket required | string A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. |
org required | string An organization name or ID. InfluxDB Cloud
InfluxDB OSS
|
orgID | string An organization ID. InfluxDB Cloud
InfluxDB OSS
|
precision | string (WritePrecision) Enum: "ms" "s" "us" "ns" The precision for unix timestamps in the line protocol batch. |
Accept | string Default: application/json Value: "application/json" The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. InfluxDB Cloud
InfluxDB OSS
Related guides |
Content-Encoding | string Default: identity Enum: "gzip" "identity" The compression applied to the line protocol in the request payload.
To send a gzip payload, pass |
Content-Length | integer The size of the entity-body, in bytes, sent to InfluxDB.
If the length is greater than the |
Content-Type | string Default: text/plain; charset=utf-8 Enum: "text/plain" "text/plain; charset=utf-8" The format of the data in the request body.
To send a line protocol payload, pass |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
In the request body, provide data in line protocol format.
To send compressed data, do the following:
Content-Encoding: gzip
header.airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000 airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
{- "code": "invalid",
- "message": "partial write error (2 written): unable to parse 'air_sensor,service=S1,sensor=L1 temperature=\"90.5\",humidity=70.0 1632850122': schema: field type for field \"temperature\" not permitted by schema; got String but expected Float"
}
Lists authorizations.
To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations.
GET /api/v2/authorizations
responses;
returns token: redacted
for all authorizations.To retrieve an authorization, the request must use an API token that has the following permissions:
read-authorizations
read-user
for the user that the authorization is scoped toorg | string An organization name. Only returns authorizations that belong to the specified organization. |
orgID | string An organization ID. Only returns authorizations that belong to the specified organization. |
token | string An API token value.
Specifies an authorization by its InfluxDB OSS
Limitations
|
user | string A user name. Only returns authorizations scoped to the specified user. |
userID | string A user ID. Only returns authorizations scoped to the specified user. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "authorizations": [
- {
- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
],
}
Creates an authorization and returns the authorization with the generated API token.
Use this endpoint to create an authorization, which generates an API token
with permissions to read
or write
to a specific resource or type
of resource.
The API token is the authorization's token
property value.
To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens.
We recommend the following for managing your tokens:
write-authorizations
write-user
for the user that the authorization is scoped toZap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The authorization to create.
description | string A description of the token. |
orgID required | string An organization ID. Specifies the organization that owns the authorization. |
required | Array of objects (Permission) non-empty A list of permissions for an authorization.
In the list, provide at least one In a |
status | string Default: "active" Enum: "active" "inactive" Status of the token. If |
userID | string A user ID. Specifies the user that the authorization is scoped to. When a user authenticates with username and password, InfluxDB generates a user session with all the permissions specified by all the user's authorizations. |
Creates an authorization.
{- "description": "iot_users read buckets",
- "orgID": "INFLUX_ORG_ID",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "type": "buckets"
}
}
]
}
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
Deletes an authorization.
Use the endpoint to delete an API token.
If you want to disable an API token instead of delete it,
update the authorization's status to inactive
.
authID required | string An authorization ID. Specifies the authorization to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "invalid",
- "message": "id must have a length of 16 bytes"
}
Retrieves an authorization.
Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to.
authID required | string An authorization ID. Specifies the authorization to retrieve. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
Updates an authorization.
Use this endpoint to set an API token's status to be active or inactive. InfluxDB rejects requests that use inactive API tokens.
authID required | string An authorization ID. Specifies the authorization to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
In the request body, provide the authorization properties to update.
description | string A description of the token. |
status | string Default: "active" Enum: "active" "inactive" Status of the token. If |
{- "description": "string",
- "status": "active"
}
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
Lists organizations.
To limit which organizations are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all organizations up to the default limit
.
descending | boolean Default: false |
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
org | string An organization name. Only returns the specified organization. |
orgID | string An organization ID. Only returns the specified organization. |
userID | string A user ID. Only returns organizations where the specified user is a member or owner. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/orgs"
}, - "orgs": [
- {
- "createdAt": "2022-07-17T23:00:30.778487Z",
- "description": "Example InfluxDB organization",
- "id": "INFLUX_ORG_ID",
- "links": {
- "buckets": "/api/v2/buckets?org=INFLUX_ORG",
- "dashboards": "/api/v2/dashboards?org=INFLUX_ORG",
- "labels": "/api/v2/orgs/INFLUX_ORG_ID/labels",
- "logs": "/api/v2/orgs/INFLUX_ORG_ID/logs",
- "members": "/api/v2/orgs/INFLUX_ORG_ID/members",
- "owners": "/api/v2/orgs/INFLUX_ORG_ID/owners",
- "secrets": "/api/v2/orgs/INFLUX_ORG_ID/secrets",
- "self": "/api/v2/orgs/INFLUX_ORG_ID",
- "tasks": "/api/v2/tasks?org=InfluxData"
}, - "name": "INFLUX_ORG",
- "updatedAt": "2022-07-17T23:00:30.778487Z"
}
]
}
Retrieves an organization.
Use this endpoint to retrieve information for a specific organization.
orgID required | string The ID of the organization to retrieve. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "createdAt": "2019-08-24T14:15:22Z",
- "defaultStorageType": "tsm",
- "description": "string",
- "id": "string",
- "links": {
- "buckets": "/api/v2/buckets?org=myorg",
- "dashboards": "/api/v2/dashboards?org=myorg",
- "labels": "/api/v2/orgs/1/labels",
- "members": "/api/v2/orgs/1/members",
- "owners": "/api/v2/orgs/1/owners",
- "secrets": "/api/v2/orgs/1/secrets",
- "self": "/api/v2/orgs/1",
- "tasks": "/api/v2/tasks?org=myorg"
}, - "name": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Lists all users that belong to an organization.
InfluxDB users have permission to access InfluxDB.
Members are users within the organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to retrieve
members for.
orgID required | string The ID of the organization to retrieve users for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/orgs/055aa4783aa38398/members"
}, - "users": [
- {
- "id": "791df274afd48a83",
- "links": {
- "self": "/api/v2/users/791df274afd48a83"
}, - "name": "example_user_1",
- "role": "member",
- "status": "active"
}, - {
- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_2",
- "role": "owner",
- "status": "active"
}
]
}
Removes a member from an organization.
Use this endpoint to remove a user's member privileges for an organization.
Removing member privileges removes the user's read
and write
permissions
from the organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to remove an
owner from.
orgID required | string The ID of the organization to remove a user from. |
userID required | string The ID of the user to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "unauthorized",
- "message": "unauthorized access"
}
Lists all owners of an organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to retrieve a
list of owners from.
orgID required | string The ID of the organization to list owners for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/orgs/055aa4783aa38398/owners"
}, - "users": [
- {
- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_2",
- "role": "owner",
- "status": "active"
}
]
}
Removes an owner from the organization.
Organization owners have permission to delete organizations and remove user and member permissions from the organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to
remove an owner from.
orgID required | string The ID of the organization to remove an owner from. |
userID required | string The ID of the user to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "unauthorized",
- "message": "unauthorized access"
}
orgID required | string The organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "secrets": [
- "string"
], - "links": {
- "org": "string",
- "self": "string"
}
}
orgID required | string The organization ID. |
secretID required | string The secret ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
orgID required | string The organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Secret key to delete
secrets | Array of strings |
{- "secrets": [
- "string"
]
}
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Authenticates Basic authentication credentials for a user, and then, if successful, generates a user session.
To authenticate a user, pass the HTTP Authorization
header with the
Basic
scheme and the base64-encoded username and password.
For syntax and more information, see Basic Authentication for
syntax and more information.
If authentication is successful, InfluxDB creates a new session for the user
and then returns the session cookie in the Set-Cookie
response header.
InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl --request POST http://localhost:8086/api/v2/signin \ --user "USERNAME:PASSWORD"
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Expires a user session specified by a session cookie.
Use this endpoint to expire a user session that was generated when the user
authenticated with the InfluxDB Developer Console (UI) or the POST /api/v2/signin
endpoint.
For example, the POST /api/v2/signout
endpoint represents the third step
in the following three-step process
to authenticate a user, retrieve the user
resource, and then expire the session:
POST /api/v2/signin
endpoint to create a user session and
generate a session cookie.GET /api/v2/me
endpoint, passing the stored session cookie
from step 1 to retrieve user information.POST /api/v2/signout
endpoint, passing the stored session
cookie to expire the session.See the complete example in request samples.
InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance.
To learn more about cookies in HTTP requests, see Mozilla Developer Network (MDN) Web Docs, HTTP cookies.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# The following example shows how to use cURL and the InfluxDB API # to do the following: # 1. Sign in a user with a username and password. # 2. Check that the user session exists for the user. # 3. Sign out the user to expire the session. # 4. Check that the session is no longer active. # 1. Send a request to `POST /api/v2/signin` to sign in the user. # In your request, pass the following: # # - `--user` option with basic authentication credentials. # - `-c` option with a file path where cURL will write cookies. curl --request POST \ -c ./cookie-file.tmp \ "$INFLUX_URL/api/v2/signin" \ --user "${INFLUX_USER_NAME}:${INFLUX_USER_PASSWORD}" # 2. To check that a user session exists for the user in step 1, # send a request to `GET /api/v2/me`. # In your request, pass the `-b` option with the session cookie file path from step 1. curl --request GET \ -b ./cookie-file.tmp \ "$INFLUX_URL/api/v2/me" # InfluxDB responds with the `user` resource. # 3. Send a request to `POST /api/v2/signout` to expire the user session. # In your request, pass the `-b` option with the session cookie file path from step 1. curl --request POST \ -b ./cookie-file.tmp \ "$INFLUX_URL/api/v2/signout" # If the user session is successfully expired, InfluxDB responds with an HTTP `204` status code. # 4. To check that the user session is expired, call `GET /api/v2/me` again, # passing the `-b` option with the cookie file path. curl --request GET \ -b ./cookie-file.tmp \ "$INFLUX_URL/api/v2/me" # If the user session is expired, InfluxDB responds with an HTTP `401` status code.
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Lists users.
Default limit is 20
.
To limit which users are returned, pass query parameters in your request.
Action | Permission required | Restriction |
---|---|---|
List all users | Operator token | |
List a specific user | read-users or read-user USER_ID |
USER_ID
is the ID of the user that you want to retrieve.
after | string A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use |
id | string A user ID. Only lists the specified user. |
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
name | string A user name. Only lists the specified user. |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
]
}
userID required | string A user ID. Retrieves the specified user. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
Updates a user password.
userID required | string The ID of the user to set the password for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The new password to set for the user.
password required | string |
{- "password": "string"
}
{- "code": "invalid",
- "message": "passwords cannot be changed through the InfluxDB Cloud API"
}
Updates a user password.
Use this endpoint to let a user authenticate with Basic authentication credentials and set a new password.
userID required | string The ID of the user to set the password for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The new password to set for the user.
password required | string |
{- "password": "string"
}
{- "code": "invalid",
- "message": "passwords cannot be changed through the InfluxDB Cloud API"
}
Retrieves all the top level routes for the InfluxDB API.
"tasks":"/api/v2/tasks"
, and doesn't contain resource-specific routes
for tasks (/api/v2/tasks/TASK_ID/...
).Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "query": {
}, - "system": {
},
}
Returns the active runtime configuration of the InfluxDB instance.
In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "config": { }
}
Collects samples and returns reports for the following Go runtime profiles:
cpu
query parameter with a duration value.
Equivalent to the report from GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS
.cpu | string <duration> Collects and returns CPU profiling data for the specified duration. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Download and extract a `tar.gz` of all profiles after 10 seconds of CPU sampling. curl "http://localhost:8086/debug/pprof/all?cpu=10s" | tar -xz # x profiles/cpu.pb.gz # x profiles/goroutine.pb.gz # x profiles/block.pb.gz # x profiles/mutex.pb.gz # x profiles/heap.pb.gz # x profiles/allocs.pb.gz # x profiles/threadcreate.pb.gz # Analyze a profile. go tool pprof profiles/heap.pb.gz
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Returns a Go runtime profile report of all past memory allocations. allocs is the same as the heap profile, but changes the default pprof display to -alloc_space, the total number of bytes allocated since the program began (including garbage-collected bytes).
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/allocs # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N memory allocations. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects samples and returns a Go runtime profile report of stack traces that led to blocking on synchronization primitives.
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/block # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Returns the command line that invoked InfluxDB.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of all current goroutines.
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/goroutine # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of memory allocations for live objects.
To run garbage collection before sampling,
pass the gc
query parameter with a value of 1
.
debug | integer <int64> Enum: 0 1
|
gc | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/heap # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N memory-intensive nodes. (pprof) top10 # pprof displays the list: # Showing nodes accounting for 142.46MB, 85.43% of 166.75MB total # Dropped 895 nodes (cum <= 0.83MB) # Showing top 10 nodes out of 143
Collects statistics and returns a Go runtime profile report of lock contentions. The profile contains stack traces of holders of contended mutual exclusions (mutexes).
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/mutex # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of program counters on the executing stack.
seconds | string <int64> Number of seconds to collect profile data. Default is |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Download the profile report. curl http://localhost:8086/debug/pprof/profile -o cpu # Analyze the profile in interactive mode. go tool pprof ./cpu # At the prompt, get the top N functions most often running # or waiting during the sample period. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of stack traces that led to the creation of new OS threads.
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/threadcreate # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
Collects profile data and returns trace execution events for the current program.
seconds | string <int64> Number of seconds to collect profile data. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Download the trace file. curl http://localhost:8086/debug/pprof/trace -o trace # Analyze the trace. go tool trace ./trace
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Returns the health of the instance.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "checks": [
- { }
], - "commit": "string",
- "message": "string",
- "name": "string",
- "status": "pass",
- "version": "string"
}
Returns metrics about the workload performance of an InfluxDB instance.
Use this endpoint to get performance, resource, and usage metrics.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# HELP go_threads Number of OS threads created. # TYPE go_threads gauge go_threads 19 # HELP http_api_request_duration_seconds Time taken to respond to HTTP request # TYPE http_api_request_duration_seconds histogram http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.005"} 4 http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.01"} 4 http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.025"} 5
Retrieves the status and InfluxDB version of the instance.
Use this endpoint to monitor uptime for the InfluxDB instance. The response
returns a HTTP 204
status code to inform you the instance is available.
X-Influxdb-Version
in the headers.curl --request GET "http://localhost:8086/ping"
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "started": "2019-03-13T10:09:33.891196-04:00",
- "status": "ready",
- "up": "14m45.911966424s"
}
Create and manage authorizations (API tokens).
An authorization contains a list of read
and write
permissions for organization resources and provides an API token for authentication.
An authorization belongs to an organization and only contains permissions for that organization.
We recommend creating a generic user to create and manage tokens for writing data.
Optionally, when creating an authorization, you can scope it to a specific user.
If a user signs in with username and password, creating a user session,
the session carries the permissions granted by all the user's authorizations.
For more information, see how to assign a token to a specific user.
To create a user session, use the POST /api/v2/signin
endpoint.
Lists authorizations.
To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations.
GET /api/v2/authorizations
responses;
returns token: redacted
for all authorizations.To retrieve an authorization, the request must use an API token that has the following permissions:
read-authorizations
read-user
for the user that the authorization is scoped toorg | string An organization name. Only returns authorizations that belong to the specified organization. |
orgID | string An organization ID. Only returns authorizations that belong to the specified organization. |
token | string An API token value.
Specifies an authorization by its InfluxDB OSS
Limitations
|
user | string A user name. Only returns authorizations scoped to the specified user. |
userID | string A user ID. Only returns authorizations scoped to the specified user. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "authorizations": [
- {
- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
],
}
Creates an authorization and returns the authorization with the generated API token.
Use this endpoint to create an authorization, which generates an API token
with permissions to read
or write
to a specific resource or type
of resource.
The API token is the authorization's token
property value.
To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens.
We recommend the following for managing your tokens:
write-authorizations
write-user
for the user that the authorization is scoped toZap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The authorization to create.
description | string A description of the token. |
orgID required | string An organization ID. Specifies the organization that owns the authorization. |
required | Array of objects (Permission) non-empty A list of permissions for an authorization.
In the list, provide at least one In a |
status | string Default: "active" Enum: "active" "inactive" Status of the token. If |
userID | string A user ID. Specifies the user that the authorization is scoped to. When a user authenticates with username and password, InfluxDB generates a user session with all the permissions specified by all the user's authorizations. |
Creates an authorization.
{- "description": "iot_users read buckets",
- "orgID": "INFLUX_ORG_ID",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "type": "buckets"
}
}
]
}
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
Deletes an authorization.
Use the endpoint to delete an API token.
If you want to disable an API token instead of delete it,
update the authorization's status to inactive
.
authID required | string An authorization ID. Specifies the authorization to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "invalid",
- "message": "id must have a length of 16 bytes"
}
Retrieves an authorization.
Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to.
authID required | string An authorization ID. Specifies the authorization to retrieve. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
Updates an authorization.
Use this endpoint to set an API token's status to be active or inactive. InfluxDB rejects requests that use inactive API tokens.
authID required | string An authorization ID. Specifies the authorization to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
In the request body, provide the authorization properties to update.
description | string A description of the token. |
status | string Default: "active" Enum: "active" "inactive" Status of the token. If |
{- "description": "string",
- "status": "active"
}
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
Retrieves a snapshot of metadata stored in the server's embedded KV store. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL; avoid using this endpoint with versions greater than 2.1.x.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Accept-Encoding | string Default: identity Enum: "gzip" "identity" Indicates the content encoding (usually a compression algorithm) that the client can understand. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
shardID required | integer <int64> The shard ID. |
since | string <date-time> Examples:
The earliest time RFC3339 date/time format to include in the snapshot. |
Accept-Encoding | string Default: identity Enum: "gzip" "identity" Indicates the content encoding (usually a compression algorithm) that the client can understand. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Store your data in InfluxDB buckets. A bucket is a named location where time series data is stored. All buckets have a retention period, a duration of time that each data point persists. InfluxDB drops all points with timestamps older than the bucket’s retention period. A bucket belongs to an organization.
Lists buckets.
InfluxDB retrieves buckets owned by the
organization
associated with the authorization
(API token).
To limit which buckets are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all buckets up to the
default limit
.
org
parameter or the orgID
parameter to specify the organization.Action | Permission required |
---|---|
Retrieve user buckets | read-buckets |
Retrieve system buckets | read-orgs |
after | string A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use |
id | string A bucket ID. Only returns the bucket with the specified ID. |
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
name | string A bucket name. Only returns buckets with the specified name. |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
org | string An organization name. InfluxDB Cloud
InfluxDB OSS
|
orgID | string An organization ID. InfluxDB Cloud
InfluxDB OSS
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl --request GET "http://localhost:8086/api/v2/buckets?name=_monitoring" \ --header "Authorization: Token INFLUX_TOKEN" \ --header "Accept: application/json" \ --header "Content-Type: application/json"
{- "buckets": [
- {
- "createdAt": "2022-03-15T17:22:33.72617939Z",
- "description": "System bucket for monitoring logs",
- "id": "77ca9dace40a9bfc",
- "labels": [ ],
- "links": {
- "labels": "/api/v2/buckets/77ca9dace40a9bfc/labels",
- "members": "/api/v2/buckets/77ca9dace40a9bfc/members",
- "org": "/api/v2/orgs/INFLUX_ORG_ID",
- "owners": "/api/v2/buckets/77ca9dace40a9bfc/owners",
- "self": "/api/v2/buckets/77ca9dace40a9bfc",
- "write": "/api/v2/write?org=ORG_ID&bucket=77ca9dace40a9bfc"
}, - "name": "_monitoring",
- "orgID": "INFLUX_ORG_ID",
- "retentionRules": [
- {
- "everySeconds": 604800,
- "type": "expire"
}
], - "schemaType": "implicit",
- "type": "system",
- "updatedAt": "2022-03-15T17:22:33.726179487Z"
}
], - "links": {
- "self": "/api/v2/buckets?descending=false&limit=20&name=_monitoring&offset=0&orgID=ORG_ID"
}
}
Creates a bucket and returns the bucket resource. The default data retention period is 30 days.
403
status code.
For additional information regarding InfluxDB Cloud offerings, see
InfluxDB Cloud Pricing.Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The bucket to create.
description | string A description of the bucket. |
name required | string The bucket name. |
orgID required | string The organization ID. Specifies the organization that owns the bucket. |
Array of objects (RetentionRules) Retention rules to expire or retain data.
The InfluxDB InfluxDB Cloud
InfluxDB OSS
| |
rp | string Default: "0" The retention policy for the bucket. For InfluxDB 1.x, specifies the duration of time that each data point in the retention policy persists. If you need compatibility with InfluxDB 1.x, specify a value for the Retention policy
is an InfluxDB 1.x concept.
The InfluxDB 2.x and Cloud equivalent is
retention period.
The InfluxDB |
schemaType | string (SchemaType) Enum: "implicit" "explicit" |
{- "description": "string",
- "name": "string",
- "orgID": "string",
- "retentionRules": [
- {
- "everySeconds": 86400,
- "shardGroupDurationSeconds": 0,
- "type": "expire"
}
], - "rp": "0",
- "schemaType": "implicit"
}
{- "createdAt": "2022-08-03T23:04:41.073704121Z",
- "description": "A bucket holding air sensor data",
- "id": "37407e232b3911d8",
- "labels": [ ],
- "links": {
- "labels": "/api/v2/buckets/37407e232b3911d8/labels",
- "members": "/api/v2/buckets/37407e232b3911d8/members",
- "org": "/api/v2/orgs/INFLUX_ORG_ID",
- "owners": "/api/v2/buckets/37407e232b3911d8/owners",
- "self": "/api/v2/buckets/37407e232b3911d8",
- "write": "/api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8"
}, - "name": "air_sensor",
- "orgID": "INFLUX_ORG_ID",
- "retentionRules": [
- {
- "everySeconds": 2592000,
- "type": "expire"
}
], - "schemaType": "implicit",
- "type": "user",
- "updatedAt": "2022-08-03T23:04:41.073704228Z"
}
Deletes a bucket and all associated records.
Does the following when you send a delete request:
204
status code if queued; error otherwise.bucketID required | string Bucket ID. The ID of the bucket to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl --request DELETE "http://localhost:8086/api/v2/buckets/BUCKET_ID" \ --header "Authorization: Token INFLUX_TOKEN" \ --header 'Accept: application/json'
{- "code": "invalid",
- "message": "id must have a length of 16 bytes"
}
Retrieves a bucket.
Use this endpoint to retrieve information for a specific bucket.
bucketID required | string The ID of the bucket to retrieve. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "createdAt": "2022-08-03T23:04:41.073704121Z",
- "description": "bucket for air sensor data",
- "id": "37407e232b3911d8",
- "labels": [ ],
- "links": {
- "labels": "/api/v2/buckets/37407e232b3911d8/labels",
- "members": "/api/v2/buckets/37407e232b3911d8/members",
- "org": "/api/v2/orgs/INFLUX_ORG_ID",
- "owners": "/api/v2/buckets/37407e232b3911d8/owners",
- "self": "/api/v2/buckets/37407e232b3911d8",
- "write": "/api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8"
}, - "name": "air-sensor",
- "orgID": "bea7ea952287f70d",
- "retentionRules": [
- {
- "everySeconds": 2592000,
- "type": "expire"
}
], - "schemaType": "implicit",
- "type": "user",
- "updatedAt": "2022-08-03T23:04:41.073704228Z"
}
Updates a bucket.
Use this endpoint to update properties
(name
, description
, and retentionRules
) of a bucket.
retentionRules
property in the request body. If you don't
provide retentionRules
, InfluxDB responds with an HTTP 403
status code.retentionRules
.bucketID required | string The bucket ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The bucket update to apply.
description | string A description of the bucket. |
name | string The name of the bucket. |
Array of objects (PatchRetentionRules) Updates to rules to expire or retain data. No rules means no updates. |
{- "description": "string",
- "name": "string",
- "retentionRules": [
- {
- "everySeconds": 86400,
- "shardGroupDurationSeconds": 0,
- "type": "expire"
}
]
}
{- "createdAt": "2022-08-03T23:04:41.073704121Z",
- "description": "bucket holding air sensor data",
- "id": "37407e232b3911d8",
- "labels": [ ],
- "links": {
- "labels": "/api/v2/buckets/37407e232b3911d8/labels",
- "members": "/api/v2/buckets/37407e232b3911d8/members",
- "org": "/api/v2/orgs/INFLUX_ORG_ID",
- "owners": "/api/v2/buckets/37407e232b3911d8/owners",
- "self": "/api/v2/buckets/37407e232b3911d8",
- "write": "/api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8"
}, - "name": "air_sensor",
- "orgID": "INFLUX_ORG_ID",
- "retentionRules": [
- {
- "everySeconds": 2592000,
- "type": "expire"
}
], - "schemaType": "implicit",
- "type": "user",
- "updatedAt": "2022-08-07T22:49:49.422962913Z"
}
Lists all labels for a bucket.
Labels are objects that contain labelID
, name
, description
, and color
key-value pairs. They may be used for grouping and filtering InfluxDB
resources.
Labels are also capable of grouping across different resources--for example,
you can apply a label named air_sensor
to a bucket and a task to quickly
organize resources.
/api/v2/labels
InfluxDB API endpoint to retrieve and manage labels.bucketID required | string The ID of the bucket to retrieve labels for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "09cbd068e7ebb000",
- "name": "production_buckets",
- "orgID": "INFLUX_ORG_ID"
}
], - "links": {
- "self": "/api/v2/labels"
}
}
Adds a label to a bucket and returns the new label information.
Labels are objects that contain labelID
, name
, description
, and color
key-value pairs. They may be used for grouping and filtering across one or
more kinds of resources--for example, you can apply a label named
air_sensor
to a bucket and a task to quickly organize resources.
POST
request to the /api/v2/labels
endpoint)./api/v2/labels
InfluxDB API endpoint to retrieve and manage labels.bucketID required | string Bucket ID. The ID of the bucket to label. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
An object that contains a labelID
to add to the bucket.
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "09cbd068e7ebb000",
- "name": "production_buckets",
- "orgID": "INFLUX_ORG_ID"
}, - "links": {
- "self": "/api/v2/labels"
}
}
bucketID required | string The bucket ID. |
labelID required | string The ID of the label to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
bucketID required | string The ID of the bucket to retrieve users for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/buckets/37407e232b3911d8/members"
}, - "users": [
- {
- "id": "791df274afd48a83",
- "links": {
- "self": "/api/v2/users/791df274afd48a83"
}, - "name": "example_user_1",
- "role": "member",
- "status": "active"
}, - {
- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_2",
- "role": "owner",
- "status": "active"
}
]
}
bucketID required | string The ID of the bucket to retrieve users for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
A user to add as a member to the bucket.
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_1",
- "role": "member",
- "status": "active"
}
Removes a member from a bucket.
Use this endpoint to remove a user's member privileges from a bucket. This
removes the user's read
and write
permissions for the bucket.
bucketID required | string The ID of the bucket to remove a user from. |
userID required | string The ID of the user to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "unauthorized",
- "message": "unauthorized access"
}
Lists all owners of a bucket.
Bucket owners have permission to delete buckets and remove user and member permissions from the bucket.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to retrieve a
list of owners for.
bucketID required | string The ID of the bucket to retrieve owners for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/buckets/BUCKET_ID/owners"
}, - "users": [
- {
- "id": "d88d182d91b0950f",
- "links": {
- "self": "/api/v2/users/d88d182d91b0950f"
}, - "name": "example-owner",
- "role": "owner",
- "status": "active"
}
]
}
Adds an owner to a bucket and returns the owners with role and user detail.
Use this endpoint to create a resource owner for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
* is the ID of the organization that you want to add
an owner for.bucketID required | string The ID of the bucket to add an owner for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
A user to add as an owner for the bucket.
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "d88d182d91b0950f",
- "links": {
- "self": "/api/v2/users/d88d182d91b0950f"
}, - "name": "example-user",
- "role": "owner",
- "status": "active"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
Removes an owner from a bucket.
Use this endpoint to remove a user's owner
role for a bucket.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to remove an owner
from.
bucketID required | string The ID of the bucket to remove an owner from. |
userID required | string The ID of the owner to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "unauthorized",
- "message": "unauthorized access"
}
sourceID required | string The source ID. |
org | string The name of the organization. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "buckets": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/buckets/1/labels",
- "members": "/api/v2/buckets/1/members",
- "org": "/api/v2/orgs/2",
- "owners": "/api/v2/buckets/1/owners",
- "self": "/api/v2/buckets/1",
- "write": "/api/v2/write?org=2&bucket=1"
}, - "name": "string",
- "orgID": "string",
- "retentionRules": [
- {
- "everySeconds": 86400,
- "shardGroupDurationSeconds": 0,
- "type": "expire"
}
], - "rp": "string",
- "schemaType": "implicit",
- "type": "user",
- "updatedAt": "2019-08-24T14:15:22Z"
}
],
}
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Cell that will be added
h | integer <int32> |
name | string |
usingView | string Makes a copy of the provided view. |
w | integer <int32> |
x | integer <int32> |
y | integer <int32> |
{- "h": 0,
- "name": "string",
- "usingView": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
{- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
h | integer <int32> |
id | string |
object | |
viewID | string The reference to a view from the views API. |
w | integer <int32> |
x | integer <int32> |
y | integer <int32> |
[- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
]
{- "description": "string",
- "name": "string",
- "orgID": "string",
- "cells": [
- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
], - "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "cells": "/api/v2/dashboards/1/cells",
- "labels": "/api/v2/dashboards/1/labels",
- "members": "/api/v2/dashboards/1/members",
- "org": "/api/v2/labels/1",
- "owners": "/api/v2/dashboards/1/owners",
- "self": "/api/v2/dashboards/1"
}, - "meta": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
cellID required | string The ID of the cell to delete. |
dashboardID required | string The ID of the dashboard to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
cellID required | string The ID of the cell to update. |
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
h | integer <int32> |
w | integer <int32> |
x | integer <int32> |
y | integer <int32> |
{- "h": 0,
- "w": 0,
- "x": 0,
- "y": 0
}
{- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
cellID required | string The cell ID. |
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "id": "string",
- "links": {
- "self": "string"
}, - "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
cellID required | string The ID of the cell to update. |
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
name required | string |
required | LinePlusSingleStatProperties (object) or XYViewProperties (object) or SingleStatViewProperties (object) or HistogramViewProperties (object) or GaugeViewProperties (object) or TableViewProperties (object) or SimpleTableViewProperties (object) or MarkdownViewProperties (object) or CheckViewProperties (object) or ScatterViewProperties (object) or HeatmapViewProperties (object) or MosaicViewProperties (object) or BandViewProperties (object) or GeoViewProperties (object) (ViewProperties) |
{- "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
{- "id": "string",
- "links": {
- "self": "string"
}, - "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
orgID required | string Only show checks that belong to a specific organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "checks": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "every": "string",
- "level": "UNKNOWN",
- "offset": "string",
- "reportZero": true,
- "staleTime": "string",
- "statusMessageTemplate": "string",
- "tags": [
- {
- "key": "string",
- "value": "string"
}
], - "timeSince": "string",
- "type": "deadman"
}
],
}
Check to create
description | string An optional description of the check. |
Array of objects (Labels) | |
name required | string |
orgID required | string The ID of the organization that owns this check. |
required | object (DashboardQuery) |
status | string (TaskStatusType) Enum: "active" "inactive"
|
taskID | string The ID of the task associated with this check. |
type required | string custom PostCheck Check threshold deadman custom |
{- "description": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "type": "custom"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "custom"
}
checkID required | string The check ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
checkID required | string The check ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "custom"
}
checkID required | string The check ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Check update to apply
description | string |
name | string |
status | string Enum: "active" "inactive" |
{- "description": "string",
- "name": "string",
- "status": "active"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "custom"
}
checkID required | string The check ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Check update to apply
description | string An optional description of the check. |
Array of objects (Labels) | |
name required | string |
orgID required | string The ID of the organization that owns this check. |
required | object (DashboardQuery) |
status | string (TaskStatusType) Enum: "active" "inactive"
|
taskID | string The ID of the task associated with this check. |
type required | string custom PostCheck Check threshold deadman custom |
{- "description": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "type": "custom"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "custom"
}
checkID required | string The check ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
checkID required | string The check ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Label to add
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
checkID required | string The check ID. |
labelID required | string The ID of the label to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Returns the active runtime configuration of the InfluxDB instance.
In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "config": { }
}
Retrieves the feature flag key-value pairs configured for the InfluxDB instance. Feature flags are configuration options used to develop and test experimental InfluxDB features and are intended for internal use only.
This endpoint represents the first step in the following three-step process to configure feature flags:
Use token authentication or a user session with this endpoint to retrieve feature flags and their values.
Follow the instructions to enable, disable, or override values for feature flags.
Optional: To confirm that your change is applied, do one of the following:
GET /api/v2/config
endpoint to retrieve the
current runtime server configuration.Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{ }
descending | boolean Default: false |
id | Array of strings A list of dashboard IDs.
Returns only the specified dashboards.
If you specify |
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
org | string An organization name. Only returns dashboards that belong to the specified organization. |
orgID | string An organization ID. Only returns dashboards that belong to the specified organization. |
owner | string A user ID. Only returns dashboards where the specified user has the |
sortBy | string Enum: "ID" "CreatedAt" "UpdatedAt" The column to sort by. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "dashboards": [
- {
- "description": "string",
- "name": "string",
- "orgID": "string",
- "cells": [
- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
], - "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "cells": "/api/v2/dashboards/1/cells",
- "labels": "/api/v2/dashboards/1/labels",
- "members": "/api/v2/dashboards/1/members",
- "org": "/api/v2/labels/1",
- "owners": "/api/v2/dashboards/1/owners",
- "self": "/api/v2/dashboards/1"
}, - "meta": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
],
}
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Dashboard to create
description | string The user-facing description of the dashboard. |
name required | string The user-facing name of the dashboard. |
orgID required | string The ID of the organization that owns the dashboard. |
{- "description": "string",
- "name": "string",
- "orgID": "string"
}
{- "description": "string",
- "name": "string",
- "orgID": "string",
- "cells": [
- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
], - "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "cells": "/api/v2/dashboards/1/cells",
- "labels": "/api/v2/dashboards/1/labels",
- "members": "/api/v2/dashboards/1/members",
- "org": "/api/v2/labels/1",
- "owners": "/api/v2/dashboards/1/owners",
- "self": "/api/v2/dashboards/1"
}, - "meta": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
dashboardID required | string The ID of the dashboard to update. |
include | string Value: "properties" If |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "description": "string",
- "name": "string",
- "orgID": "string",
- "cells": [
- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
], - "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "cells": "/api/v2/dashboards/1/cells",
- "labels": "/api/v2/dashboards/1/labels",
- "members": "/api/v2/dashboards/1/members",
- "org": "/api/v2/labels/1",
- "owners": "/api/v2/dashboards/1/owners",
- "self": "/api/v2/dashboards/1"
}, - "meta": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Patching of a dashboard
object (schemas) | |
description | string optional, when provided will replace the description |
name | string optional, when provided will replace the name |
{- "cells": {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0,
- "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}, - "description": "string",
- "name": "string"
}
{- "description": "string",
- "name": "string",
- "orgID": "string",
- "cells": [
- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
], - "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "cells": "/api/v2/dashboards/1/cells",
- "labels": "/api/v2/dashboards/1/labels",
- "members": "/api/v2/dashboards/1/members",
- "org": "/api/v2/labels/1",
- "owners": "/api/v2/dashboards/1/owners",
- "self": "/api/v2/dashboards/1"
}, - "meta": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Cell that will be added
h | integer <int32> |
name | string |
usingView | string Makes a copy of the provided view. |
w | integer <int32> |
x | integer <int32> |
y | integer <int32> |
{- "h": 0,
- "name": "string",
- "usingView": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
{- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
h | integer <int32> |
id | string |
object | |
viewID | string The reference to a view from the views API. |
w | integer <int32> |
x | integer <int32> |
y | integer <int32> |
[- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
]
{- "description": "string",
- "name": "string",
- "orgID": "string",
- "cells": [
- {
- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
], - "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "cells": "/api/v2/dashboards/1/cells",
- "labels": "/api/v2/dashboards/1/labels",
- "members": "/api/v2/dashboards/1/members",
- "org": "/api/v2/labels/1",
- "owners": "/api/v2/dashboards/1/owners",
- "self": "/api/v2/dashboards/1"
}, - "meta": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
cellID required | string The ID of the cell to delete. |
dashboardID required | string The ID of the dashboard to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
cellID required | string The ID of the cell to update. |
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
h | integer <int32> |
w | integer <int32> |
x | integer <int32> |
y | integer <int32> |
{- "h": 0,
- "w": 0,
- "x": 0,
- "y": 0
}
{- "h": 0,
- "id": "string",
- "links": {
- "self": "string",
- "view": "string"
}, - "viewID": "string",
- "w": 0,
- "x": 0,
- "y": 0
}
cellID required | string The cell ID. |
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "id": "string",
- "links": {
- "self": "string"
}, - "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
cellID required | string The ID of the cell to update. |
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
name required | string |
required | LinePlusSingleStatProperties (object) or XYViewProperties (object) or SingleStatViewProperties (object) or HistogramViewProperties (object) or GaugeViewProperties (object) or TableViewProperties (object) or SimpleTableViewProperties (object) or MarkdownViewProperties (object) or CheckViewProperties (object) or ScatterViewProperties (object) or HeatmapViewProperties (object) or MosaicViewProperties (object) or BandViewProperties (object) or GeoViewProperties (object) (ViewProperties) |
{- "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
{- "id": "string",
- "links": {
- "self": "string"
}, - "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Label to add
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
dashboardID required | string The dashboard ID. |
labelID required | string The ID of the label to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
]
}
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
User to add as member
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
dashboardID required | string The dashboard ID. |
userID required | string The ID of the member to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
]
}
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
User to add as owner
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
dashboardID required | string The dashboard ID. |
userID required | string The ID of the owner to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
The InfluxDB 1.x data model includes databases and retention policies. InfluxDB 2.x replaces databases and retention policies with buckets. To support InfluxDB 1.x query and write patterns in InfluxDB 2.x, databases and retention policies are mapped to buckets using the database and retention policy (DBRP) mapping service. The DBRP mapping service uses the database and retention policy specified in 1.x compatibility API requests to route operations to a bucket.
Lists database retention policy (DBRP) mappings.
bucketID | string A bucket ID. Only returns DBRP mappings that belong to the specified bucket. |
db | string A database. Only returns DBRP mappings that belong to the 1.x database. |
default | boolean Specifies filtering on default |
id | string A DBPR mapping ID. Only returns the specified DBRP mapping. |
org | string An organization name. Only returns DBRP mappings for the specified organization. |
orgID | string An organization ID. Only returns DBRP mappings for the specified organization. |
rp | string A retention policy. Specifies the 1.x retention policy to filter on. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "content": [
- {
- "bucketID": "4d4d9d5b61dee751",
- "database": "example_database_1",
- "default": true,
- "id": "0a3cbb5dd526a000",
- "orgID": "bea7ea952287f70d",
- "retention_policy": "autogen"
}, - {
- "bucketID": "4d4d9d5b61dee751",
- "database": "example_database_2",
- "default": false,
- "id": "0a3cbcde20e38000",
- "orgID": "bea7ea952287f70d",
- "retention_policy": "example_retention_policy"
}
]
}
Creates a database retention policy (DBRP) mapping and returns the mapping.
Use this endpoint to add InfluxDB 1.x API compatibility to your InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a DBRP mapping in order to query and write using the InfluxDB 1.x API. object.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The database retention policy mapping to add.
Note that retention_policy
is a required parameter in the request body.
The value of retention_policy
can be any arbitrary string
name or
value, with the default value commonly set as autogen
.
The value of retention_policy
isn't a retention_policy
bucketID required | string A bucket ID. Identifies the bucket used as the target for the translation. |
database required | string A database name. Identifies the InfluxDB v1 database. |
default | boolean Set to |
org | string An organization name. Identifies the organization that owns the mapping. |
orgID | string An organization ID. Identifies the organization that owns the mapping. |
retention_policy required | string A retention policy name. Identifies the InfluxDB v1 retention policy mapping. |
{- "bucketID": "string",
- "database": "string",
- "default": true,
- "org": "string",
- "orgID": "string",
- "retention_policy": "string"
}
{- "bucketID": "4d4d9d5b61dee751",
- "database": "example_database",
- "default": true,
- "id": "0a3cbb5dd526a000",
- "orgID": "bea7ea952287f70d",
- "retention_policy": "autogen"
}
Deletes the specified database retention policy (DBRP) mapping.
dbrpID required | string A DBRP mapping ID. Only returns the specified DBRP mapping. |
org | string An organization name. Specifies the organization that owns the DBRP mapping. |
orgID | string An organization ID. Specifies the organization that owns the DBRP mapping. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The query parameters contain invalid values.
{- "code": "invalid",
- "message": "invalid ID"
}
Retrieves the specified retention policy (DBRP) mapping.
dbrpID required | string A DBRP mapping ID. Specifies the DBRP mapping. |
org | string An organization name. Specifies the organization that owns the DBRP mapping. |
orgID | string An organization ID. Specifies the organization that owns the DBRP mapping. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "content": {
- "bucketID": "4d4d9d5b61dee751",
- "database": "example_database_1",
- "default": true,
- "id": "0a3cbb5dd526a000",
- "orgID": "bea7ea952287f70d",
- "retention_policy": "autogen"
}
}
dbrpID required | string A DBRP mapping ID. Specifies the DBRP mapping. |
org | string An organization name. Specifies the organization that owns the DBRP mapping. |
orgID | string An organization ID. Specifies the organization that owns the DBRP mapping. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Updates the database retention policy (DBRP) mapping and returns the mapping.
Use this endpoint to modify the retention policy (retention_policy
property) of a DBRP mapping.
default | boolean Set to |
retention_policy | string A retention policy name. Identifies the InfluxDB v1 retention policy mapping. |
{- "default": true,
- "retention_policy": "string"
}
{- "content": {
- "bucketID": "4d4d9d5b61dee751",
- "database": "example_database",
- "default": false,
- "id": "0a3cbb5dd526a000",
- "orgID": "bea7ea952287f70d",
- "retention_policy": "example_retention_policy"
}
}
Generate profiling and trace reports.
Use routes under /debug/pprof
to analyze the Go runtime of InfluxDB.
These endpoints generate Go runtime profiles
and trace reports.
Profiles are collections of stack traces that show call sequences
leading to instances of a particular event, such as allocation.
For more information about pprof profile and trace reports, see the following resources:
Collects samples and returns reports for the following Go runtime profiles:
cpu
query parameter with a duration value.
Equivalent to the report from GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS
.cpu | string <duration> Collects and returns CPU profiling data for the specified duration. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Download and extract a `tar.gz` of all profiles after 10 seconds of CPU sampling. curl "http://localhost:8086/debug/pprof/all?cpu=10s" | tar -xz # x profiles/cpu.pb.gz # x profiles/goroutine.pb.gz # x profiles/block.pb.gz # x profiles/mutex.pb.gz # x profiles/heap.pb.gz # x profiles/allocs.pb.gz # x profiles/threadcreate.pb.gz # Analyze a profile. go tool pprof profiles/heap.pb.gz
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Returns a Go runtime profile report of all past memory allocations. allocs is the same as the heap profile, but changes the default pprof display to -alloc_space, the total number of bytes allocated since the program began (including garbage-collected bytes).
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/allocs # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N memory allocations. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects samples and returns a Go runtime profile report of stack traces that led to blocking on synchronization primitives.
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/block # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Returns the command line that invoked InfluxDB.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of all current goroutines.
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/goroutine # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of memory allocations for live objects.
To run garbage collection before sampling,
pass the gc
query parameter with a value of 1
.
debug | integer <int64> Enum: 0 1
|
gc | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/heap # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N memory-intensive nodes. (pprof) top10 # pprof displays the list: # Showing nodes accounting for 142.46MB, 85.43% of 166.75MB total # Dropped 895 nodes (cum <= 0.83MB) # Showing top 10 nodes out of 143
Collects statistics and returns a Go runtime profile report of lock contentions. The profile contains stack traces of holders of contended mutual exclusions (mutexes).
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/mutex # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of program counters on the executing stack.
seconds | string <int64> Number of seconds to collect profile data. Default is |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Download the profile report. curl http://localhost:8086/debug/pprof/profile -o cpu # Analyze the profile in interactive mode. go tool pprof ./cpu # At the prompt, get the top N functions most often running # or waiting during the sample period. (pprof) top10
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Collects statistics and returns a Go runtime profile report of stack traces that led to the creation of new OS threads.
debug | integer <int64> Enum: 0 1
|
seconds | string <int64> Number of seconds to collect statistics.
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Analyze the profile in interactive mode. go tool pprof http://localhost:8086/debug/pprof/threadcreate # `pprof` returns the following prompt: # Entering interactive mode (type "help" for commands, "o" for options) # (pprof) # At the prompt, get the top N entries. (pprof) top10
Collects profile data and returns trace execution events for the current program.
seconds | string <int64> Number of seconds to collect profile data. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# Download the trace file. curl http://localhost:8086/debug/pprof/trace -o trace # Analyze the trace. go tool trace ./trace
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Deletes data from a bucket.
Use this endpoint to delete points from a bucket in a specified time range.
Does the following when you send a delete request:
2xx
status code); error otherwise.To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
wait for a success response (HTTP 2xx
status code) before you send the next request.
Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response.
write-buckets
or write-bucket BUCKET_ID
.BUCKET_ID
is the ID of the destination bucket.
write
rate limits apply.
For more information, see limits and adjustable quotas.
bucket | string A bucket name or ID.
Specifies the bucket to delete data from.
If you pass both |
bucketID | string A bucket ID.
Specifies the bucket to delete data from.
If you pass both |
org | string An organization name or ID. InfluxDB Cloud
InfluxDB OSS
|
orgID | string An organization ID. InfluxDB Cloud
InfluxDB OSS
|
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Time range parameters and an optional delete predicate expression.
To select points to delete within the specified time range, pass a
delete predicate expression in the predicate
property of the request body.
If you don't pass a predicate
, InfluxDB deletes all data with timestamps
in the specified time range.
predicate | string An expression in delete predicate syntax. |
start required | string <date-time> A timestamp (RFC3339 date/time format). The earliest time to delete from. |
stop required | string <date-time> A timestamp (RFC3339 date/time format). The latest time to delete from. |
{- "predicate": "tag1=\"value1\" and (tag2=\"value2\" and tag3!=\"value3\")",
- "start": "2019-08-24T14:15:22Z",
- "stop": "2019-08-24T14:15:22Z"
}
{- "code": "invalid",
- "message": "failed to decode request body: organization not found"
}
Returns the health of the instance.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "checks": [
- { }
], - "commit": "string",
- "message": "string",
- "name": "string",
- "status": "pass",
- "version": "string"
}
orgID | string The organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
The label to create.
name required | string |
orgID required | string |
object Key-value pairs associated with this label. To remove a property, send an update with an empty value ( |
{- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
labelID required | string The ID of the label to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "unauthorized",
- "message": "unauthorized access"
}
labelID required | string The ID of the label to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
labelID required | string The ID of the label to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
A label update.
name | string |
object |
{- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
authID | string An authorization ID. Returns the specified legacy authorization. |
org | string An organization name. Only returns legacy authorizations that belong to the specified organization. |
orgID | string An organization ID. Only returns legacy authorizations that belong to the specified organization. |
token | string An authorization name token. Only returns legacy authorizations with the specified name. |
user | string A user name. Only returns legacy authorizations scoped to the specified user. |
userID | string A user ID. Only returns legacy authorizations scoped to the specified user. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "authorizations": [
- {
- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
],
}
Creates a legacy authorization and returns the legacy authorization.
write-users USER_ID
if you pass the userID
property in the request body.USER_ID
is the ID of the user that you want to scope the authorization to.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The legacy authorization to create.
description | string A description of the token. |
orgID required | string The organization ID. Identifies the organization that the authorization is scoped to. |
required | Array of objects (Permission) non-empty The list of permissions that provide |
status | string Default: "active" Enum: "active" "inactive" Status of the token. If |
token | string The name that you provide for the authorization. |
userID | string The user ID. Identifies the user that the authorization is scoped to. |
{- "description": "string",
- "status": "active",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "userID": "string"
}
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
authID required | string The ID of the legacy authorization to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
authID required | string The ID of the legacy authorization to get. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
authID required | string The ID of the legacy authorization to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Legacy authorization to update
description | string A description of the token. |
status | string Default: "active" Enum: "active" "inactive" Status of the token. If |
{- "description": "string",
- "status": "active"
}
{- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}
authID required | string The ID of the legacy authorization to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
New password
password required | string |
{- "password": "string"
}
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Queries InfluxDB using InfluxQL.
db required | string The database to query data from. This is mapped to an InfluxDB bucket. For more information, see Database and retention policy mapping. |
epoch | string Enum: "ns" "u" "µ" "ms" "s" "m" "h" A unix timestamp precision. Formats timestamps as unix (epoch) timestamps the specified precision instead of RFC3339 timestamps with nanosecond precision. |
p | string The InfluxDB 1.x password to authenticate the request. |
q required | string The InfluxQL query to execute. To execute multiple queries, delimit queries with a semicolon ( |
rp | string The retention policy to query data from. This is mapped to an InfluxDB bucket. For more information, see Database and retention policy mapping. |
u | string The InfluxDB 1.x username to authenticate the request. |
Accept | string Default: application/json Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack" Media type that the client can understand. Note: With |
Accept-Encoding | string Default: identity Enum: "gzip" "identity" The content encoding (usually a compression algorithm) that the client can understand. |
Content-Type | string Value: "application/json" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
db required | string Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy. |
p | string The InfluxDB 1.x password to authenticate the request. |
precision | string Write precision. |
rp | string Retention policy name. |
u | string The InfluxDB 1.x username to authenticate the request. |
Content-Encoding | string Default: identity Enum: "gzip" "identity" When present, its value indicates to the database that compression is applied to the line protocol body. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Line protocol body
{- "code": "internal error",
- "err": "string",
- "line": 0,
- "message": "string",
- "op": "string"
}
Returns metrics about the workload performance of an InfluxDB instance.
Use this endpoint to get performance, resource, and usage metrics.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# HELP go_threads Number of OS threads created. # TYPE go_threads gauge go_threads 19 # HELP http_api_request_duration_seconds Time taken to respond to HTTP request # TYPE http_api_request_duration_seconds histogram http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.005"} 4 http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.01"} 4 http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.025"} 5
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
orgID required | string Only show notification endpoints that belong to specific organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "notificationEndpoints": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "slack",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "token": "string",
- "url": "string"
}
]
}
Notification endpoint to create
authMethod required | string Enum: "none" "basic" "bearer" |
contentTemplate | string |
description | string An optional description of the notification endpoint. |
object Customized headers. | |
id | string |
Array of objects (Labels) | |
method required | string Enum: "POST" "GET" "PUT" |
name required | string |
orgID | string |
password | string |
status | string Default: "active" Enum: "active" "inactive" The status of the endpoint. |
token | string |
type required | string (NotificationEndpointType) http PostNotificationEndpoint NotificationEndpoint slack pagerduty http telegram |
url required | string |
userID | string |
username | string |
{- "description": "string",
- "id": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "http",
- "userID": "string",
- "authMethod": "none",
- "contentTemplate": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "method": "POST",
- "password": "string",
- "token": "string",
- "url": "string",
- "username": "string"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "http",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "authMethod": "none",
- "contentTemplate": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "method": "POST",
- "password": "string",
- "token": "string",
- "url": "string",
- "username": "string"
}
endpointID required | string The notification endpoint ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
endpointID required | string The notification endpoint ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "http",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "authMethod": "none",
- "contentTemplate": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "method": "POST",
- "password": "string",
- "token": "string",
- "url": "string",
- "username": "string"
}
endpointID required | string The notification endpoint ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Check update to apply
description | string |
name | string |
status | string Enum: "active" "inactive" |
{- "description": "string",
- "name": "string",
- "status": "active"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "http",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "authMethod": "none",
- "contentTemplate": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "method": "POST",
- "password": "string",
- "token": "string",
- "url": "string",
- "username": "string"
}
endpointID required | string The notification endpoint ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
A new notification endpoint to replace the existing endpoint with
authMethod required | string Enum: "none" "basic" "bearer" |
contentTemplate | string |
description | string An optional description of the notification endpoint. |
object Customized headers. | |
id | string |
Array of objects (Labels) | |
method required | string Enum: "POST" "GET" "PUT" |
name required | string |
orgID | string |
password | string |
status | string Default: "active" Enum: "active" "inactive" The status of the endpoint. |
token | string |
type required | string (NotificationEndpointType) http PostNotificationEndpoint NotificationEndpoint slack pagerduty http telegram |
url required | string |
userID | string |
username | string |
{- "description": "string",
- "id": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "http",
- "userID": "string",
- "authMethod": "none",
- "contentTemplate": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "method": "POST",
- "password": "string",
- "token": "string",
- "url": "string",
- "username": "string"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "http",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "authMethod": "none",
- "contentTemplate": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "method": "POST",
- "password": "string",
- "token": "string",
- "url": "string",
- "username": "string"
}
endpointID required | string The notification endpoint ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
endpointID required | string The notification endpoint ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Label to add
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
endpointID required | string The notification endpoint ID. |
labelID required | string The ID of the label to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
checkID | string Only show notifications that belong to the specific check ID. |
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
orgID required | string Only show notification rules that belong to a specific organization ID. |
tag | string^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ Example: tag=env:prod Only return notification rules that "would match" statuses which contain the tag key value pairs provided. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "notificationRules": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "endpointID": "string",
- "every": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "limit": 0,
- "limitEvery": 0,
- "links": {
- "labels": "/api/v2/notificationRules/1/labels",
- "members": "/api/v2/notificationRules/1/members",
- "owners": "/api/v2/notificationRules/1/owners",
- "query": "/api/v2/notificationRules/1/query",
- "self": "/api/v2/notificationRules/1"
}, - "name": "string",
- "offset": "string",
- "orgID": "string",
- "ownerID": "string",
- "runbookLink": "string",
- "sleepUntil": "string",
- "status": "active",
- "statusRules": [
- {
- "count": 0,
- "currentLevel": "UNKNOWN",
- "period": "string",
- "previousLevel": "UNKNOWN"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "equal",
- "value": "string"
}
], - "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "channel": "string",
- "messageTemplate": "string",
- "type": "slack"
}
]
}
Notification rule to create
description | string An optional description of the notification rule. |
endpointID required | string |
every | string The notification repetition interval. |
Array of objects (Labels) | |
limit | integer Don't notify me more than |
limitEvery | integer Don't notify me more than |
name required | string Human-readable name describing the notification rule. |
offset | string Duration to delay after the schedule, before executing check. |
orgID required | string The ID of the organization that owns this notification rule. |
runbookLink | string |
sleepUntil | string |
status required | string (TaskStatusType) Enum: "active" "inactive"
|
required | Array of objects (StatusRule) non-empty List of status rules the notification rule attempts to match. |
Array of objects (TagRule) List of tag rules the notification rule attempts to match. | |
taskID | string The ID of the task associated with this notification rule. |
type required | string http PostNotificationRule NotificationRule telegram smtp slack pagerduty http |
url | string |
{- "description": "string",
- "endpointID": "string",
- "every": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "limit": 0,
- "limitEvery": 0,
- "name": "string",
- "offset": "string",
- "orgID": "string",
- "runbookLink": "string",
- "sleepUntil": "string",
- "status": "active",
- "statusRules": [
- {
- "count": 0,
- "currentLevel": "UNKNOWN",
- "period": "string",
- "previousLevel": "UNKNOWN"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "equal",
- "value": "string"
}
], - "taskID": "string",
- "type": "http",
- "url": "string"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "endpointID": "string",
- "every": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "limit": 0,
- "limitEvery": 0,
- "links": {
- "labels": "/api/v2/notificationRules/1/labels",
- "members": "/api/v2/notificationRules/1/members",
- "owners": "/api/v2/notificationRules/1/owners",
- "query": "/api/v2/notificationRules/1/query",
- "self": "/api/v2/notificationRules/1"
}, - "name": "string",
- "offset": "string",
- "orgID": "string",
- "ownerID": "string",
- "runbookLink": "string",
- "sleepUntil": "string",
- "status": "active",
- "statusRules": [
- {
- "count": 0,
- "currentLevel": "UNKNOWN",
- "period": "string",
- "previousLevel": "UNKNOWN"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "equal",
- "value": "string"
}
], - "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "http",
- "url": "string"
}
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "endpointID": "string",
- "every": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "limit": 0,
- "limitEvery": 0,
- "links": {
- "labels": "/api/v2/notificationRules/1/labels",
- "members": "/api/v2/notificationRules/1/members",
- "owners": "/api/v2/notificationRules/1/owners",
- "query": "/api/v2/notificationRules/1/query",
- "self": "/api/v2/notificationRules/1"
}, - "name": "string",
- "offset": "string",
- "orgID": "string",
- "ownerID": "string",
- "runbookLink": "string",
- "sleepUntil": "string",
- "status": "active",
- "statusRules": [
- {
- "count": 0,
- "currentLevel": "UNKNOWN",
- "period": "string",
- "previousLevel": "UNKNOWN"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "equal",
- "value": "string"
}
], - "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "http",
- "url": "string"
}
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Notification rule update to apply
description | string |
name | string |
status | string Enum: "active" "inactive" |
{- "description": "string",
- "name": "string",
- "status": "active"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "endpointID": "string",
- "every": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "limit": 0,
- "limitEvery": 0,
- "links": {
- "labels": "/api/v2/notificationRules/1/labels",
- "members": "/api/v2/notificationRules/1/members",
- "owners": "/api/v2/notificationRules/1/owners",
- "query": "/api/v2/notificationRules/1/query",
- "self": "/api/v2/notificationRules/1"
}, - "name": "string",
- "offset": "string",
- "orgID": "string",
- "ownerID": "string",
- "runbookLink": "string",
- "sleepUntil": "string",
- "status": "active",
- "statusRules": [
- {
- "count": 0,
- "currentLevel": "UNKNOWN",
- "period": "string",
- "previousLevel": "UNKNOWN"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "equal",
- "value": "string"
}
], - "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "http",
- "url": "string"
}
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Notification rule update to apply
description | string An optional description of the notification rule. |
endpointID required | string |
every | string The notification repetition interval. |
Array of objects (Labels) | |
limit | integer Don't notify me more than |
limitEvery | integer Don't notify me more than |
name required | string Human-readable name describing the notification rule. |
offset | string Duration to delay after the schedule, before executing check. |
orgID required | string The ID of the organization that owns this notification rule. |
runbookLink | string |
sleepUntil | string |
status required | string (TaskStatusType) Enum: "active" "inactive"
|
required | Array of objects (StatusRule) non-empty List of status rules the notification rule attempts to match. |
Array of objects (TagRule) List of tag rules the notification rule attempts to match. | |
taskID | string The ID of the task associated with this notification rule. |
type required | string http PostNotificationRule NotificationRule telegram smtp slack pagerduty http |
url | string |
{- "description": "string",
- "endpointID": "string",
- "every": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "limit": 0,
- "limitEvery": 0,
- "name": "string",
- "offset": "string",
- "orgID": "string",
- "runbookLink": "string",
- "sleepUntil": "string",
- "status": "active",
- "statusRules": [
- {
- "count": 0,
- "currentLevel": "UNKNOWN",
- "period": "string",
- "previousLevel": "UNKNOWN"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "equal",
- "value": "string"
}
], - "taskID": "string",
- "type": "http",
- "url": "string"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "endpointID": "string",
- "every": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "limit": 0,
- "limitEvery": 0,
- "links": {
- "labels": "/api/v2/notificationRules/1/labels",
- "members": "/api/v2/notificationRules/1/members",
- "owners": "/api/v2/notificationRules/1/owners",
- "query": "/api/v2/notificationRules/1/query",
- "self": "/api/v2/notificationRules/1"
}, - "name": "string",
- "offset": "string",
- "orgID": "string",
- "ownerID": "string",
- "runbookLink": "string",
- "sleepUntil": "string",
- "status": "active",
- "statusRules": [
- {
- "count": 0,
- "currentLevel": "UNKNOWN",
- "period": "string",
- "previousLevel": "UNKNOWN"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "equal",
- "value": "string"
}
], - "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "http",
- "url": "string"
}
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Label to add
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
labelID required | string The ID of the label to delete. |
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Create and manage your organizations. An organization is a workspace for a group of users. Organizations can be used to separate different environments, projects, teams or users within InfluxDB.
Use the /api/v2/orgs
endpoints to create, view, and manage organizations.
Lists organizations.
To limit which organizations are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all organizations up to the default limit
.
descending | boolean Default: false |
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
org | string An organization name. Only returns the specified organization. |
orgID | string An organization ID. Only returns the specified organization. |
userID | string A user ID. Only returns organizations where the specified user is a member or owner. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/orgs"
}, - "orgs": [
- {
- "createdAt": "2022-07-17T23:00:30.778487Z",
- "description": "Example InfluxDB organization",
- "id": "INFLUX_ORG_ID",
- "links": {
- "buckets": "/api/v2/buckets?org=INFLUX_ORG",
- "dashboards": "/api/v2/dashboards?org=INFLUX_ORG",
- "labels": "/api/v2/orgs/INFLUX_ORG_ID/labels",
- "logs": "/api/v2/orgs/INFLUX_ORG_ID/logs",
- "members": "/api/v2/orgs/INFLUX_ORG_ID/members",
- "owners": "/api/v2/orgs/INFLUX_ORG_ID/owners",
- "secrets": "/api/v2/orgs/INFLUX_ORG_ID/secrets",
- "self": "/api/v2/orgs/INFLUX_ORG_ID",
- "tasks": "/api/v2/tasks?org=InfluxData"
}, - "name": "INFLUX_ORG",
- "updatedAt": "2022-07-17T23:00:30.778487Z"
}
]
}
Creates an organization and returns the newly created organization.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The organization to create.
description | string The description of the organization. |
name required | string The name of the organization. |
{- "description": "string",
- "name": "string"
}
{- "createdAt": "2022-08-24T23:05:52.881317Z",
- "description": "",
- "id": "INFLUX_ORG_ID",
- "links": {
- "buckets": "/api/v2/buckets?org=INFLUX_ORG",
- "dashboards": "/api/v2/dashboards?org=INFLUX_ORG",
- "labels": "/api/v2/orgs/INFLUX_ORG_ID/labels",
- "logs": "/api/v2/orgs/INFLUX_ORG_ID/logs",
- "members": "/api/v2/orgs/INFLUX_ORG_ID/members",
- "owners": "/api/v2/orgs/INFLUX_ORG_ID/owners",
- "secrets": "/api/v2/orgs/INFLUX_ORG_ID/secrets",
- "self": "/api/v2/orgs/INFLUX_ORG_ID",
- "tasks": "/api/v2/tasks?org=INFLUX_ORG"
}, - "name": "INFLUX_ORG",
- "updatedAt": "2022-08-24T23:05:52.881318Z"
}
Deletes an organization.
Deleting an organization from InfluxDB Cloud can't be undone. Once deleted, all data associated with the organization is removed.
Does the following when you send a delete request:
204
status code if queued; error otherwise.orgID required | string The ID of the organization to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "invalid",
- "message": "failed to decode request body: organization not found"
}
Retrieves an organization.
Use this endpoint to retrieve information for a specific organization.
orgID required | string The ID of the organization to retrieve. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "createdAt": "2019-08-24T14:15:22Z",
- "defaultStorageType": "tsm",
- "description": "string",
- "id": "string",
- "links": {
- "buckets": "/api/v2/buckets?org=myorg",
- "dashboards": "/api/v2/dashboards?org=myorg",
- "labels": "/api/v2/orgs/1/labels",
- "members": "/api/v2/orgs/1/members",
- "owners": "/api/v2/orgs/1/owners",
- "secrets": "/api/v2/orgs/1/secrets",
- "self": "/api/v2/orgs/1",
- "tasks": "/api/v2/tasks?org=myorg"
}, - "name": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Updates an organization.
Use this endpoint to update properties
(name
, description
) of an organization.
Updating an organization’s name affects all resources that reference the organization by name, including the following:
If you change an organization name, be sure to update the organization name in these resources as well.
orgID required | string The ID of the organization to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The organization update to apply.
description | string The description of the organization. |
name | string The name of the organization. |
{- "description": "string",
- "name": "string"
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "defaultStorageType": "tsm",
- "description": "string",
- "id": "string",
- "links": {
- "buckets": "/api/v2/buckets?org=myorg",
- "dashboards": "/api/v2/dashboards?org=myorg",
- "labels": "/api/v2/orgs/1/labels",
- "members": "/api/v2/orgs/1/members",
- "owners": "/api/v2/orgs/1/owners",
- "secrets": "/api/v2/orgs/1/secrets",
- "self": "/api/v2/orgs/1",
- "tasks": "/api/v2/tasks?org=myorg"
}, - "name": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Lists all users that belong to an organization.
InfluxDB users have permission to access InfluxDB.
Members are users within the organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to retrieve
members for.
orgID required | string The ID of the organization to retrieve users for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/orgs/055aa4783aa38398/members"
}, - "users": [
- {
- "id": "791df274afd48a83",
- "links": {
- "self": "/api/v2/users/791df274afd48a83"
}, - "name": "example_user_1",
- "role": "member",
- "status": "active"
}, - {
- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_2",
- "role": "owner",
- "status": "active"
}
]
}
Add a user to an organization.
InfluxDB users have permission to access InfluxDB.
Members are users within the organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to add a member to.
orgID required | string The ID of the organization. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The user to add to the organization.
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_1",
- "role": "member",
- "status": "active"
}
Removes a member from an organization.
Use this endpoint to remove a user's member privileges for an organization.
Removing member privileges removes the user's read
and write
permissions
from the organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to remove an
owner from.
orgID required | string The ID of the organization to remove a user from. |
userID required | string The ID of the user to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "unauthorized",
- "message": "unauthorized access"
}
Lists all owners of an organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to retrieve a
list of owners from.
orgID required | string The ID of the organization to list owners for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "links": {
- "self": "/api/v2/orgs/055aa4783aa38398/owners"
}, - "users": [
- {
- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_2",
- "role": "owner",
- "status": "active"
}
]
}
Adds an owner to an organization.
Use this endpoint to assign the organization owner
role to a user.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to add an owner for.
orgID required | string The ID of the organization that you want to add an owner for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The user to add as an owner of the organization.
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "09cfb87051cbe000",
- "links": {
- "self": "/api/v2/users/09cfb87051cbe000"
}, - "name": "example_user_1",
- "role": "owner",
- "status": "active"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
Removes an owner from the organization.
Organization owners have permission to delete organizations and remove user and member permissions from the organization.
owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID
is the ID of the organization that you want to
remove an owner from.
orgID required | string The ID of the organization to remove an owner from. |
userID required | string The ID of the user to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "unauthorized",
- "message": "unauthorized access"
}
Retrieves the status and InfluxDB version of the instance.
Use this endpoint to monitor uptime for the InfluxDB instance. The response
returns a HTTP 204
status code to inform you the instance is available.
X-Influxdb-Version
in the headers.curl --request GET "http://localhost:8086/ping"
Returns the status and InfluxDB version of the instance.
Use this endpoint to monitor uptime for the InfluxDB instance. The response
returns a HTTP 204
status code to inform you the instance is available.
X-Influxdb-Version
in the headers.curl --request HEAD "http://localhost:8086/ping"
Retrieves data from buckets.
Use this endpoint to send a Flux query request and retrieve data from a bucket.
read
rate limits apply.
For more information, see limits and adjustable quotas.
org | string An organization name or ID. InfluxDB Cloud
InfluxDB OSS
|
orgID | string An organization ID. InfluxDB Cloud
InfluxDB OSS
|
Accept-Encoding | string Default: identity Enum: "gzip" "identity" The content encoding (usually a compression algorithm) that the client can understand. |
Content-Type | string Enum: "application/json" "application/vnd.flux" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Flux query or specification to execute
object (Dialect) Options for tabular data output. Default output is annotated CSV with headers. For more information about tabular data dialect, see W3 metadata vocabulary for tabular data. | |
object (File) Represents a source from a single file | |
now | string <date-time> Specifies the time that should be reported as |
query required | string The query script to execute. |
type | string Value: "flux" The type of query. Must be "flux". |
{- "dialect": {
- "annotations": [
- "group"
], - "commentPrefix": "#",
- "dateTimeFormat": "RFC3339",
- "delimiter": ",",
- "header": true
}, - "extern": {
- "body": [
- {
- "text": "string",
- "type": "string"
}
], - "imports": [
- {
- "as": {
- "name": "string",
- "type": "string"
}, - "path": {
- "type": "string",
- "value": "string"
}, - "type": "string"
}
], - "name": "string",
- "package": {
- "name": {
- "name": "string",
- "type": "string"
}, - "type": "string"
}, - "type": "string"
}, - "now": "2019-08-24T14:15:22Z",
- "query": "string",
- "type": "flux"
}
result,table,_start,_stop,_time,region,host,_value mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62
Analyzes a Flux query for syntax errors and returns the list of errors.
In the following sample query, from()
is missing the property key.
```json
{ "query": "from(: \"iot_center\")\
|> range(start: -90d)\
|> filter(fn: (r) => r._measurement == \"environment\")",
"type": "flux"
}
```
If you pass this in a request to the /api/v2/analyze
endpoint,
InfluxDB returns an errors
list that contains an error object for the missing key.
The endpoint doesn't validate values in the query--for example:
The following sample query has correct syntax, but contains an incorrect from()
property key:
{ "query": "from(foo: \"iot_center\")\
|> range(start: -90d)\
|> filter(fn: (r) => r._measurement == \"environment\")",
"type": "flux"
}
If you pass this in a request to the /api/v2/analyze
endpoint,
InfluxDB returns an empty errors
list.
Content-Type | string Value: "application/json" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Flux query to analyze
object (Dialect) Options for tabular data output. Default output is annotated CSV with headers. For more information about tabular data dialect, see W3 metadata vocabulary for tabular data. | |
object (File) Represents a source from a single file | |
now | string <date-time> Specifies the time that should be reported as |
query required | string The query script to execute. |
type | string Value: "flux" The type of query. Must be "flux". |
{- "dialect": {
- "annotations": [
- "group"
], - "commentPrefix": "#",
- "dateTimeFormat": "RFC3339",
- "delimiter": ",",
- "header": true
}, - "extern": {
- "body": [
- {
- "text": "string",
- "type": "string"
}
], - "imports": [
- {
- "as": {
- "name": "string",
- "type": "string"
}, - "path": {
- "type": "string",
- "value": "string"
}, - "type": "string"
}
], - "name": "string",
- "package": {
- "name": {
- "name": "string",
- "type": "string"
}, - "type": "string"
}, - "type": "string"
}, - "now": "2019-08-24T14:15:22Z",
- "query": "string",
- "type": "flux"
}
Returns an error object if the Flux query is missing a property key.
The following sample query is missing the bucket
property key:
{
"query": "from(: \"iot_center\")\
...
}
{- "errors": [
- {
- "character": 0,
- "column": 6,
- "line": 1,
- "message": "missing property key"
}
]
}
Analyzes a Flux query and returns a complete package source Abstract Syntax Tree (AST) for the query.
Use this endpoint for deep query analysis such as debugging unexpected query results.
A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution.
The endpoint doesn't validate values in the query--for example:
The following sample Flux query has correct syntax, but contains an incorrect from()
property key:
from(foo: "iot_center")
|> range(start: -90d)
|> filter(fn: (r) => r._measurement == "environment")
The following sample JSON shows how to pass the query in the request body:
from(foo: "iot_center")
|> range(start: -90d)
|> filter(fn: (r) => r._measurement == "environment")
The following code sample shows how to pass the query as JSON in the request body:
{ "query": "from(foo: \"iot_center\")\
|> range(start: -90d)\
|> filter(fn: (r) => r._measurement == \"environment\")"
}
Passing this to /api/v2/query/ast
will return a successful response
with a generated AST.
Content-Type | string Value: "application/json" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The Flux query to analyze.
query required | string The Flux query script to be analyzed. |
{- "query": "string"
}
{- "ast": {
- "files": [
- {
- "body": [
- {
- "expression": {
- "argument": {
- "argument": {
- "arguments": [
- {
- "location": {
- "end": {
- "column": 25,
- "line": 1
}, - "source": "bucket: \"example-bucket\"",
- "start": {
- "column": 6,
- "line": 1
}
}, - "properties": [
- {
- "key": {
- "location": {
- "end": {
- "column": 12,
- "line": 1
}, - "source": "bucket",
- "start": {
- "column": 6,
- "line": 1
}
}, - "name": "bucket",
- "type": "Identifier"
}, - "location": {
- "end": {
- "column": 25,
- "line": 1
}, - "source": "bucket: \"example-bucket\"",
- "start": {
- "column": 6,
- "line": 1
}
}, - "type": "Property",
- "value": {
- "location": {
- "end": {
- "column": 25,
- "line": 1
}, - "source": "\"example-bucket\"",
- "start": {
- "column": 14,
- "line": 1
}
}, - "type": "StringLiteral",
- "value": "example-bucket"
}
}
], - "type": "ObjectExpression"
}
], - "callee": {
- "location": {
- "end": {
- "column": 5,
- "line": 1
}, - "source": "from",
- "start": {
- "column": 1,
- "line": 1
}
}, - "name": "from",
- "type": "Identifier"
}, - "location": {
- "end": {
- "column": 26,
- "line": 1
}, - "source": "from(bucket: \"example-bucket\")",
- "start": {
- "column": 1,
- "line": 1
}
}, - "type": "CallExpression"
}, - "call": {
- "arguments": [
- {
- "location": {
- "end": {
- "column": 46,
- "line": 1
}, - "source": "start: -5m",
- "start": {
- "column": 36,
- "line": 1
}
}, - "properties": [
- {
- "key": {
- "location": {
- "end": {
- "column": 41,
- "line": 1
}, - "source": "start",
- "start": {
- "column": 36,
- "line": 1
}
}, - "name": "start",
- "type": "Identifier"
}, - "location": {
- "end": {
- "column": 46,
- "line": 1
}, - "source": "start: -5m",
- "start": {
- "column": 36,
- "line": 1
}
}, - "type": "Property",
- "value": {
- "argument": {
- "location": {
- "end": {
- "column": 46,
- "line": 1
}, - "source": "5m",
- "start": {
- "column": 44,
- "line": 1
}
}, - "type": "DurationLiteral",
- "values": [
- {
- "magnitude": 5,
- "unit": "m"
}
]
}, - "location": {
- "end": {
- "column": 46,
- "line": 1
}, - "source": "-5m",
- "start": {
- "column": 43,
- "line": 1
}
}, - "operator": "-",
- "type": "UnaryExpression"
}
}
], - "type": "ObjectExpression"
}
], - "callee": {
- "location": {
- "end": {
- "column": 35,
- "line": 1
}, - "source": "range",
- "start": {
- "column": 30,
- "line": 1
}
}, - "name": "range",
- "type": "Identifier"
}, - "location": {
- "end": {
- "column": 47,
- "line": 1
}, - "source": "range(start: -5m)",
- "start": {
- "column": 30,
- "line": 1
}
}, - "type": "CallExpression"
}, - "location": {
- "end": {
- "column": 47,
- "line": 1
}, - "source": "from(bucket: \"example-bucket\") |> range(start: -5m)",
- "start": {
- "column": 1,
- "line": 1
}
}, - "type": "PipeExpression"
}, - "call": {
- "arguments": [
- {
- "location": {
- "end": {
- "column": 108,
- "line": 1
}, - "source": "fn: (r) => r._measurement == \"example-measurement\"",
- "start": {
- "column": 58,
- "line": 1
}
}, - "properties": [
- {
- "key": {
- "location": {
- "end": {
- "column": 60,
- "line": 1
}, - "source": "fn",
- "start": {
- "column": 58,
- "line": 1
}
}, - "name": "fn",
- "type": "Identifier"
}, - "location": {
- "end": {
- "column": 108,
- "line": 1
}, - "source": "fn: (r) => r._measurement == \"example-measurement\"",
- "start": {
- "column": 58,
- "line": 1
}
}, - "type": "Property",
- "value": {
- "body": {
- "left": {
- "location": {
- "end": {
- "column": 83,
- "line": 1
}, - "source": "r._measurement",
- "start": {
- "column": 69,
- "line": 1
}
}, - "object": {
- "location": {
- "end": {
- "column": 70,
- "line": 1
}, - "source": "r",
- "start": {
- "column": 69,
- "line": 1
}
}, - "name": "r",
- "type": "Identifier"
}, - "property": {
- "location": {
- "end": {
- "column": 83,
- "line": 1
}, - "source": "_measurement",
- "start": {
- "column": 71,
- "line": 1
}
}, - "name": "_measurement",
- "type": "Identifier"
}, - "type": "MemberExpression"
}, - "location": {
- "end": {
- "column": 108,
- "line": 1
}, - "source": "r._measurement == \"example-measurement\"",
- "start": {
- "column": 69,
- "line": 1
}
}, - "operator": "==",
- "right": {
- "location": {
- "end": {
- "column": 108,
- "line": 1
}, - "source": "\"example-measurement\"",
- "start": {
- "column": 87,
- "line": 1
}
}, - "type": "StringLiteral",
- "value": "example-measurement"
}, - "type": "BinaryExpression"
}, - "location": {
- "end": {
- "column": 108,
- "line": 1
}, - "source": "(r) => r._measurement == \"example-measurement\"",
- "start": {
- "column": 62,
- "line": 1
}
}, - "params": [
- {
- "key": {
- "location": {
- "end": {
- "column": 64,
- "line": 1
}, - "source": "r",
- "start": {
- "column": 63,
- "line": 1
}
}, - "name": "r",
- "type": "Identifier"
}, - "location": {
- "end": {
- "column": 64,
- "line": 1
}, - "source": "r",
- "start": {
- "column": 63,
- "line": 1
}
}, - "type": "Property",
- "value": null
}
], - "type": "FunctionExpression"
}
}
], - "type": "ObjectExpression"
}
], - "callee": {
- "location": {
- "end": {
- "column": 57,
- "line": 1
}, - "source": "filter",
- "start": {
- "column": 51,
- "line": 1
}
}, - "name": "filter",
- "type": "Identifier"
}, - "location": {
- "end": {
- "column": 109,
- "line": 1
}, - "source": "filter(fn: (r) => r._measurement == \"example-measurement\")",
- "start": {
- "column": 51,
- "line": 1
}
}, - "type": "CallExpression"
}, - "location": {
- "end": {
- "column": 109,
- "line": 1
}, - "source": "from(bucket: \"example-bucket\") |> range(start: -5m) |> filter(fn: (r) => r._measurement == \"example-measurement\")",
- "start": {
- "column": 1,
- "line": 1
}
}, - "type": "PipeExpression"
}, - "location": {
- "end": {
- "column": 109,
- "line": 1
}, - "source": "from(bucket: \"example-bucket\") |> range(start: -5m) |> filter(fn: (r) => r._measurement == \"example-measurement\")",
- "start": {
- "column": 1,
- "line": 1
}
}, - "type": "ExpressionStatement"
}
], - "imports": null,
- "location": {
- "end": {
- "column": 109,
- "line": 1
}, - "source": "from(bucket: \"example-bucket\") |> range(start: -5m) |> filter(fn: (r) => r._measurement == \"example-measurement\")",
- "start": {
- "column": 1,
- "line": 1
}
}, - "metadata": "parser-type=rust",
- "package": null,
- "type": "File"
}
], - "package": "main",
- "type": "Package"
}
}
Lists Flux query suggestions. Each suggestion contains a Flux function name and parameters.
Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder.
When writing a query, avoid using _functionName()
helper functions
exposed by this endpoint. Helper function names have an underscore (_
)
prefix and aren't meant to be used directly in queries--for example:
top(n, columns=["_value"], tables=<-)
function instead of the _sortLimit
helper function. top
uses _sortLimit
.Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl --request GET "INFLUX_URL/api/v2/query/suggestions" \ --header "Accept: application/json" \ --header "Authorization: Token INFLUX_API_TOKEN"
{- "funcs": [
- {
- "name": "_fillEmpty",
- "params": {
- "createEmpty": "bool",
- "tables": "stream"
}
}, - {
- "name": "_highestOrLowest",
- "params": {
- "_sortLimit": "function",
- "column": "invalid",
- "groupColumns": "array",
- "n": "invalid",
- "reducer": "function",
- "tables": "stream"
}
}, - {
- "name": "_hourSelection",
- "params": {
- "location": "object",
- "start": "int",
- "stop": "int",
- "tables": "stream",
- "timeColumn": "string"
}
}, - {
- "name": "_sortLimit",
- "params": {
- "columns": "array",
- "desc": "bool",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "_window",
- "params": {
- "createEmpty": "bool",
- "every": "duration",
- "location": "object",
- "offset": "duration",
- "period": "duration",
- "startColumn": "string",
- "stopColumn": "string",
- "tables": "stream",
- "timeColumn": "string"
}
}, - {
- "name": "aggregateWindow",
- "params": {
- "column": "invalid",
- "createEmpty": "bool",
- "every": "duration",
- "fn": "function",
- "location": "object",
- "offset": "duration",
- "period": "duration",
- "tables": "stream",
- "timeDst": "string",
- "timeSrc": "string"
}
}, - {
- "name": "bool",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "bottom",
- "params": {
- "columns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "buckets",
- "params": {
- "host": "string",
- "org": "string",
- "orgID": "string",
- "token": "string"
}
}, - {
- "name": "bytes",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "cardinality",
- "params": {
- "bucket": "string",
- "bucketID": "string",
- "host": "string",
- "org": "string",
- "orgID": "string",
- "predicate": "function",
- "start": "invalid",
- "stop": "invalid",
- "token": "string"
}
}, - {
- "name": "chandeMomentumOscillator",
- "params": {
- "columns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "columns",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "contains",
- "params": {
- "set": "array",
- "value": "invalid"
}
}, - {
- "name": "count",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "cov",
- "params": {
- "on": "array",
- "pearsonr": "bool",
- "x": "invalid",
- "y": "invalid"
}
}, - {
- "name": "covariance",
- "params": {
- "columns": "array",
- "pearsonr": "bool",
- "tables": "stream",
- "valueDst": "string"
}
}, - {
- "name": "cumulativeSum",
- "params": {
- "columns": "array",
- "tables": "stream"
}
}, - {
- "name": "derivative",
- "params": {
- "columns": "array",
- "initialZero": "bool",
- "nonNegative": "bool",
- "tables": "stream",
- "timeColumn": "string",
- "unit": "duration"
}
}, - {
- "name": "die",
- "params": {
- "msg": "string"
}
}, - {
- "name": "difference",
- "params": {
- "columns": "array",
- "initialZero": "bool",
- "keepFirst": "bool",
- "nonNegative": "bool",
- "tables": "stream"
}
}, - {
- "name": "display",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "distinct",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "doubleEMA",
- "params": {
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "drop",
- "params": {
- "columns": "array",
- "fn": "function",
- "tables": "stream"
}
}, - {
- "name": "duplicate",
- "params": {
- "as": "string",
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "duration",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "elapsed",
- "params": {
- "columnName": "string",
- "tables": "stream",
- "timeColumn": "string",
- "unit": "duration"
}
}, - {
- "name": "exponentialMovingAverage",
- "params": {
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "fill",
- "params": {
- "column": "string",
- "tables": "stream",
- "usePrevious": "bool",
- "value": "invalid"
}
}, - {
- "name": "filter",
- "params": {
- "fn": "function",
- "onEmpty": "string",
- "tables": "stream"
}
}, - {
- "name": "findColumn",
- "params": {
- "column": "string",
- "fn": "function",
- "tables": "stream"
}
}, - {
- "name": "findRecord",
- "params": {
- "fn": "function",
- "idx": "int",
- "tables": "stream"
}
}, - {
- "name": "first",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "float",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "from",
- "params": {
- "bucket": "string",
- "bucketID": "string",
- "host": "string",
- "org": "string",
- "orgID": "string",
- "token": "string"
}
}, - {
- "name": "getColumn",
- "params": {
- "column": "string"
}
}, - {
- "name": "getRecord",
- "params": {
- "idx": "int"
}
}, - {
- "name": "group",
- "params": {
- "columns": "array",
- "mode": "string",
- "tables": "stream"
}
}, - {
- "name": "highestAverage",
- "params": {
- "column": "string",
- "groupColumns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "highestCurrent",
- "params": {
- "column": "string",
- "groupColumns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "highestMax",
- "params": {
- "column": "string",
- "groupColumns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "histogram",
- "params": {
- "bins": "array",
- "column": "string",
- "countColumn": "string",
- "normalize": "bool",
- "tables": "stream",
- "upperBoundColumn": "string"
}
}, - {
- "name": "histogramQuantile",
- "params": {
- "countColumn": "string",
- "minValue": "float",
- "quantile": "float",
- "tables": "stream",
- "upperBoundColumn": "string",
- "valueColumn": "string"
}
}, - {
- "name": "holtWinters",
- "params": {
- "column": "string",
- "interval": "duration",
- "n": "int",
- "seasonality": "int",
- "tables": "stream",
- "timeColumn": "string",
- "withFit": "bool"
}
}, - {
- "name": "hourSelection",
- "params": {
- "location": "object",
- "start": "int",
- "stop": "int",
- "tables": "stream",
- "timeColumn": "string"
}
}, - {
- "name": "increase",
- "params": {
- "columns": "array",
- "tables": "stream"
}
}, - {
- "name": "int",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "integral",
- "params": {
- "column": "string",
- "interpolate": "string",
- "tables": "stream",
- "timeColumn": "string",
- "unit": "duration"
}
}, - {
- "name": "join",
- "params": {
- "method": "string",
- "on": "array",
- "tables": "invalid"
}
}, - {
- "name": "kaufmansAMA",
- "params": {
- "column": "string",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "kaufmansER",
- "params": {
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "keep",
- "params": {
- "columns": "array",
- "fn": "function",
- "tables": "stream"
}
}, - {
- "name": "keyValues",
- "params": {
- "keyColumns": "array",
- "tables": "stream"
}
}, - {
- "name": "keys",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "last",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "length",
- "params": {
- "arr": "array"
}
}, - {
- "name": "limit",
- "params": {
- "n": "int",
- "offset": "int",
- "tables": "stream"
}
}, - {
- "name": "linearBins",
- "params": {
- "count": "int",
- "infinity": "bool",
- "start": "float",
- "width": "float"
}
}, - {
- "name": "logarithmicBins",
- "params": {
- "count": "int",
- "factor": "float",
- "infinity": "bool",
- "start": "float"
}
}, - {
- "name": "lowestAverage",
- "params": {
- "column": "string",
- "groupColumns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "lowestCurrent",
- "params": {
- "column": "string",
- "groupColumns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "lowestMin",
- "params": {
- "column": "string",
- "groupColumns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "map",
- "params": {
- "fn": "function",
- "mergeKey": "bool",
- "tables": "stream"
}
}, - {
- "name": "max",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "mean",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "median",
- "params": {
- "column": "string",
- "compression": "float",
- "method": "string",
- "tables": "stream"
}
}, - {
- "name": "min",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "mode",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "movingAverage",
- "params": {
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "now",
- "params": { }
}, - {
- "name": "pearsonr",
- "params": {
- "on": "array",
- "x": "invalid",
- "y": "invalid"
}
}, - {
- "name": "pivot",
- "params": {
- "columnKey": "array",
- "rowKey": "array",
- "tables": "stream",
- "valueColumn": "string"
}
}, - {
- "name": "quantile",
- "params": {
- "column": "string",
- "compression": "float",
- "method": "string",
- "q": "float",
- "tables": "stream"
}
}, - {
- "name": "range",
- "params": {
- "start": "invalid",
- "stop": "invalid",
- "tables": "stream"
}
}, - {
- "name": "reduce",
- "params": {
- "fn": "function",
- "identity": "invalid",
- "tables": "stream"
}
}, - {
- "name": "relativeStrengthIndex",
- "params": {
- "columns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "rename",
- "params": {
- "columns": "invalid",
- "fn": "function",
- "tables": "stream"
}
}, - {
- "name": "sample",
- "params": {
- "column": "string",
- "n": "int",
- "pos": "int",
- "tables": "stream"
}
}, - {
- "name": "set",
- "params": {
- "key": "string",
- "tables": "stream",
- "value": "string"
}
}, - {
- "name": "skew",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "sort",
- "params": {
- "columns": "array",
- "desc": "bool",
- "tables": "stream"
}
}, - {
- "name": "spread",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "stateCount",
- "params": {
- "column": "string",
- "fn": "function",
- "tables": "stream"
}
}, - {
- "name": "stateDuration",
- "params": {
- "column": "string",
- "fn": "function",
- "tables": "stream",
- "timeColumn": "string",
- "unit": "duration"
}
}, - {
- "name": "stateTracking",
- "params": {
- "countColumn": "string",
- "durationColumn": "string",
- "durationUnit": "duration",
- "fn": "function",
- "tables": "stream",
- "timeColumn": "string"
}
}, - {
- "name": "stddev",
- "params": {
- "column": "string",
- "mode": "string",
- "tables": "stream"
}
}, - {
- "name": "string",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "sum",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "tableFind",
- "params": {
- "fn": "function",
- "tables": "stream"
}
}, - {
- "name": "tail",
- "params": {
- "n": "int",
- "offset": "int",
- "tables": "stream"
}
}, - {
- "name": "time",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "timeShift",
- "params": {
- "columns": "array",
- "duration": "duration",
- "tables": "stream"
}
}, - {
- "name": "timeWeightedAvg",
- "params": {
- "tables": "stream",
- "unit": "duration"
}
}, - {
- "name": "timedMovingAverage",
- "params": {
- "column": "string",
- "every": "duration",
- "period": "duration",
- "tables": "stream"
}
}, - {
- "name": "to",
- "params": {
- "bucket": "string",
- "bucketID": "string",
- "fieldFn": "function",
- "host": "string",
- "measurementColumn": "string",
- "org": "string",
- "orgID": "string",
- "tables": "stream",
- "tagColumns": "array",
- "timeColumn": "string",
- "token": "string"
}
}, - {
- "name": "toBool",
- "params": {
- "tables": "stream"
}
}, - {
- "name": "toFloat",
- "params": {
- "tables": "stream"
}
}, - {
- "name": "toInt",
- "params": {
- "tables": "stream"
}
}, - {
- "name": "toString",
- "params": {
- "tables": "stream"
}
}, - {
- "name": "toTime",
- "params": {
- "tables": "stream"
}
}, - {
- "name": "toUInt",
- "params": {
- "tables": "stream"
}
}, - {
- "name": "today",
- "params": { }
}, - {
- "name": "top",
- "params": {
- "columns": "array",
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "tripleEMA",
- "params": {
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "tripleExponentialDerivative",
- "params": {
- "n": "int",
- "tables": "stream"
}
}, - {
- "name": "truncateTimeColumn",
- "params": {
- "tables": "stream",
- "timeColumn": "invalid",
- "unit": "duration"
}
}, - {
- "name": "uint",
- "params": {
- "v": "invalid"
}
}, - {
- "name": "union",
- "params": {
- "tables": "array"
}
}, - {
- "name": "unique",
- "params": {
- "column": "string",
- "tables": "stream"
}
}, - {
- "name": "wideTo",
- "params": {
- "bucket": "string",
- "bucketID": "string",
- "host": "string",
- "org": "string",
- "orgID": "string",
- "tables": "stream",
- "token": "string"
}
}, - {
- "name": "window",
- "params": {
- "createEmpty": "bool",
- "every": "duration",
- "location": "object",
- "offset": "duration",
- "period": "duration",
- "startColumn": "string",
- "stopColumn": "string",
- "tables": "stream",
- "timeColumn": "string"
}
}, - {
- "name": "yield",
- "params": {
- "name": "string",
- "tables": "stream"
}
}
]
}
Retrieves a query suggestion that contains the name and parameters of the requested function.
Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function.
Use /api/v2/query/suggestions/{name}
(without a trailing slash).
/api/v2/query/suggestions/{name}/
(note the trailing slash) results in a
HTTP 301 Moved Permanently
status.
The function name
must exist and must be spelled correctly.
name required | string A Flux function name. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl --request GET "INFLUX_URL/api/v2/query/suggestions/sum/" \ --header "Accept: application/json" \ --header "Authorization: Token INFLUX_API_TOKEN"
{- "name": "sum",
- "params": {
- "column": "string",
- "tables": "stream"
}
}
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "started": "2019-03-13T10:09:33.891196-04:00",
- "status": "ready",
- "up": "14m45.911966424s"
}
name | string |
orgID required | string The organization ID. |
remoteURL | string <uri> |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "remotes": [
- {
- "allowInsecureTLS": false,
- "description": "string",
- "id": "string",
- "name": "string",
- "orgID": "string",
- "remoteOrgID": "string",
}
]
}
allowInsecureTLS required | boolean Default: false |
description | string |
name required | string |
orgID required | string |
remoteAPIToken required | string |
remoteOrgID | string |
remoteURL required | string <uri> |
{- "allowInsecureTLS": false,
- "description": "string",
- "name": "string",
- "orgID": "string",
- "remoteAPIToken": "string",
- "remoteOrgID": "string",
}
{- "allowInsecureTLS": false,
- "description": "string",
- "id": "string",
- "name": "string",
- "orgID": "string",
- "remoteOrgID": "string",
}
remoteID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
remoteID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "allowInsecureTLS": false,
- "description": "string",
- "id": "string",
- "name": "string",
- "orgID": "string",
- "remoteOrgID": "string",
}
remoteID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
allowInsecureTLS | boolean Default: false |
description | string |
name | string |
remoteAPIToken | string |
remoteOrgID | string |
remoteURL | string <uri> |
{- "allowInsecureTLS": false,
- "description": "string",
- "name": "string",
- "remoteAPIToken": "string",
- "remoteOrgID": "string",
}
{- "allowInsecureTLS": false,
- "description": "string",
- "id": "string",
- "name": "string",
- "orgID": "string",
- "remoteOrgID": "string",
}
localBucketID | string |
name | string |
orgID required | string The organization ID. |
remoteID | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "replications": [
- {
- "currentQueueSizeBytes": 0,
- "description": "string",
- "dropNonRetryableData": true,
- "id": "string",
- "latestErrorMessage": "string",
- "latestResponseCode": 0,
- "localBucketID": "string",
- "maxQueueSizeBytes": 0,
- "name": "string",
- "orgID": "string",
- "remainingBytesToBeSynced": 0,
- "remoteBucketID": "string",
- "remoteBucketName": "string",
- "remoteID": "string"
}
]
}
validate | boolean Default: false If true, validate the replication, but don't save it. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
description | string |
dropNonRetryableData | boolean Default: false |
localBucketID required | string |
maxAgeSeconds required | integer <int64> >= 0 Default: 604800 |
maxQueueSizeBytes required | integer <int64> >= 33554430 Default: 67108860 |
name required | string |
orgID required | string |
remoteBucketID | string |
remoteBucketName | string |
remoteID required | string |
{- "description": "string",
- "dropNonRetryableData": false,
- "localBucketID": "string",
- "maxAgeSeconds": 604800,
- "maxQueueSizeBytes": 67108860,
- "name": "string",
- "orgID": "string",
- "remoteBucketID": "string",
- "remoteBucketName": "string",
- "remoteID": "string"
}
{- "currentQueueSizeBytes": 0,
- "description": "string",
- "dropNonRetryableData": true,
- "id": "string",
- "latestErrorMessage": "string",
- "latestResponseCode": 0,
- "localBucketID": "string",
- "maxQueueSizeBytes": 0,
- "name": "string",
- "orgID": "string",
- "remainingBytesToBeSynced": 0,
- "remoteBucketID": "string",
- "remoteBucketName": "string",
- "remoteID": "string"
}
replicationID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
replicationID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "currentQueueSizeBytes": 0,
- "description": "string",
- "dropNonRetryableData": true,
- "id": "string",
- "latestErrorMessage": "string",
- "latestResponseCode": 0,
- "localBucketID": "string",
- "maxQueueSizeBytes": 0,
- "name": "string",
- "orgID": "string",
- "remainingBytesToBeSynced": 0,
- "remoteBucketID": "string",
- "remoteBucketName": "string",
- "remoteID": "string"
}
replicationID required | string |
validate | boolean Default: false If true, validate the updated information, but don't save it. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
description | string |
dropNonRetryableData | boolean |
maxAgeSeconds | integer <int64> >= 0 |
maxQueueSizeBytes | integer <int64> >= 33554430 |
name | string |
remoteBucketID | string |
remoteBucketName | string |
remoteID | string |
{- "description": "string",
- "dropNonRetryableData": true,
- "maxAgeSeconds": 0,
- "maxQueueSizeBytes": 33554430,
- "name": "string",
- "remoteBucketID": "string",
- "remoteBucketName": "string",
- "remoteID": "string"
}
{- "currentQueueSizeBytes": 0,
- "description": "string",
- "dropNonRetryableData": true,
- "id": "string",
- "latestErrorMessage": "string",
- "latestResponseCode": 0,
- "localBucketID": "string",
- "maxQueueSizeBytes": 0,
- "name": "string",
- "orgID": "string",
- "remainingBytesToBeSynced": 0,
- "remoteBucketID": "string",
- "remoteBucketName": "string",
- "remoteID": "string"
}
replicationID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
bucketID required | string The bucket ID. |
Content-Type | string Default: application/octet-stream Value: "application/octet-stream" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Database info serialized as protobuf.
"string"
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Metadata manifest for a bucket.
bucketID required | string |
bucketName required | string |
defaultRetentionPolicy required | string |
description | string |
organizationID required | string |
organizationName required | string |
required | Array of objects (RetentionPolicyManifests) |
{- "bucketID": "string",
- "bucketName": "string",
- "defaultRetentionPolicy": "string",
- "description": "string",
- "organizationID": "string",
- "organizationName": "string",
- "retentionPolicies": [
- {
- "duration": 0,
- "name": "string",
- "replicaN": 0,
- "shardGroupDuration": 0,
- "shardGroups": [
- {
- "deletedAt": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "id": 0,
- "shards": [
- {
- "id": 0,
- "shardOwners": [
- {
- "nodeID": 0
}
]
}
], - "startTime": "2019-08-24T14:15:22Z",
- "truncatedAt": "2019-08-24T14:15:22Z"
}
], - "subscriptions": [
- {
- "destinations": [
- "string"
], - "mode": "string",
- "name": "string"
}
]
}
]
}
{- "id": "string",
- "name": "string",
- "shardMappings": [
- {
- "newId": 0,
- "oldId": 0
}
]
}
Content-Encoding | string Default: identity Enum: "gzip" "identity" The value tells InfluxDB what compression is applied to the line protocol in the request payload.
To make an API request with a gzip payload, send |
Content-Type | string Default: application/octet-stream Value: "application/octet-stream" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Full KV snapshot.
{- "token": "string"
}
shardID required | string The shard ID. |
Content-Encoding | string Default: identity Enum: "gzip" "identity" The value tells InfluxDB what compression is applied to the line protocol in the request payload.
To make an API request with a gzip payload, send |
Content-Type | string Default: application/octet-stream Value: "application/octet-stream" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
TSM snapshot.
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Content-Encoding | string Default: identity Enum: "gzip" "identity" The value tells InfluxDB what compression is applied to the line protocol in the request payload.
To make an API request with a gzip-compressed payload, send |
Content-Type | string Default: application/octet-stream Value: "application/octet-stream" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Full SQL snapshot.
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Retrieves all the top level routes for the InfluxDB API.
"tasks":"/api/v2/tasks"
, and doesn't contain resource-specific routes
for tasks (/api/v2/tasks/TASK_ID/...
).Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "query": {
}, - "system": {
},
}
ruleID required | string The notification rule ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "flux": "string"
}
id | Array of strings List of scraper target IDs to return. If both |
name | string Specifies the name of the scraper target. |
org | string Specifies the organization name of the scraper target. |
orgID | string Specifies the organization ID of the scraper target. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "configurations": [
- {
- "allowInsecure": false,
- "bucketID": "string",
- "name": "string",
- "orgID": "string",
- "type": "prometheus",
- "bucket": "string",
- "id": "string",
- "links": {
- "bucket": "/api/v2/buckets/1",
- "members": "/api/v2/scrapers/1/members",
- "organization": "/api/v2/orgs/1",
- "owners": "/api/v2/scrapers/1/owners",
- "self": "/api/v2/scrapers/1"
}, - "org": "string"
}
]
}
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Scraper target to create
allowInsecure | boolean Default: false Skip TLS verification on endpoint. |
bucketID | string The ID of the bucket to write to. |
name | string The name of the scraper target. |
orgID | string The organization ID. |
type | string Value: "prometheus" The type of the metrics to be parsed. |
url | string The URL of the metrics endpoint. |
{- "allowInsecure": false,
- "bucketID": "string",
- "name": "string",
- "orgID": "string",
- "type": "prometheus",
}
{- "allowInsecure": false,
- "bucketID": "string",
- "name": "string",
- "orgID": "string",
- "type": "prometheus",
- "bucket": "string",
- "id": "string",
- "links": {
- "bucket": "/api/v2/buckets/1",
- "members": "/api/v2/scrapers/1/members",
- "organization": "/api/v2/orgs/1",
- "owners": "/api/v2/scrapers/1/owners",
- "self": "/api/v2/scrapers/1"
}, - "org": "string"
}
scraperTargetID required | string The identifier of the scraper target. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
scraperTargetID required | string The identifier of the scraper target. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "allowInsecure": false,
- "bucketID": "string",
- "name": "string",
- "orgID": "string",
- "type": "prometheus",
- "bucket": "string",
- "id": "string",
- "links": {
- "bucket": "/api/v2/buckets/1",
- "members": "/api/v2/scrapers/1/members",
- "organization": "/api/v2/orgs/1",
- "owners": "/api/v2/scrapers/1/owners",
- "self": "/api/v2/scrapers/1"
}, - "org": "string"
}
scraperTargetID required | string The identifier of the scraper target. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Scraper target update to apply
allowInsecure | boolean Default: false Skip TLS verification on endpoint. |
bucketID | string The ID of the bucket to write to. |
name | string The name of the scraper target. |
orgID | string The organization ID. |
type | string Value: "prometheus" The type of the metrics to be parsed. |
url | string The URL of the metrics endpoint. |
{- "allowInsecure": false,
- "bucketID": "string",
- "name": "string",
- "orgID": "string",
- "type": "prometheus",
}
{- "allowInsecure": false,
- "bucketID": "string",
- "name": "string",
- "orgID": "string",
- "type": "prometheus",
- "bucket": "string",
- "id": "string",
- "links": {
- "bucket": "/api/v2/buckets/1",
- "members": "/api/v2/scrapers/1/members",
- "organization": "/api/v2/orgs/1",
- "owners": "/api/v2/scrapers/1/owners",
- "self": "/api/v2/scrapers/1"
}, - "org": "string"
}
scraperTargetID required | string The scraper target ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
scraperTargetID required | string The scraper target ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Label to add
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
labelID required | string The label ID. |
scraperTargetID required | string The scraper target ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
scraperTargetID required | string The scraper target ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
]
}
scraperTargetID required | string The scraper target ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
User to add as member
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
scraperTargetID required | string The scraper target ID. |
userID required | string The ID of member to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
scraperTargetID required | string The scraper target ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
]
}
scraperTargetID required | string The scraper target ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
User to add as owner
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
scraperTargetID required | string The scraper target ID. |
userID required | string The ID of owner to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
orgID required | string The organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "secrets": [
- "string"
], - "links": {
- "org": "string",
- "self": "string"
}
}
orgID required | string The organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Secret key value pairs to update/add
property name* | string |
{- "apikey": "abc123xyz"
}
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
orgID required | string The organization ID. |
secretID required | string The secret ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
orgID required | string The organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Secret key to delete
secrets | Array of strings |
{- "secrets": [
- "string"
]
}
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Returns true
if no default user, organization, or bucket has been created.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "allowed": true
}
Post an onboarding request to set up initial user, org and bucket.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Source to create
bucket required | string |
org required | string |
password | string |
retentionPeriodHrs | integer Deprecated Retention period in nanoseconds for the new bucket. This key's name has been misleading since OSS 2.0 GA, please transition to use |
retentionPeriodSeconds | integer <int64> |
token | string Authentication token to set on the initial user. If not specified, the server will generate a token. |
username required | string |
{- "bucket": "string",
- "org": "string",
- "password": "string",
- "retentionPeriodHrs": 0,
- "retentionPeriodSeconds": 0,
- "token": "string",
- "username": "string"
}
{- "auth": {
- "description": "string",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "links": {
- "self": "/api/v2/authorizations/1",
- "user": "/api/v2/users/12"
}, - "org": "string",
- "orgID": "string",
- "permissions": [
- {
- "action": "read",
- "resource": {
- "id": "string",
- "name": "string",
- "org": "string",
- "orgID": "string",
- "type": "authorizations"
}
}
], - "token": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "user": "string",
- "userID": "string"
}, - "bucket": {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/buckets/1/labels",
- "members": "/api/v2/buckets/1/members",
- "org": "/api/v2/orgs/2",
- "owners": "/api/v2/buckets/1/owners",
- "self": "/api/v2/buckets/1",
- "write": "/api/v2/write?org=2&bucket=1"
}, - "name": "string",
- "orgID": "string",
- "retentionRules": [
- {
- "everySeconds": 86400,
- "shardGroupDurationSeconds": 0,
- "type": "expire"
}
], - "rp": "string",
- "schemaType": "implicit",
- "type": "user",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "org": {
- "createdAt": "2019-08-24T14:15:22Z",
- "defaultStorageType": "tsm",
- "description": "string",
- "id": "string",
- "links": {
- "buckets": "/api/v2/buckets?org=myorg",
- "dashboards": "/api/v2/dashboards?org=myorg",
- "labels": "/api/v2/orgs/1/labels",
- "members": "/api/v2/orgs/1/members",
- "owners": "/api/v2/orgs/1/owners",
- "secrets": "/api/v2/orgs/1/secrets",
- "self": "/api/v2/orgs/1",
- "tasks": "/api/v2/tasks?org=myorg"
}, - "name": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "user": {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
}
Authenticates Basic authentication credentials for a user, and then, if successful, generates a user session.
To authenticate a user, pass the HTTP Authorization
header with the
Basic
scheme and the base64-encoded username and password.
For syntax and more information, see Basic Authentication for
syntax and more information.
If authentication is successful, InfluxDB creates a new session for the user
and then returns the session cookie in the Set-Cookie
response header.
InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl --request POST http://localhost:8086/api/v2/signin \ --user "USERNAME:PASSWORD"
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Expires a user session specified by a session cookie.
Use this endpoint to expire a user session that was generated when the user
authenticated with the InfluxDB Developer Console (UI) or the POST /api/v2/signin
endpoint.
For example, the POST /api/v2/signout
endpoint represents the third step
in the following three-step process
to authenticate a user, retrieve the user
resource, and then expire the session:
POST /api/v2/signin
endpoint to create a user session and
generate a session cookie.GET /api/v2/me
endpoint, passing the stored session cookie
from step 1 to retrieve user information.POST /api/v2/signout
endpoint, passing the stored session
cookie to expire the session.See the complete example in request samples.
InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance.
To learn more about cookies in HTTP requests, see Mozilla Developer Network (MDN) Web Docs, HTTP cookies.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
# The following example shows how to use cURL and the InfluxDB API # to do the following: # 1. Sign in a user with a username and password. # 2. Check that the user session exists for the user. # 3. Sign out the user to expire the session. # 4. Check that the session is no longer active. # 1. Send a request to `POST /api/v2/signin` to sign in the user. # In your request, pass the following: # # - `--user` option with basic authentication credentials. # - `-c` option with a file path where cURL will write cookies. curl --request POST \ -c ./cookie-file.tmp \ "$INFLUX_URL/api/v2/signin" \ --user "${INFLUX_USER_NAME}:${INFLUX_USER_PASSWORD}" # 2. To check that a user session exists for the user in step 1, # send a request to `GET /api/v2/me`. # In your request, pass the `-b` option with the session cookie file path from step 1. curl --request GET \ -b ./cookie-file.tmp \ "$INFLUX_URL/api/v2/me" # InfluxDB responds with the `user` resource. # 3. Send a request to `POST /api/v2/signout` to expire the user session. # In your request, pass the `-b` option with the session cookie file path from step 1. curl --request POST \ -b ./cookie-file.tmp \ "$INFLUX_URL/api/v2/signout" # If the user session is successfully expired, InfluxDB responds with an HTTP `204` status code. # 4. To check that the user session is expired, call `GET /api/v2/me` again, # passing the `-b` option with the cookie file path. curl --request GET \ -b ./cookie-file.tmp \ "$INFLUX_URL/api/v2/me" # If the user session is expired, InfluxDB responds with an HTTP `401` status code.
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
org | string The name of the organization. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "sources": [
- {
- "default": true,
- "defaultRP": "string",
- "id": "string",
- "insecureSkipVerify": true,
- "languages": [
- "flux"
], - "links": {
- "buckets": "string",
- "health": "string",
- "query": "string",
- "self": "string"
}, - "name": "string",
- "orgID": "string",
- "password": "string",
- "sharedSecret": "string",
- "telegraf": "string",
- "token": "string",
- "type": "v1",
- "username": "string"
}
]
}
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Source to create
default | boolean |
defaultRP | string |
id | string |
insecureSkipVerify | boolean |
object | |
metaUrl | string <uri> |
name | string |
orgID | string |
password | string |
sharedSecret | string |
telegraf | string |
token | string |
type | string Enum: "v1" "v2" "self" |
url | string <uri> |
username | string |
{- "default": true,
- "defaultRP": "string",
- "id": "string",
- "insecureSkipVerify": true,
- "links": {
- "buckets": "string",
- "health": "string",
- "query": "string",
- "self": "string"
}, - "name": "string",
- "orgID": "string",
- "password": "string",
- "sharedSecret": "string",
- "telegraf": "string",
- "token": "string",
- "type": "v1",
- "username": "string"
}
{- "default": true,
- "defaultRP": "string",
- "id": "string",
- "insecureSkipVerify": true,
- "languages": [
- "flux"
], - "links": {
- "buckets": "string",
- "health": "string",
- "query": "string",
- "self": "string"
}, - "name": "string",
- "orgID": "string",
- "password": "string",
- "sharedSecret": "string",
- "telegraf": "string",
- "token": "string",
- "type": "v1",
- "username": "string"
}
sourceID required | string The source ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
sourceID required | string The source ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "default": true,
- "defaultRP": "string",
- "id": "string",
- "insecureSkipVerify": true,
- "languages": [
- "flux"
], - "links": {
- "buckets": "string",
- "health": "string",
- "query": "string",
- "self": "string"
}, - "name": "string",
- "orgID": "string",
- "password": "string",
- "sharedSecret": "string",
- "telegraf": "string",
- "token": "string",
- "type": "v1",
- "username": "string"
}
sourceID required | string The source ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Source update
default | boolean |
defaultRP | string |
id | string |
insecureSkipVerify | boolean |
object | |
metaUrl | string <uri> |
name | string |
orgID | string |
password | string |
sharedSecret | string |
telegraf | string |
token | string |
type | string Enum: "v1" "v2" "self" |
url | string <uri> |
username | string |
{- "default": true,
- "defaultRP": "string",
- "id": "string",
- "insecureSkipVerify": true,
- "links": {
- "buckets": "string",
- "health": "string",
- "query": "string",
- "self": "string"
}, - "name": "string",
- "orgID": "string",
- "password": "string",
- "sharedSecret": "string",
- "telegraf": "string",
- "token": "string",
- "type": "v1",
- "username": "string"
}
{- "default": true,
- "defaultRP": "string",
- "id": "string",
- "insecureSkipVerify": true,
- "languages": [
- "flux"
], - "links": {
- "buckets": "string",
- "health": "string",
- "query": "string",
- "self": "string"
}, - "name": "string",
- "orgID": "string",
- "password": "string",
- "sharedSecret": "string",
- "telegraf": "string",
- "token": "string",
- "type": "v1",
- "username": "string"
}
sourceID required | string The source ID. |
org | string The name of the organization. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "buckets": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/buckets/1/labels",
- "members": "/api/v2/buckets/1/members",
- "org": "/api/v2/orgs/2",
- "owners": "/api/v2/buckets/1/owners",
- "self": "/api/v2/buckets/1",
- "write": "/api/v2/write?org=2&bucket=1"
}, - "name": "string",
- "orgID": "string",
- "retentionRules": [
- {
- "everySeconds": 86400,
- "shardGroupDurationSeconds": 0,
- "type": "expire"
}
], - "rp": "string",
- "schemaType": "implicit",
- "type": "user",
- "updatedAt": "2019-08-24T14:15:22Z"
}
],
}
sourceID required | string The source ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "checks": [
- { }
], - "commit": "string",
- "message": "string",
- "name": "string",
- "status": "pass",
- "version": "string"
}
Process and analyze your data with tasks
in the InfluxDB task engine.
Use the /api/v2/tasks
endpoints to schedule and manage tasks, retry task runs, and retrieve run logs.
To configure a task, provide the script and the schedule to run the task.
For examples, see how to create a task with the POST /api/v2/tasks
endpoint.
A task
object contains information about an InfluxDB task resource.
The following table defines the properties that appear in a task
object:
authorizationID | string An authorization ID. Specifies the authorization used when the task communicates with the query engine. To find an authorization ID, use the
|
createdAt | string <date-time> |
cron | string A Cron expression that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions. |
description | string A description of the task. |
every | string <duration> The interval (duration literal) at which the task runs. |
flux required | string <flux> The Flux script that the task executes. |
id required | string |
Array of objects (Labels) | |
lastRunError | string |
lastRunStatus | string Enum: "failed" "success" "canceled" |
latestCompleted | string <date-time> A timestamp (RFC3339 date/time format) of the latest scheduled and completed run. |
object | |
name required | string The name of the task. |
offset | string <duration> A duration to delay execution of the task after the scheduled time has elapsed. |
org | string An organization name. Specifies the organization that owns the task. |
orgID required | string An organization ID. Specifies the organization that owns the task. |
ownerID | string A user ID. Specifies the owner of the task. To find a user ID, you can use the
|
status | string (TaskStatusType) Enum: "active" "inactive"
|
updatedAt | string <date-time> |
{- "authorizationID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "cron": "string",
- "description": "string",
- "every": "string",
- "flux": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/tasks/1/labels",
- "logs": "/api/v2/tasks/1/logs",
- "members": "/api/v2/tasks/1/members",
- "owners": "/api/v2/tasks/1/owners",
- "runs": "/api/v2/tasks/1/runs",
- "self": "/api/v2/tasks/1"
}, - "name": "string",
- "offset": "string",
- "org": "string",
- "orgID": "string",
- "ownerID": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Retrieves a list of tasks.
To limit which tasks are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all tasks up to the default limit
.
after | string A task ID. Only returns tasks created after the specified task. |
limit | integer [ 1 .. 500 ] Default: 100 The maximum number of tasks to return.
Default is To reduce the payload size, combine |
name | string A task name. Only returns tasks with the specified name. Different tasks may have the same name. |
org | string An organization name. Only returns tasks owned by the specified organization. |
orgID | string An organization ID. Only returns tasks owned by the specified organization. |
status | string Enum: "active" "inactive" A task status.
Only returns tasks that have the specified status ( |
type | string Default: "" Enum: "basic" "system" A task type ( |
user | string A user ID. Only returns tasks owned by the specified user. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
curl https://localhost:8086/api/v2/tasks/?limit=-1&type=basic \ --header 'Content-Type: application/json' \ --header 'Authorization: Token INFLUX_API_TOKEN'
A sample response body for the ?type=basic
parameter.
type=basic
omits some task fields (createdAt
and updatedAt
)
and field values (org
, flux
) in the response.
{- "links": {
- "self": "/api/v2/tasks?limit=100"
}, - "tasks": [
- {
- "every": "30m",
- "flux": "",
- "id": "09956cbb6d378000",
- "labels": [ ],
- "lastRunStatus": "success",
- "latestCompleted": "2022-06-30T15:00:00Z",
- "links": {
- "labels": "/api/v2/tasks/09956cbb6d378000/labels",
- "logs": "/api/v2/tasks/09956cbb6d378000/logs",
- "members": "/api/v2/tasks/09956cbb6d378000/members",
- "owners": "/api/v2/tasks/09956cbb6d378000/owners",
- "runs": "/api/v2/tasks/09956cbb6d378000/runs",
- "self": "/api/v2/tasks/09956cbb6d378000"
}, - "name": "task1",
- "org": "",
- "orgID": "48c88459ee424a04",
- "ownerID": "0772396d1f411000",
- "status": "active"
}
]
}
Creates a task and returns the task.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The task to create.
description | string An optional description of the task. |
flux required | string The Flux script to run for this task. |
org | string The name of the organization that owns this Task. |
orgID | string The ID of the organization that owns this Task. |
status | string (TaskStatusType) Enum: "active" "inactive"
|
{- "description": "string",
- "flux": "string",
- "org": "string",
- "orgID": "string",
- "status": "active"
}
{- "authorizationID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "cron": "string",
- "description": "string",
- "every": "string",
- "flux": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/tasks/1/labels",
- "logs": "/api/v2/tasks/1/logs",
- "members": "/api/v2/tasks/1/members",
- "owners": "/api/v2/tasks/1/owners",
- "runs": "/api/v2/tasks/1/runs",
- "self": "/api/v2/tasks/1"
}, - "name": "string",
- "offset": "string",
- "org": "string",
- "orgID": "string",
- "ownerID": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Deletes a task and associated records.
Use this endpoint to delete a task and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task.
If you want to disable a task instead of delete it, update the task status to inactive
.
taskID required | string The ID of the task to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "invalid",
- "message": "failed to decode request body: organization not found"
}
Retrieves a task.
taskID required | string The ID of the task to retrieve. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "authorizationID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "cron": "string",
- "description": "string",
- "every": "string",
- "flux": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/tasks/1/labels",
- "logs": "/api/v2/tasks/1/logs",
- "members": "/api/v2/tasks/1/members",
- "owners": "/api/v2/tasks/1/owners",
- "runs": "/api/v2/tasks/1/runs",
- "self": "/api/v2/tasks/1"
}, - "name": "string",
- "offset": "string",
- "org": "string",
- "orgID": "string",
- "ownerID": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Updates a task and then cancels all scheduled runs of the task.
Use this endpoint to set, modify, and clear task properties (for example: cron
, name
, flux
, status
).
Once InfluxDB applies the update, it cancels all previously scheduled runs of the task.
To update a task, pass an object that contains the updated key-value pairs.
To activate or inactivate a task, set the status
property.
"status": "inactive"
cancels scheduled runs and prevents manual runs of the task.
taskID required | string The ID of the task to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
An object that contains updated task properties to apply.
cron | string Update the 'cron' option in the flux script. |
description | string Update the description of the task. |
every | string Update the 'every' option in the flux script. |
flux | string The Flux script that the task runs. |
name | string Update the 'name' option in the flux script. |
offset | string Update the 'offset' option in the flux script. |
status | string (TaskStatusType) Enum: "active" "inactive"
|
{- "cron": "string",
- "description": "string",
- "every": "string",
- "flux": "string",
- "name": "string",
- "offset": "string",
- "status": "active"
}
{- "authorizationID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "cron": "string",
- "description": "string",
- "every": "string",
- "flux": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/tasks/1/labels",
- "logs": "/api/v2/tasks/1/logs",
- "members": "/api/v2/tasks/1/members",
- "owners": "/api/v2/tasks/1/owners",
- "runs": "/api/v2/tasks/1/runs",
- "self": "/api/v2/tasks/1"
}, - "name": "string",
- "offset": "string",
- "org": "string",
- "orgID": "string",
- "ownerID": "string",
- "status": "active",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Retrieves a list of all labels for a task.
Labels may be used for grouping and filtering tasks.
taskID required | string The ID of the task to retrieve labels for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
Adds a label to a task.
Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI.
taskID required | string The ID of the task to label. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
An object that contains a labelID
to add to the task.
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
Deletes a label from a task.
labelID required | string The ID of the label to delete. |
taskID required | string The ID of the task to delete the label from. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "invalid",
- "message": "failed to decode request body: organization not found"
}
Retrieves a list of all logs for a task.
When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt.
Use this endpoint to retrieve only the log events for a task, without additional task metadata.
taskID required | string The task ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "events": [
- {
- "message": "Started task from script: \"option task = {name: \\\"test task\\\", every: 3d, offset: 0s}\"",
- "runID": "09a946fc3167d000",
- "time": "2022-07-13T07:06:54.198167Z"
}, - {
- "message": "Completed(failed)",
- "runID": "09a946fc3167d000",
- "time": "2022-07-13T07:07:13.104037Z"
}, - {
- "message": "error exhausting result iterator: error in query specification while starting program: this Flux script returns no streaming data. Consider adding a \"yield\" or invoking streaming functions directly, without performing an assignment",
- "runID": "09a946fc3167d000",
- "time": "2022-07-13T08:24:37.115323Z"
}
]
}
Deprecated: Tasks don't use owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.
Lists all users that have the member
role for the specified task.
taskID required | string The task ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
]
}
Deprecated: Tasks don't use owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.
Adds a user to members of a task and returns the member.
taskID required | string The task ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
A user to add as a member of the task.
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
Deprecated: Tasks don't use owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.
Removes a member from a task.
taskID required | string The task ID. |
userID required | string The ID of the member to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Deprecated: Tasks don't use owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.
Retrieves all users that have owner permission for a task.
taskID required | string The ID of the task to retrieve owners for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
]
}
Deprecated: Tasks don't use owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.
Assigns a task owner
role to a user.
Use this endpoint to create a resource owner for the task.
A resource owner is a user with role: owner
for a specific resource.
taskID required | string The task ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
A user to add as an owner of the task.
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "0772396d1f411000",
- "links": {
- "logs": "/api/v2/users/0772396d1f411000/logs",
- "self": "/api/v2/users/0772396d1f411000"
}, - "name": "USER_NAME",
- "role": "owner",
- "status": "active"
}
Deprecated: Tasks don't use owner
and member
roles.
Use /api/v2/authorizations
to assign user permissions.
taskID required | string The task ID. |
userID required | string The ID of the owner to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Retrieves a list of runs for a task.
To limit which task runs are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all task runs up to the default limit
.
taskID required | string The ID of the task to get runs for. Only returns runs for this task. |
after | string A task run ID. Only returns runs created after this run. |
afterTime | string <date-time> A timestamp (RFC3339 date/time format). Only returns runs scheduled after this time. |
beforeTime | string <date-time> A timestamp (RFC3339 date/time format). Only returns runs scheduled before this time. |
limit | integer [ 1 .. 500 ] Default: 100 Limits the number of task runs returned. Default is |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "runs": [
- {
- "finishedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "flux": "string",
- "id": "string",
- "links": {
- "retry": "/api/v2/tasks/1/runs/1/retry",
- "self": "/api/v2/tasks/1/runs/1",
- "task": "/api/v2/tasks/1"
}, - "log": [
- {
- "message": "Halt and catch fire",
- "runID": "string",
- "time": "2006-01-02T15:04:05.999999999Z07:00"
}
], - "requestedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "scheduledFor": "2019-08-24T14:15:22Z",
- "startedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "status": "scheduled",
- "taskID": "string"
}
]
}
Schedules a task run to start immediately, ignoring scheduled runs.
Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks.
To retry a previous run (and avoid creating a new run),
use the POST /api/v2/tasks/{taskID}/runs/{runID}/retry
endpoint.
taskID required | string |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
scheduledFor | string or null <date-time> The time RFC3339 date/time format
used for the run's |
{- "scheduledFor": "2019-08-24T14:15:22Z"
}
{- "finishedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "flux": "string",
- "id": "string",
- "links": {
- "retry": "/api/v2/tasks/1/runs/1/retry",
- "self": "/api/v2/tasks/1/runs/1",
- "task": "/api/v2/tasks/1"
}, - "log": [
- {
- "message": "Halt and catch fire",
- "runID": "string",
- "time": "2006-01-02T15:04:05.999999999Z07:00"
}
], - "requestedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "scheduledFor": "2019-08-24T14:15:22Z",
- "startedAt": "2006-01-02T15:04:05.999999999Z07:00",
- "status": "scheduled",
- "taskID": "string"
}
Cancels a running task.
Use this endpoint with InfluxDB OSS to cancel a running task.
runID required | string The ID of the task run to cancel. |
taskID required | string The ID of the task to cancel. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "invalid",
- "message": "failed to decode request body: organization not found"
}
Retrieves a specific run for a task.
Use this endpoint to retrieve detail and logs for a specific task run.
runID required | string The ID of the run to retrieve. |
taskID required | string The ID of the task to retrieve runs for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "finishedAt": "2022-07-18T14:46:07.308254Z",
- "id": "09b070dadaa7d000",
- "links": {
- "logs": "/api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000/logs",
- "retry": "/api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000/retry",
- "self": "/api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000",
- "task": "/api/v2/tasks/0996e56b2f378000"
}, - "log": [
- {
- "message": "Started task from script: \"option task = {name: \\\"task1\\\", every: 30m} from(bucket: \\\"iot_center\\\") |> range(start: -90d) |> filter(fn: (r) => r._measurement == \\\"environment\\\") |> aggregateWindow(every: 1h, fn: mean)\"",
- "runID": "09b070dadaa7d000",
- "time": "2022-07-18T14:46:07.101231Z"
}, - {
- "message": "Completed(success)",
- "runID": "09b070dadaa7d000",
- "time": "2022-07-18T14:46:07.242859Z"
}
], - "requestedAt": "2022-07-18T14:46:06Z",
- "scheduledFor": "2022-07-18T14:46:06Z",
- "startedAt": "2022-07-18T14:46:07.16222Z",
- "status": "success",
- "taskID": "0996e56b2f378000"
}
Retrieves all logs for a task run.
A log is a list of run events with runID
, time
, and message
properties.
Use this endpoint to help analyze task performance and troubleshoot failed task runs.
runID required | string The ID of the run to get logs for. |
taskID required | string The ID of the task to get logs for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "events": [
- {
- "message": "Started task from script: \"option task = {name: \\\"test task\\\", every: 3d, offset: 0s}\"",
- "runID": "09a946fc3167d000",
- "time": "2022-07-13T07:06:54.198167Z"
}, - {
- "message": "Completed(failed)",
- "runID": "09a946fc3167d000",
- "time": "2022-07-13T07:07:13.104037Z"
}, - {
- "message": "error exhausting result iterator: error in query specification while starting program: this Flux script returns no streaming data. Consider adding a \"yield\" or invoking streaming functions directly, without performing an assignment",
- "runID": "09a946fc3167d000",
- "time": "2022-07-13T08:24:37.115323Z"
}
]
}
Queues a task run to retry and returns the scheduled run.
To manually start a new task run, use the
POST /api/v2/tasks/{taskID}/runs
endpoint.
status: "active"
).runID required | string A task run ID. Specifies the task run to retry. To find a task run ID, use the
|
taskID required | string A task ID. Specifies the task to retry. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{ }
{- "id": "09d60ffe08738000",
- "links": {
- "logs": "/api/v2/tasks/09a776832f381000/runs/09d60ffe08738000/logs",
- "retry": "/api/v2/tasks/09a776832f381000/runs/09d60ffe08738000/retry",
- "self": "/api/v2/tasks/09a776832f381000/runs/09d60ffe08738000",
- "task": "/api/v2/tasks/09a776832f381000"
}, - "requestedAt": "2022-08-16T20:05:11.84145Z",
- "scheduledFor": "2022-08-15T00:00:00Z",
- "status": "scheduled",
- "taskID": "09a776832f381000"
}
type | string The type of plugin desired. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "os": "string",
- "plugins": [
- {
- "config": "string",
- "description": "string",
- "name": "string",
- "type": "string"
}
], - "version": "string"
}
orgID | string The organization ID the Telegraf config belongs to. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "configurations": [
- {
- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/telegrafs/1/labels",
- "members": "/api/v2/telegrafs/1/members",
- "owners": "/api/v2/telegrafs/1/owners",
- "self": "/api/v2/telegrafs/1"
}
}
]
}
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Telegraf configuration to create
config | string |
description | string |
object | |
name | string |
orgID | string |
Array of objects |
{- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string",
- "plugins": [
- {
- "alias": "string",
- "config": "string",
- "description": "string",
- "name": "string",
- "type": "string"
}
]
}
{- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/telegrafs/1/labels",
- "members": "/api/v2/telegrafs/1/members",
- "owners": "/api/v2/telegrafs/1/owners",
- "self": "/api/v2/telegrafs/1"
}
}
telegrafID required | string The Telegraf configuration ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
telegrafID required | string The Telegraf configuration ID. |
Accept | string Default: application/toml Enum: "application/toml" "application/json" "application/octet-stream" |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/telegrafs/1/labels",
- "members": "/api/v2/telegrafs/1/members",
- "owners": "/api/v2/telegrafs/1/owners",
- "self": "/api/v2/telegrafs/1"
}
}
telegrafID required | string The Telegraf config ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Telegraf configuration update to apply
config | string |
description | string |
object | |
name | string |
orgID | string |
Array of objects |
{- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string",
- "plugins": [
- {
- "alias": "string",
- "config": "string",
- "description": "string",
- "name": "string",
- "type": "string"
}
]
}
{- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/telegrafs/1/labels",
- "members": "/api/v2/telegrafs/1/members",
- "owners": "/api/v2/telegrafs/1/owners",
- "self": "/api/v2/telegrafs/1"
}
}
telegrafID required | string The Telegraf config ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
telegrafID required | string The Telegraf config ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Label to add
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
labelID required | string The label ID. |
telegrafID required | string The Telegraf config ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
telegrafID required | string The Telegraf config ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
]
}
telegrafID required | string The Telegraf config ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
User to add as member
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "member"
}
telegrafID required | string The Telegraf config ID. |
userID required | string The ID of the member to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
telegrafID required | string The Telegraf configuration ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
]
}
telegrafID required | string The Telegraf configuration ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
User to add as owner
id required | string The ID of the user to add to the resource. |
name | string The name of the user to add to the resource. |
{- "id": "string",
- "name": "string"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active",
- "role": "owner"
}
telegrafID required | string The Telegraf config ID. |
userID required | string The ID of the owner to remove. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
Export and apply InfluxDB templates. Manage stacks of templated InfluxDB resources.
InfluxDB templates are prepackaged configurations for everything from dashboards and Telegraf to notifications and alerts. Use InfluxDB templates to quickly configure a fresh instance of InfluxDB, back up your dashboard configuration, or share your configuration with the InfluxData community.
Use the /api/v2/templates
endpoints to export templates and apply templates.
InfluxDB stacks are stateful InfluxDB templates that let you add, update, and remove installed template resources over time, avoid duplicating resources when applying the same or similar templates more than once, and apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
Use the /api/v2/stacks
endpoints to manage installed template resources.
Lists installed InfluxDB stacks.
To limit stacks in the response, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all installed stacks for the organization.
name | string Examples:
A stack name.
Finds stack Repeatable. To filter for more than one stack name, repeat this parameter with each name--for example:
|
orgID required | string An organization ID. Only returns stacks owned by the specified organization. InfluxDB Cloud
|
stackID | string Examples:
A stack ID. Only returns the specified stack. Repeatable. To filter for more than one stack ID, repeat this parameter with each ID--for example:
|
{- "stacks": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "events": [
- {
- "description": "string",
- "eventType": "string",
- "name": "string",
- "resources": [
- {
- "apiVersion": "string",
- "associations": [
- {
- "kind": "Bucket",
- "metaName": "string"
}
], - "kind": "Bucket",
- "links": {
- "self": "string"
}, - "resourceID": "string",
- "templateMetaName": "string"
}
], - "sources": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z",
- "urls": [
- "string"
]
}
], - "id": "string",
- "orgID": "string"
}
]
}
Creates or initializes a stack.
Use this endpoint to manually initialize a new stack with the following optional information:
To automatically create a stack when applying templates, use the /api/v2/templates/apply endpoint.
write
permission for the organizationThe stack to create.
description | string |
name | string |
orgID | string |
urls | Array of strings |
{- "description": "string",
- "name": "string",
- "orgID": "string",
- "urls": [
- "string"
]
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "events": [
- {
- "description": "string",
- "eventType": "string",
- "name": "string",
- "resources": [
- {
- "apiVersion": "string",
- "associations": [
- {
- "kind": "Bucket",
- "metaName": "string"
}
], - "kind": "Bucket",
- "links": {
- "self": "string"
}, - "resourceID": "string",
- "templateMetaName": "string"
}
], - "sources": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z",
- "urls": [
- "string"
]
}
], - "id": "string",
- "orgID": "string"
}
stack_id required | string The identifier of the stack. |
orgID required | string The identifier of the organization. |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
stack_id required | string The identifier of the stack. |
{- "createdAt": "2019-08-24T14:15:22Z",
- "events": [
- {
- "description": "string",
- "eventType": "string",
- "name": "string",
- "resources": [
- {
- "apiVersion": "string",
- "associations": [
- {
- "kind": "Bucket",
- "metaName": "string"
}
], - "kind": "Bucket",
- "links": {
- "self": "string"
}, - "resourceID": "string",
- "templateMetaName": "string"
}
], - "sources": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z",
- "urls": [
- "string"
]
}
], - "id": "string",
- "orgID": "string"
}
stack_id required | string The identifier of the stack. |
The stack to update.
Array of objects | |
description | string or null |
name | string or null |
templateURLs | Array of strings or null |
{- "additionalResources": [
- {
- "kind": "string",
- "resourceID": "string",
- "templateMetaName": "string"
}
], - "description": "string",
- "name": "string",
- "templateURLs": [
- "string"
]
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "events": [
- {
- "description": "string",
- "eventType": "string",
- "name": "string",
- "resources": [
- {
- "apiVersion": "string",
- "associations": [
- {
- "kind": "Bucket",
- "metaName": "string"
}
], - "kind": "Bucket",
- "links": {
- "self": "string"
}, - "resourceID": "string",
- "templateMetaName": "string"
}
], - "sources": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z",
- "urls": [
- "string"
]
}
], - "id": "string",
- "orgID": "string"
}
stack_id required | string The identifier of the stack. |
{- "createdAt": "2019-08-24T14:15:22Z",
- "events": [
- {
- "description": "string",
- "eventType": "string",
- "name": "string",
- "resources": [
- {
- "apiVersion": "string",
- "associations": [
- {
- "kind": "Bucket",
- "metaName": "string"
}
], - "kind": "Bucket",
- "links": {
- "self": "string"
}, - "resourceID": "string",
- "templateMetaName": "string"
}
], - "sources": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z",
- "urls": [
- "string"
]
}
], - "id": "string",
- "orgID": "string"
}
Applies a template to create or update a stack of InfluxDB resources. The response contains the diff of changes and the stack ID.
Use this endpoint to install an InfluxDB template to an organization.
Provide template URLs or template objects in your request.
To customize which template resources are installed, use the actions
parameter.
By default, when you apply a template, InfluxDB installs the template to
create and update stack resources and then generates a diff of the changes.
If you pass dryRun: true
in the request body, InfluxDB validates the
template and generates the resource diff, but doesn’t make any
changes to your instance.
Some templates may contain environment references for custom metadata.
To provide custom values for environment references, pass the envRefs
property in the request body.
For more information and examples, see how to
define environment references.
Some templates may contain queries that use
secrets.
To provide custom secret values, pass the secrets
property
in the request body.
Don't expose secret values in templates.
For more information, see how to pass secrets when installing a template.
write
permissions for resource types in the template.Parameters for applying templates.
Array of objects or objects A list of You can use the following actions to prevent creating or updating resources:
| |
dryRun | boolean Only applies a dry run of the templates passed in the request.
|
object An object with key-value pairs that map to environment references in templates. Environment references in templates are When you apply a template, InfluxDB replaces The following template fields may use environment references:
For more information about including environment references in template fields, see how to include user-definable resource names. | |
orgID | string Organization ID. InfluxDB applies templates to this organization. The organization owns all resources created by the template. To find your organization, see how to view organizations. |
Array of objects A list of URLs for template files. To apply a template manifest file located at a URL, pass | |
object An object with key-value pairs that map to secrets in queries. Queries may reference secrets stored in InfluxDB--for example,
the following Flux script retrieves
To define secret values in your
InfluxDB stores the key-value pairs as secrets that you can access with Related guides | |
stackID | string ID of the stack to update. To apply templates to an existing stack in the organization, use the To find a stack ID, use the InfluxDB Related guides |
object A template object to apply.
A template object has a Pass | |
Array of objects A list of template objects to apply.
A template object has a Use the |
{- "actions": [
- {
- "action": "skipKind",
- "properties": {
- "kind": "Bucket"
}
}, - {
- "action": "skipKind",
- "properties": {
- "kind": "Task"
}
}
], - "orgID": "INFLUX_ORG_ID",
- "templates": [
- {
- "contents": [
- {
- "[object Object]": null
}
]
}
]
}
{- "diff": {
- "buckets": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "description": "string",
- "name": "string",
- "retentionRules": [
- {
- "everySeconds": 86400,
- "shardGroupDurationSeconds": 0,
- "type": "expire"
}
]
}, - "old": {
- "description": "string",
- "name": "string",
- "retentionRules": [
- {
- "everySeconds": 86400,
- "shardGroupDurationSeconds": 0,
- "type": "expire"
}
]
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "checks": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- null
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "every": "string",
- "level": "UNKNOWN",
- "offset": "string",
- "reportZero": true,
- "staleTime": "string",
- "statusMessageTemplate": "string",
- "tags": [
- {
- "key": "string",
- "value": "string"
}
], - "timeSince": "string",
- "type": "deadman"
}, - "old": {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- null
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "every": "string",
- "level": "UNKNOWN",
- "offset": "string",
- "reportZero": true,
- "staleTime": "string",
- "statusMessageTemplate": "string",
- "tags": [
- {
- "key": "string",
- "value": "string"
}
], - "timeSince": "string",
- "type": "deadman"
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "dashboards": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "charts": [
- {
- "height": 0,
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": null,
- "bounds": [ ],
- "label": null,
- "prefix": null,
- "scale": null,
- "suffix": null
}, - "y": {
- "base": null,
- "bounds": [ ],
- "label": null,
- "prefix": null,
- "scale": null,
- "suffix": null
}
}, - "colors": [
- {
- "hex": null,
- "id": null,
- "name": null,
- "type": null,
- "value": null
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": null,
- "editMode": null,
- "name": null,
- "text": null
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}, - "width": 0,
- "xPos": 0,
- "yPos": 0
}
], - "description": "string",
- "name": "string"
}, - "old": {
- "charts": [
- {
- "height": 0,
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": null,
- "bounds": [ ],
- "label": null,
- "prefix": null,
- "scale": null,
- "suffix": null
}, - "y": {
- "base": null,
- "bounds": [ ],
- "label": null,
- "prefix": null,
- "scale": null,
- "suffix": null
}
}, - "colors": [
- {
- "hex": null,
- "id": null,
- "name": null,
- "type": null,
- "value": null
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": null,
- "editMode": null,
- "name": null,
- "text": null
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}, - "width": 0,
- "xPos": 0,
- "yPos": 0
}
], - "description": "string",
- "name": "string"
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "labelMappings": [
- {
- "labelID": "string",
- "labelName": "string",
- "labelTemplateMetaName": "string",
- "resourceID": "string",
- "resourceName": "string",
- "resourceTemplateMetaName": "string",
- "resourceType": "string",
- "status": "string"
}
], - "labels": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "color": "string",
- "description": "string",
- "name": "string"
}, - "old": {
- "color": "string",
- "description": "string",
- "name": "string"
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "notificationEndpoints": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "slack",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "token": "string",
- "url": "string"
}, - "old": {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "slack",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "token": "string",
- "url": "string"
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "notificationRules": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "description": "string",
- "endpointID": "string",
- "endpointName": "string",
- "endpointType": "string",
- "every": "string",
- "messageTemplate": "string",
- "name": "string",
- "offset": "string",
- "status": "string",
- "statusRules": [
- {
- "currentLevel": "string",
- "previousLevel": "string"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "string",
- "value": "string"
}
]
}, - "old": {
- "description": "string",
- "endpointID": "string",
- "endpointName": "string",
- "endpointType": "string",
- "every": "string",
- "messageTemplate": "string",
- "name": "string",
- "offset": "string",
- "status": "string",
- "statusRules": [
- {
- "currentLevel": "string",
- "previousLevel": "string"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "string",
- "value": "string"
}
]
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "tasks": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "cron": "string",
- "description": "string",
- "every": "string",
- "name": "string",
- "offset": "string",
- "query": "string",
- "status": "string"
}, - "old": {
- "cron": "string",
- "description": "string",
- "every": "string",
- "name": "string",
- "offset": "string",
- "query": "string",
- "status": "string"
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "telegrafConfigs": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string"
}, - "old": {
- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string"
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
], - "variables": [
- {
- "id": "string",
- "kind": "Bucket",
- "new": {
- "args": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "description": "string",
- "name": "string"
}, - "old": {
- "args": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "description": "string",
- "name": "string"
}, - "stateStatus": "string",
- "templateMetaName": "string"
}
]
}, - "errors": [
- {
- "fields": [
- "string"
], - "indexes": [
- 0
], - "kind": "Bucket",
- "reason": "string"
}
], - "sources": [
- "string"
], - "stackID": "string",
- "summary": {
- "buckets": [
- {
- "description": "string",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "labelAssociations": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "name": "string",
- "orgID": "string",
- "retentionPeriod": 0,
- "templateMetaName": "string"
}
], - "checks": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "lastRunError": "string",
- "lastRunStatus": "failed",
- "latestCompleted": "2019-08-24T14:15:22Z",
- "links": {
- "labels": "/api/v2/checks/1/labels",
- "members": "/api/v2/checks/1/members",
- "owners": "/api/v2/checks/1/owners",
- "query": "/api/v2/checks/1/query",
- "self": "/api/v2/checks/1"
}, - "name": "string",
- "orgID": "string",
- "ownerID": "string",
- "query": {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}, - "status": "active",
- "taskID": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "every": "string",
- "level": "UNKNOWN",
- "offset": "string",
- "reportZero": true,
- "staleTime": "string",
- "statusMessageTemplate": "string",
- "tags": [
- {
- "key": "string",
- "value": "string"
}
], - "timeSince": "string",
- "type": "deadman",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "kind": "Bucket",
- "labelAssociations": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "templateMetaName": "string"
}
], - "dashboards": [
- {
- "charts": [
- {
- "height": 0,
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- null
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- null
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": { },
- "buckets": [ ],
- "functions": [ ],
- "tags": [ ]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}, - "width": 0,
- "xPos": 0,
- "yPos": 0
}
], - "description": "string",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "labelAssociations": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "name": "string",
- "orgID": "string",
- "templateMetaName": "string"
}
], - "labelMappings": [
- {
- "labelID": "string",
- "labelName": "string",
- "labelTemplateMetaName": "string",
- "resourceID": "string",
- "resourceName": "string",
- "resourceTemplateMetaName": "string",
- "resourceType": "string",
- "status": "string"
}
], - "labels": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "missingEnvRefs": [
- "string"
], - "missingSecrets": [
- "string"
], - "notificationEndpoints": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "links": {
- "labels": "/api/v2/notificationEndpoints/1/labels",
- "members": "/api/v2/notificationEndpoints/1/members",
- "owners": "/api/v2/notificationEndpoints/1/owners",
- "self": "/api/v2/notificationEndpoints/1"
}, - "name": "string",
- "orgID": "string",
- "status": "active",
- "type": "slack",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userID": "string",
- "token": "string",
- "url": "string",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "kind": "Bucket",
- "labelAssociations": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "templateMetaName": "string"
}
], - "notificationRules": [
- {
- "description": "string",
- "endpointID": "string",
- "endpointTemplateMetaName": "string",
- "endpointType": "string",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "every": "string",
- "kind": "Bucket",
- "labelAssociations": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "messageTemplate": "string",
- "name": "string",
- "offset": "string",
- "status": "string",
- "statusRules": [
- {
- "currentLevel": "string",
- "previousLevel": "string"
}
], - "tagRules": [
- {
- "key": "string",
- "operator": "string",
- "value": "string"
}
], - "templateMetaName": "string"
}
], - "tasks": [
- {
- "cron": "string",
- "description": "string",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "every": "string",
- "id": "string",
- "kind": "Bucket",
- "name": "string",
- "offset": "string",
- "query": "string",
- "status": "string",
- "templateMetaName": "string"
}
], - "telegrafConfigs": [
- {
- "config": "string",
- "description": "string",
- "metadata": {
- "buckets": [
- "string"
]
}, - "name": "string",
- "orgID": "string",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "kind": "Bucket",
- "labelAssociations": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "templateMetaName": "string"
}
], - "variables": [
- {
- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "description": "string",
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "labelAssociations": [
- {
- "envReferences": [
- {
- "defaultValue": "string",
- "envRefKey": "string",
- "resourceField": "string",
- "value": "string"
}
], - "id": "string",
- "kind": "Bucket",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "string",
- "description": "string"
}, - "templateMetaName": "string"
}
], - "name": "string",
- "orgID": "string",
- "templateMetaName": "string"
}
]
}
}
Export resources as an InfluxDB template.
Array of objects | |
Array of objects | |
stackID | string |
{- "orgIDs": [
- {
- "orgID": "string",
- "resourceFilters": {
- "byLabel": [
- "string"
], - "byResourceKind": [
- "Bucket"
]
}
}
], - "resources": [
- {
- "id": "string",
- "kind": "Bucket",
- "name": "string"
}
], - "stackID": "string"
}
[- {
- "apiVersion": "influxdata.com/v2alpha1",
- "kind": "Bucket",
- "metadata": {
- "name": "string"
}, - "spec": { }
}
]
Manage users for your organization. Users are those with access to InfluxDB. To grant a user permission to access data, add them as a member of an organization and provide them with an API token.
Optionally, you can scope an authorization (and its API token) to a user.
If a user signs in with username and password, creating a user session,
the session carries the permissions granted by all the user's authorizations.
To create a user session, use the POST /api/v2/signin
endpoint.
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
Updates the password for the signed-in user.
This endpoint represents the third step in the following three-step process to let a user with a user session update their password:
POST /api/v2/signin
endpoint to create a user session and generate a session cookie.Set-Cookie
) header.PUT /api/v2/me/password
endpoint:Set-Cookie
header from the second stepAuthorization Basic
header with the user's Basic authentication credentials{"password": "NEW_PASSWORD"}
in the request bodyinfluxdb-oss-session required | string Example: influxdb-oss-session=influxdb-oss-session=19aaaZZZGOvP2GGryXVT2qYftlFKu3bIopurM6AGFow1yF1abhtOlbHfsc-d8gozZFC_6WxmlQIAwLMW5xs523w== The user session cookie for the user signed in with Basic authentication credentials. Related guides |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The new password.
password required | string |
{- "password": "string"
}
{- "code": "unauthorized",
- "message": "unauthorized access"
}
Lists users.
Default limit is 20
.
To limit which users are returned, pass query parameters in your request.
Action | Permission required | Restriction |
---|---|---|
List all users | Operator token | |
List a specific user | read-users or read-user USER_ID |
USER_ID
is the ID of the user that you want to retrieve.
after | string A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use |
id | string A user ID. Only lists the specified user. |
limit | integer [ 1 .. 100 ] Default: 20 Limits the number of records returned. Default is |
name | string A user name. Only lists the specified user. |
offset | integer >= 0 The offset for pagination. The number of records to skip. For more information about pagination parameters, see Pagination. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "users": [
- {
- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
]
}
Creates a user that can access InfluxDB. Returns the user.
Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces:
/api/v2/signin
InfluxDB API endpointThis endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization:
POST
request to POST /api/v2/users
. The name
property is required.id
property) value from the API response for step 1.POST
request to POST /api/v2/authorizations
, passing the user ID (id
) from step 2.POST
request to POST /api/v2/users/USER_ID/password
, passing the user ID from step 2.Action | Permission required | Restriction |
---|---|---|
Create a user | Operator token |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The user to create.
name required | string The user name. |
status | string Default: "active" Enum: "active" "inactive" If |
{- "name": "string",
- "status": "active"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
Deletes a user.
Action | Permission required |
---|---|
Delete a user | write-users or write-user USER_ID |
USER_ID
is the ID of the user that you want to delete.
userID required | string A user ID. Specifies the user to delete. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
userID required | string A user ID. Retrieves the specified user. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
Updates a user and returns the user.
Action | Permission required |
---|---|
Update a user | write-users or write-user USER_ID |
USER_ID
is the ID of the user that you want to update.
userID required | string A user ID. Specifies the user to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
In the request body, provide the user properties to update.
name required | string The user name. |
status | string Default: "active" Enum: "active" "inactive" If |
{- "name": "string",
- "status": "active"
}
{- "id": "string",
- "links": {
- "self": "/api/v2/users/1"
}, - "name": "string",
- "status": "active"
}
Updates a user password.
userID required | string The ID of the user to set the password for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The new password to set for the user.
password required | string |
{- "password": "string"
}
{- "code": "invalid",
- "message": "passwords cannot be changed through the InfluxDB Cloud API"
}
Updates a user password.
Use this endpoint to let a user authenticate with Basic authentication credentials and set a new password.
userID required | string The ID of the user to set the password for. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
The new password to set for the user.
password required | string |
{- "password": "string"
}
{- "code": "invalid",
- "message": "passwords cannot be changed through the InfluxDB Cloud API"
}
org | string The name of the organization. |
orgID | string The organization ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "variables": [
- {
- "arguments": {
- "type": "constant",
- "values": [
- "howdy",
- "hello",
- "hi",
- "yo",
- "oy"
]
}, - "id": "1221432",
- "name": ":ok:",
- "selected": [
- "hello"
]
}, - {
- "arguments": {
- "type": "map",
- "values": {
- "a": "fdjaklfdjkldsfjlkjdsa",
- "b": "dfaksjfkljekfajekdljfas",
- "c": "fdjksajfdkfeawfeea"
}
}, - "id": "1221432",
- "name": ":ok:",
- "selected": [
- "c"
]
}, - {
- "arguments": {
- "language": "flux",
- "query": "from(bucket: \"foo\") |> showMeasurements()",
- "type": "query"
}, - "id": "1221432",
- "name": ":ok:",
- "selected": [
- "host"
]
}
]
}
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Variable to create
required | QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties) |
createdAt | string <date-time> |
description | string |
Array of objects (Labels) | |
name required | string |
orgID required | string |
selected | Array of strings |
updatedAt | string <date-time> |
{- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "selected": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
{- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "selected": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
variableID required | string The variable ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
variableID required | string The variable ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "selected": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
variableID required | string The variable ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Variable update to apply
required | QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties) |
createdAt | string <date-time> |
description | string |
Array of objects (Labels) | |
name required | string |
orgID required | string |
selected | Array of strings |
updatedAt | string <date-time> |
{- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "selected": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
{- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "selected": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
variableID required | string The variable ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Variable to replace
required | QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties) |
createdAt | string <date-time> |
description | string |
Array of objects (Labels) | |
name required | string |
orgID required | string |
selected | Array of strings |
updatedAt | string <date-time> |
{- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "labels": [
- {
- "name": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "selected": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
{- "arguments": {
- "type": "query",
- "values": {
- "language": "string",
- "query": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "id": "string",
- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
], - "name": "string",
- "orgID": "string",
- "selected": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
variableID required | string The variable ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "labels": [
- {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
}
],
}
variableID required | string The variable ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
Label to add
labelID required | string A label ID. Specifies the label to attach. |
{- "labelID": "string"
}
{- "label": {
- "id": "string",
- "name": "string",
- "orgID": "string",
- "properties": {
- "color": "ffb3b3",
- "description": "this is a description"
}
},
}
labelID required | string The label ID to delete. |
variableID required | string The variable ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "code": "internal error",
- "err": "string",
- "message": "string",
- "op": "string"
}
cellID required | string The cell ID. |
dashboardID required | string The dashboard ID. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
{- "id": "string",
- "links": {
- "self": "string"
}, - "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
cellID required | string The ID of the cell to update. |
dashboardID required | string The ID of the dashboard to update. |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
name required | string |
required | LinePlusSingleStatProperties (object) or XYViewProperties (object) or SingleStatViewProperties (object) or HistogramViewProperties (object) or GaugeViewProperties (object) or TableViewProperties (object) or SimpleTableViewProperties (object) or MarkdownViewProperties (object) or CheckViewProperties (object) or ScatterViewProperties (object) or HeatmapViewProperties (object) or MosaicViewProperties (object) or BandViewProperties (object) or GeoViewProperties (object) (ViewProperties) |
{- "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
{- "id": "string",
- "links": {
- "self": "string"
}, - "name": "string",
- "properties": {
- "adaptiveZoomHide": true,
- "axes": {
- "x": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}, - "y": {
- "base": "",
- "bounds": [
- "string"
], - "label": "string",
- "prefix": "string",
- "scale": "log",
- "suffix": "string"
}
}, - "colors": [
- {
- "hex": "strings",
- "id": "string",
- "name": "string",
- "type": "min",
- "value": 0
}
], - "decimalPlaces": {
- "digits": 0,
- "isEnforced": true
}, - "generateXAxisTicks": [
- "string"
], - "generateYAxisTicks": [
- "string"
], - "hoverDimension": "auto",
- "legendColorizeRows": true,
- "legendHide": true,
- "legendOpacity": 0,
- "legendOrientationThreshold": 0,
- "note": "string",
- "position": "overlaid",
- "prefix": "string",
- "queries": [
- {
- "builderConfig": {
- "aggregateWindow": {
- "fillValues": true,
- "period": "string"
}, - "buckets": [
- "string"
], - "functions": [
- {
- "name": "string"
}
], - "tags": [
- {
- "aggregateFunctionType": "filter",
- "key": "string",
- "values": [
- "string"
]
}
]
}, - "editMode": "builder",
- "name": "string",
- "text": "string"
}
], - "shadeBelow": true,
- "shape": "chronograf-v2",
- "showNoteWhenEmpty": true,
- "staticLegend": {
- "colorizeRows": true,
- "heightRatio": 0,
- "opacity": 0,
- "orientationThreshold": 0,
- "show": true,
- "valueAxis": "string",
- "widthRatio": 0
}, - "suffix": "string",
- "timeFormat": "string",
- "type": "line-plus-single-stat",
- "xColumn": "string",
- "xTickStart": 0,
- "xTickStep": 0,
- "xTotalTicks": 0,
- "yColumn": "string",
- "yTickStart": 0,
- "yTickStep": 0,
- "yTotalTicks": 0
}
}
Write time series data to buckets.
Writes data to a bucket.
Use this endpoint to send data in line protocol format to InfluxDB.
Does the following when you send a write request:
2xx
status code); error otherwise.To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
wait for a success response (HTTP 2xx
status code) before you send the next request.
Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response.
2xx
status code;
otherwise, returns the first line that failed.write-buckets
or write-bucket BUCKET_ID
.
BUCKET_ID
is the ID of the destination bucket.
write
rate limits apply.
For more information, see limits and adjustable quotas.
bucket required | string A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. |
org required | string An organization name or ID. InfluxDB Cloud
InfluxDB OSS
|
orgID | string An organization ID. InfluxDB Cloud
InfluxDB OSS
|
precision | string (WritePrecision) Enum: "ms" "s" "us" "ns" The precision for unix timestamps in the line protocol batch. |
Accept | string Default: application/json Value: "application/json" The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. InfluxDB Cloud
InfluxDB OSS
Related guides |
Content-Encoding | string Default: identity Enum: "gzip" "identity" The compression applied to the line protocol in the request payload.
To send a gzip payload, pass |
Content-Length | integer The size of the entity-body, in bytes, sent to InfluxDB.
If the length is greater than the |
Content-Type | string Default: text/plain; charset=utf-8 Enum: "text/plain" "text/plain; charset=utf-8" The format of the data in the request body.
To send a line protocol payload, pass |
Zap-Trace-Span | string Example: baggage,[object Object],span_id,1,trace_id,1 OpenTracing span context |
In the request body, provide data in line protocol format.
To send compressed data, do the following:
Content-Encoding: gzip
header.airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000 airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
{- "code": "invalid",
- "message": "partial write error (2 written): unable to parse 'air_sensor,service=S1,sensor=L1 temperature=\"90.5\",humidity=70.0 1632850122': schema: field type for field \"temperature\" not permitted by schema; got String but expected Float"
}