The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database using InfluxDB v1 endpoints.
The InfluxDB 1.x /write
and /query
endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
This documentation is generated from the InfluxDB OpenAPI specification.
The InfluxDB 1.x API requires authentication for all requests. InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
For more information, see the following:
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 YOUR_INFLUX_TOKEN
For examples and more information, see the following:
Security Scheme Type | API Key |
---|---|
Header parameter name: | Authorization |
Use the HTTP Basic authentication
scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the Authorization: Token
scheme):
For examples and more information, see how to authenticate with a username and password.
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | basic |
Use the Querystring authentication scheme with InfluxDB 1.x API parameters to provide credentials through the query string.
For examples and more information, see how to authenticate with a username and password.
Security Scheme Type | API Key |
---|---|
Query parameter name: | u=&p= |
Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.
The response is a HTTP 204
status code to inform you the querier is available.
For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.
To check the health of ingesters before writing data, send a request to one of the write endpoints.
This endpoint doesn't require authentication.
Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.
The response is a HTTP 204
status code to inform you the querier is available.
For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.
To check the health of ingesters before writing data, send a request to one of the write endpoints.
This endpoint doesn't require authentication.
chunk_size | integer Default: 10000 The number of records that will go into a chunk.
This parameter is only used if |
chunked | boolean Default: false If true, the response is divided into chunks of size |
db required | string The database to query from. |
epoch | string Enum: "h" "m" "s" "ms" "u" "µ" "ns" Formats timestamps as unix (epoch) timestamps with the specified precision instead of RFC3339 timestamps with nanosecond precision. |
p | string User token. |
pretty | boolean Default: false If true, the JSON response is formatted in a human-readable format. |
q required | string Defines the InfluxQL query to run. |
rp | string The retention policy name for InfluxQL compatibility Optional parameter that, when combined with the db parameter, forms the complete database name to query. In InfluxDB Cloud Dedicated, databases can be named using the database_name/retention_policy_name convention for InfluxQL compatibility. When a request specifies both
Unlike InfluxDB v1 and Cloud Serverless, Cloud Dedicated does not use DBRP mappings or separate retention policy objects. This parameter exists solely for v1 API compatibility and database naming conventions. Note: The retention policy name does not control data retention in Cloud Dedicated. Data retention is determined by the database's retention period setting. Related |
u | string Username. |
Accept | string Default: application/json Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack" Specifies how query results should be encoded in the response. Note: With |
Accept-Encoding | string Default: identity Enum: "gzip" "identity" The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. |
Zap-Trace-Span | string Example: trace_id,1,span_id,1,baggage,[object Object] OpenTracing span context |
db required | string Database to query. |
p | string User token. |
q | string Defines the influxql query to run. |
rp | string Retention policy name. |
u | string Username. |
Accept | string Default: application/json Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack" Specifies how query results should be encoded in the response. Note: With |
Accept-Encoding | string Default: identity Enum: "gzip" "identity" The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. |
Content-Type | string Value: "application/vnd.influxql" |
Zap-Trace-Span | string Example: trace_id,1,span_id,1,baggage,[object Object] OpenTracing span context |
InfluxQL query to execute.
db required | string The database to write to. Database targeting: In Cloud Dedicated, databases can be named using the Auto-creation behavior: Cloud Dedicated requires databases to be created before writing data. The v1 Authentication: Requires a valid API token with write permissions for the target database. Related |
p | string User token. |
precision | string Write precision. |
rp | string Retention policy name. |
u | string Username. |
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: trace_id,1,span_id,1,baggage,[object Object] OpenTracing span context |
Line protocol body
{- "code": "internal error",
- "message": "string",
- "op": "string",
- "err": "string",
- "line": 0
}