Documentation

Use the InfluxDB v1 HTTP query API and InfluxQL to query data

Use the InfluxDB v1 HTTP query API to query data in InfluxDB 3 Enterprise with InfluxQL.

The examples below use cURL to send HTTP requests to the InfluxDB v1 HTTP API, but you can use any HTTP client.

InfluxQL feature support

InfluxQL is being rearchitected to work with the InfluxDB 3 storage engine. This process is ongoing and some InfluxQL features are still being implemented. For information about the current implementation status of InfluxQL features, see InfluxQL feature support.

Use the v1 /query endpoint and the GET request method to query data with InfluxQL:

GET http://localhost:8181/query

Authenticate API requests

InfluxDB 3 Enterprise requires each API request to be authenticated with a token . With InfluxDB v1-compatible endpoints in InfluxDB 3, you can use database tokens in InfluxDB 1.x username and password schemes, in the InfluxDB v2 Authorization: Token scheme, or in the OAuth Authorization: Bearer scheme.

Authenticate with a username and password scheme

With InfluxDB v1-compatible endpoints in InfluxDB 3, you can use the InfluxDB 1.x convention of username and password to authenticate database reads by passing a token with read access to the database as the password credential. When authenticating requests to the v1 API /query endpoint, InfluxDB 3 Enterprise checks that the password (p) value is an authorized token with read access to the database . InfluxDB 3 Enterprise ignores the username (u) parameter in the request.

Use one of the following authentication schemes with clients that support Basic authentication or query parameters:

Basic authentication

Use the Authorization header with the Basic scheme to authenticate v1 API /query requests. When authenticating requests, InfluxDB 3 Enterprise checks that the password part of the decoded credential is an authorized token with read access to the database . InfluxDB 3 Enterprise ignores the username part of the decoded credential.

Syntax
Authorization: Basic <base64-encoded [USERNAME]:DATABASE_TOKEN>

Encode the [USERNAME]:DATABASE_TOKEN credential using base64 encoding, and then append the encoded string to the Authorization: Basic header.

Example

The following example shows how to use cURL with the Basic authentication scheme:

curl --get "https://localhost:8181/query" \
  --user "any:
DATABASE_TOKEN
"
\
--data-urlencode "db=
DATABASE_NAME
"
\
--data-urlencode "q=SELECT * FROM home"

Query string authentication

In the URL, pass the p query parameter to authenticate /query requests. When authenticating requests, InfluxDB 3 Enterprise checks that the p (password) value is an authorized token with read access to the database and ignores the u (username) parameter.

Syntax
https://localhost:8181/query/?u=any&p=DATABASE_TOKEN
Example

The following example shows how to use cURL with query string authentication:

curl --get "https://localhost:8181/query" \
  --data-urlencode "p=
DATABASE_TOKEN
"
\
--data-urlencode "db=
DATABASE_NAME
"
\
--data-urlencode "q=SELECT * FROM home"

Authenticate with a token scheme

Use the Authorization: Bearer or the Authorization: Token scheme to pass a token with read access to the database for authenticating v1 API /query requests.

Bearer and Token are equivalent in InfluxDB 3 Enterprise. The Token scheme is used in the InfluxDB 2.x API. Bearer is defined by the OAuth 2.0 Framework. Support for one or the other may vary across InfluxDB API clients.

Syntax

Authorization: Bearer DATABASE_TOKEN
Authorization: Token DATABASE_TOKEN

Examples

Use Bearer to authenticate a query request:

curl --get "https://localhost:8181/query" \
  --header "Authorization: Bearer 
DATABASE_TOKEN
"
\
--data-urlencode "db=
DATABASE_NAME
"
\
--data-urlencode "q=SELECT * FROM home"

Use Token to authenticate a query request:

curl --get "https://localhost:8181/query" \
  --header "Authorization: Token 
DATABASE_TOKEN
"
\
--data-urlencode "db=
DATABASE_NAME
"
\
--data-urlencode "q=SELECT * FROM home"

Query parameters

For InfluxDB 3 Enterprise v1 API /query requests, set parameters as listed in the following table:

ParameterAllowed inIgnoredValue
chunkedQuery stringHonoredReturns points in streamed batches instead of in a single response. If set to true, InfluxDB chunks responses by series or by every 10,000 points, whichever occurs first.
chunked_sizeQuery stringHonoredRequires chunked to be set to true. If set to a specific value, InfluxDB chunks responses by series or by this number of points.
db *Query stringHonoredDatabase name
epochQuery stringHonoredTimestamp precision
pQuery stringHonoredFor query string authentication, a token
with read access to the database

pretty | Query string | Ignored | N/A q * | Query string | Honored | URL-encoded InfluxQL query rp | Query string | Honored, but discouraged | Retention policy u | Query string | Ignored | For query string authentication, any arbitrary string Authorization | Header | Honored | Bearer DATABASE_TOKEN, Token DATABASE_TOKEN, or Basic <base64 [USERNAME]:DATABASE_TOKEN>

* = Required

Timestamp precision

Use one of the following values for timestamp precision:

  • ns: nanoseconds
  • us: microseconds
  • ms: milliseconds
  • s: seconds
  • m: minutes
  • h: hours

Replace the following configuration values:

  • DATABASE_NAME: the name of the database to query
  • DATABASE_TOKEN: your InfluxDB 3 Enterprise token with read access to the database

Return results as JSON or CSV

By default, the /query endpoint returns results in JSON, but it can also return results in CSV. To return results as CSV, include the Accept header with the application/csv or text/csv MIME type:

curl --get https://localhost:8181/query \
  --header "Authorization: Bearer 
DATABASE_TOKEN
"
\
--header "Accept: application/csv" \ --data-urlencode "db=
DATABASE_NAME
"
\
--data-urlencode "q=SELECT * FROM home"

Was this page helpful?

Thank you for your feedback!


InfluxDB OSS 2.9.0: API tokens are hashed by default

Stronger token security in InfluxDB OSS 2.9.0 — tokens are hashed on disk by default. Existing tokens are hashed on first startup and can’t be recovered afterward. Capture any plaintext tokens you still need before you upgrade.

View InfluxDB OSS 2.9.0 release notes

Hashed tokens authenticate exactly like unhashed tokens — clients and integrations keep working.

Also new in 2.9.0:

  • Configurable backup compression
  • Restore support for backups containing hashed tokens
  • Tighter Edge Data Replication queue validation
  • Flux upgrade
  • Compaction reliability improvements

Key enhancements in Explorer 1.9

Explorer 1.9 is now available with InfluxQL support, an AI-assisted Flux to SQL converter (beta), and new live sample data simulators.

View Explorer 1.9 release notes

Explorer 1.9 includes new features and improvements that make it easier to query, visualize, and manage data.

Highlights:

  • Flux to SQL converter (beta): Convert Flux queries to SQL with an AI-assisted converter.
  • InfluxQL support: Query data with InfluxQL in the Data Explorer and dashboards, and save and load InfluxQL queries.
  • InfluxQL visualizations: Render line and bar charts from InfluxQL results with per-tag series grouping.
  • Query error history: Review a history of query errors in the query tool.
  • Live sample data simulators: Generate continuous live sample data with new bird data and signal generator simulators.

For more details, see Explorer 1.9 release notes

InfluxDB 3.10 is now available

InfluxDB 3 Core 3.10 adds an automatic catalog format upgrade, a configurable query-concurrency limit, and processing engine improvements.

Key updates in InfluxDB 3 Core 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • --max-concurrent-queries: limit concurrent queries (adjustable at runtime).
  • GET /ready endpoint for readiness probes.
  • Processing engine: cross-database queries and trigger lockdown flags.

For more information, see the InfluxDB 3 Core release notes.

InfluxDB 3.10 is now available

InfluxDB 3 Enterprise 3.10 adds automated backup and restore, row-level deletions, and user management, with an automatic catalog format upgrade and performance preview improvements.

Key updates in InfluxDB 3 Enterprise 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • Automated backup and restore (beta)
  • Row-level deletions
  • User management (authentication and RBAC) — preview
  • Performance preview improvements

Backup and restore, row-level deletions, and the performance preview require the Enterprise storage engine upgrade (opt-in beta). Beta and preview features are subject to breaking changes and aren’t recommended for production use.

For more information, see the InfluxDB 3 Enterprise release notes

Telegraf Enterprise is now generally available

Telegraf Enterprise is now generally available, along with Telegraf Controller v1.0.

Telegraf Enterprise combines Telegraf Controller, a centralized management console for Telegraf, with official support from InfluxData. Manage configurations, monitor fleet health, and operate tens of thousands of Telegraf agents from a single system.

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On September 15, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2