InfluxDB 3 Enterprise Docs Submit API issue

InfluxDB 3 Enterprise API Service

The InfluxDB HTTP API for InfluxDB 3 Enterprise provides a programmatic interface for interacting with InfluxDB 3 Enterprise databases and resources. Use this API to:

  • Write data to InfluxDB 3 Enterprise databases
  • Query data using SQL or InfluxQL
  • Process data using Processing engine plugins
  • Manage databases, tables, and Processing engine triggers
  • Perform administrative tasks and access system information

The API includes endpoints under the following paths:

  • /api/v3: InfluxDB 3 Enterprise native endpoints
  • /: Compatibility endpoints for InfluxDB v1 workloads and clients
  • /api/v2/write: Compatibility endpoint for InfluxDB v2 workloads and clients

Quick start

  1. Create an admin token for the InfluxDB 3 Enterprise API.

    curl -X POST "http://localhost:8181/api/v3/configure/token/admin"
  2. Check the status of the InfluxDB server.

    curl "http://localhost:8181/health" \
       --header "Authorization: Bearer ADMIN_TOKEN"
  3. Write data to InfluxDB.

    curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto"
      --header "Authorization: Bearer ADMIN_TOKEN" \
      --data-raw "home,room=Kitchen temp=72.0
     home,room=Living\ room temp=71.5"

    If all data is written, the response is 204 No Content.

  4. Query data from InfluxDB.

    curl -G "http://localhost:8181/api/v3/query_sql" \
      --header "Authorization: Bearer ADMIN_TOKEN" \
      --data-urlencode "db=sensors" \
      --data-urlencode "q=SELECT * FROM home WHERE room='Living room'" \
      --data-urlencode "format=jsonl"

    Output:

    {"room":"Living room","temp":71.5,"time":"2025-02-25T20:19:34.984098"}

For more information about using InfluxDB 3 Enterprise, see the Get started guide.

Authentication

Authenticate to the InfluxDB 3 API using a bearer token.

The InfluxDB 3 API uses tokens for authentication. To authenticate, include the Authorization header in your request with the value Bearer <token>. The token must be a valid InfluxDB 3 admin token or a resource token with the required permissions for the requested operation.

Cache data

Manage the in-memory cache.

Distinct Value Cache

The Distinct Value Cache (DVC) lets you cache distinct values of one or more columns in a table, improving the performance of queries that return distinct tag and field values.

The DVC is an in-memory cache that stores distinct values for specific columns in a table. When you create an DVC, you can specify what columns' distinct values to cache, the maximum number of distinct value combinations to cache, and the maximum age of cached values. A DVC is associated with a table, which can have multiple DVCs.

Last value cache

The Last Value Cache (LVC) lets you cache the most recent values for specific fields in a table, improving the performance of queries that return the most recent value of a field for specific series or the last N values of a field.

The LVC is an in-memory cache that stores the last N number of values for specific fields of series in a table. When you create an LVC, you can specify what fields to cache, what tags to use to identify each series, and the number of values to cache for each unique series. An LVC is associated with a table, which can have multiple LVCs.

Create distinct cache

Creates a distinct cache for a table.

Authorizations:
Request Body schema: application/json
columns
required
Array of strings
db
required
string
max_age
integer

Optional maximum age in seconds.

max_cardinality
integer

Optional maximum cardinality.

name
string

Optional cache name.

table
required
string

Responses

Request samples

Content type
application/json
{
  • "db": "mydb",
  • "table": "mytable",
  • "columns": [
    ],
  • "max_cardinality": 1000,
  • "max_age": 3600
}

Create last cache

Creates a last cache for a table.

Authorizations:
Request Body schema: application/json
count
integer

Optional count.

db
required
string
key_columns
Array of strings

Optional list of key columns.

name
string

Optional cache name.

table
required
string
ttl
integer

Optional time-to-live in seconds.

value_columns
Array of strings

Optional list of value columns.

Responses

Request samples

Content type
application/json
{
  • "db": "mydb",
  • "table": "mytable",
  • "key_columns": [
    ],
  • "value_columns": [
    ],
  • "count": 100,
  • "ttl": 3600
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Delete last cache

Deletes a last cache.

Authorizations:
query Parameters
db
required
string

The name of the database.

name
required
string
table
required
string

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Compatibility endpoints

InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients.

Write data using v1- or v2-compatible endpoints

  • /api/v2/write endpoint for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.
  • /write endpoint for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.

For new workloads, use the /api/v3/write_lp endpoint.

All endpoints accept the same line protocol format.

Query data

Use the HTTP /query endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL.

For new workloads, use one of the following:

Server information

Server information endpoints such as /health and metrics are compatible with InfluxDB 1.x and InfluxDB 2.x clients.

Write line protocol (v1-compatible)

Writes line protocol to the specified database.

This endpoint provides backward compatibility for InfluxDB 1.x write workloads using tools such as InfluxDB 1.x client libraries, the Telegraf outputs.influxdb output plugin, or third-party tools.

Use this endpoint to send data in line protocol format to InfluxDB. Use query parameters to specify options for writing data.

Authorizations:
query Parameters
db
required
string

The name of the database. The name of the database. InfluxDB creates the database if it doesn't already exist, and then writes all points in the batch to the database.

precision
required
string (PrecisionWriteCompatibility)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

header Parameters
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 (partially or completely)--for example, due to a syntax problem or type mismatch.

Content-Encoding
string (ContentEncoding)
Default: identity
Enum: "gzip" "identity"

The compression applied to the line protocol in the request payload. To send a gzip payload, pass Content-Encoding: gzip header.

Content-Length
integer (ContentLength)

The size of the entity-body, in bytes, sent to InfluxDB.

Content-Type
string (LineProtocol)
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The content type of the request payload.

Request Body schema: text/plain
string

Responses

Request samples

Content type
text/plain
Example
measurement,tag=value field=1 1234567890

Response samples

Content type
application/json
Example
"{\n \"error\": \"write of line protocol failed\",\n \"data\": [\n {\n \"original_line\": \"dquote> home,room=Kitchen temp=hi\",\n \"line_number\": 2,\n \"error_message\": \"No fields were provided\"\n }\n ]\n}\n"

Write line protocol (v2-compatible)

Writes line protocol to the specified database.

This endpoint provides backward compatibility for InfluxDB 2.x write workloads using tools such as InfluxDB 2.x client libraries, the Telegraf outputs.influxdb_v2 output plugin, or third-party tools.

Use this endpoint to send data in line protocol format to InfluxDB. Use query parameters to specify options for writing data.

Authorizations:
query Parameters
accept_partial
boolean (AcceptPartial)
Default: true

Accept partial writes.

db
required
string

A database name. InfluxDB creates the database if it doesn't already exist, and then writes all points in the batch to the database.

precision
required
string (PrecisionWriteCompatibility)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

header Parameters
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 (partially or completely)--for example, due to a syntax problem or type mismatch.

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-Encoding: gzip header.

Content-Length
integer

The size of the entity-body, in bytes, sent to InfluxDB.

Content-Type
string (LineProtocol)
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The content type of the request payload.

Request Body schema: text/plain
string

Responses

Request samples

Content type
text/plain
Example
measurement,tag=value field=1 1234567890

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Execute InfluxQL query (v1-compatible)

Executes an InfluxQL query to retrieve data from the specified database.

This endpoint is compatible with InfluxDB 1.x client libraries and third-party integrations such as Grafana. Use query parameters to specify the database and the InfluxQL query.

Authorizations:
query Parameters
chunk_size
integer
Default: 10000

The number of records that will go into a chunk. This parameter is only used if chunked=true.

chunked
boolean
Default: false

If true, the response is divided into chunks of size chunk_size.

db
string <InfluxQL>

The database to query. If not provided, the InfluxQL query string must specify the database.

epoch
string (EpochCompatibility)
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

Formats timestamps as unix (epoch) timestamps with the specified precision instead of RFC3339 timestamps with nanosecond precision.

pretty
boolean
Default: false

If true, the JSON response is formatted in a human-readable format.

q
required
string

The InfluxQL query string.

header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv"

The content type that the client can understand.

If text/csv is specified, the Content-type response header is application/csv and the response is formatted as CSV.

Returns an error if the format is invalid or non-UTF8.

Responses

Response samples

Content type
{
  • "results": [
    ]
}

Execute InfluxQL query (v1-compatible)

Executes an InfluxQL query to retrieve data from the specified database.

Authorizations:
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv"

The content type that the client can understand.

If text/csv is specified, the Content-type response header is application/csv and the response is formatted as CSV.

Returns an error if the format is invalid or non-UTF8.

Request Body schema: application/json
chunk_size
integer
Default: 10000

The number of records that will go into a chunk. This parameter is only used if chunked=true.

chunked
boolean

If true, the response is divided into chunks of size chunk_size.

db
string

The database to query. If not provided, the InfluxQL query string must specify the database.

epoch
string
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

A unix timestamp precision.

  • h for hours
  • m for minutes
  • s for seconds
  • ms for milliseconds
  • u or µ for microseconds
  • ns for nanoseconds

Formats timestamps as unix (epoch) timestamps with the specified precision instead of RFC3339 timestamps with nanosecond precision.

pretty
boolean

If true, the JSON response is formatted in a human-readable format.

q
required
string

The InfluxQL query string.

Responses

Request samples

Content type
application/json
{
  • "db": "string",
  • "q": "string",
  • "chunked": true,
  • "chunk_size": 10000,
  • "epoch": "ns",
  • "pretty": true
}

Response samples

Content type
{
  • "results": [
    ]
}

Health check (v1)

Checks the status of the service.

Authorizations:

Responses

Database

Manage databases

List databases

Retrieves a list of databases.

Authorizations:
query Parameters
format
required
string (Format)
Enum: "json" "csv" "parquet" "jsonl"

The format of data in the response body.

Responses

Response samples

Content type
application/json
{
  • "databases": [
    ]
}

Create a database

Creates a new database in the system.

Authorizations:
Request Body schema: application/json
db
required
string

Responses

Request samples

Content type
application/json
{
  • "db": "string"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Delete a database

Soft deletes a database. The database is scheduled for deletion and unavailable for querying.

Authorizations:
query Parameters
db
required
string

The name of the database.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Processing engine

Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins.

InfluxDB 3 Enterprise provides the InfluxDB 3 Processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database. Use Processing engine plugins and triggers to run code and perform tasks for different database events.

To get started with the Processing engine, see the Processing engine and Python plugins guide.

Create processing engine trigger

Creates a new processing engine trigger.

Authorizations:
Request Body schema: application/json
db
required
string
disabled
boolean
plugin_filename
required
string
object
trigger_name
required
string
trigger_specification
required
string

Responses

Request samples

Content type
application/json
{
  • "db": "string",
  • "plugin_filename": "string",
  • "trigger_name": "string",
  • "trigger_specification": "string",
  • "trigger_arguments": { },
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Delete processing engine trigger

Deletes a processing engine trigger.

Authorizations:
query Parameters
db
required
string

The name of the database.

force
boolean
Default: false
trigger_name
required
string

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Disable processing engine trigger

Disables a processing engine trigger.

Authorizations:
header Parameters
Content-Type
string
Value: "application/json"

The format of the data in the request body.

Request Body schema: application/json
db
required
string
disabled
boolean
plugin_filename
required
string
object
trigger_name
required
string
trigger_specification
required
string

Responses

Request samples

Content type
application/json
{
  • "db": "string",
  • "plugin_filename": "string",
  • "trigger_name": "string",
  • "trigger_specification": "string",
  • "trigger_arguments": { },
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Enable processing engine trigger

Enables a processing engine trigger.

Authorizations:
header Parameters
Content-Type
string
Value: "application/json"

The format of the data in the request body.

Request Body schema: application/json
db
required
string
disabled
boolean
plugin_filename
required
string
object
trigger_name
required
string
trigger_specification
required
string

Responses

Request samples

Content type
application/json
{
  • "db": "string",
  • "plugin_filename": "string",
  • "trigger_name": "string",
  • "trigger_specification": "string",
  • "trigger_arguments": { },
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Install plugin packages

Installs packages for the plugin environment.

Authorizations:
header Parameters
Content-Type
string
Value: "application/json"

The format of the data in the request body.

Request Body schema: application/json
property name*
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Install plugin requirements

Installs requirements for the plugin environment.

Authorizations:
header Parameters
Content-Type
string
Value: "application/json"

The format of the data in the request body.

Request Body schema: application/json
property name*
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Test WAL plugin

Executes a test of a write-ahead logging (WAL) plugin.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Test scheduling plugin

Executes a test of a scheduling plugin.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

On Request processing engine plugin request

Sends a request to invoke an On Request processing engine plugin. The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin.

An On Request plugin implements the following signature:

def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None)

The response depends on the plugin implementation.

Authorizations:
path Parameters
plugin_path
required
string

The path configured in the trigger-spec for the plugin.

For example, if you define a trigger with the following:

trigger-spec: "request:hello-world"

then, the HTTP API exposes the following plugin endpoint:

<INFLUXDB_HOST>/api/v3/engine/hello-world

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

On Request processing engine plugin request

Sends a request to invoke an On Request processing engine plugin. The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin.

An On Request plugin implements the following signature:

def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None)

The response depends on the plugin implementation.

Authorizations:
path Parameters
plugin_path
required
string

The path configured in the trigger-spec for the plugin.

For example, if you define a trigger with the following:

trigger-spec: "request:hello-world"

then, the HTTP API exposes the following plugin endpoint:

<INFLUXDB_HOST>/api/v3/engine/hello-world
header Parameters
Content-Type
string
Value: "application/json"

The format of the data in the request body.

Request Body schema: application/json
property name*
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Server information

Retrieve server metrics, status, and version information

Health check

Checks the status of the service.

Authorizations:

Responses

Health check (v1)

Checks the status of the service.

Authorizations:

Responses

Ping the server

Returns version information for the server.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "version": "0.1.0",
  • "revision": "f3d3d3d"
}

Metrics

Retrieves Prometheus-compatible server metrics.

Authorizations:

Responses

Table

Manage table schemas and data

Create a table

Creates a new table within a database.

Authorizations:
Request Body schema: application/json
db
required
string
Array of objects
table
required
string
tags
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "db": "string",
  • "table": "string",
  • "tags": [
    ],
  • "fields": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Delete a table

Soft deletes a table. The table is scheduled for deletion and unavailable for querying.

Authorizations:
query Parameters
db
required
string

The name of the database.

table
required
string

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Create distinct cache

Creates a distinct cache for a table.

Authorizations:
Request Body schema: application/json
columns
required
Array of strings
db
required
string
max_age
integer

Optional maximum age in seconds.

max_cardinality
integer

Optional maximum cardinality.

name
string

Optional cache name.

table
required
string

Responses

Request samples

Content type
application/json
{
  • "db": "mydb",
  • "table": "mytable",
  • "columns": [
    ],
  • "max_cardinality": 1000,
  • "max_age": 3600
}

Create last cache

Creates a last cache for a table.

Authorizations:
Request Body schema: application/json
count
integer

Optional count.

db
required
string
key_columns
Array of strings

Optional list of key columns.

name
string

Optional cache name.

table
required
string
ttl
integer

Optional time-to-live in seconds.

value_columns
Array of strings

Optional list of value columns.

Responses

Request samples

Content type
application/json
{
  • "db": "mydb",
  • "table": "mytable",
  • "key_columns": [
    ],
  • "value_columns": [
    ],
  • "count": 100,
  • "ttl": 3600
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Delete last cache

Deletes a last cache.

Authorizations:
query Parameters
db
required
string

The name of the database.

name
required
string
table
required
string

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Token

Manage tokens for authentication and authorization

Create a resource token

Creates a resource (fine-grained permissions) token. A resource token is a token that has access to specific resources in the system.

This endpoint is only available in InfluxDB 3 Enterprise.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "token_name": "All system information",
  • "permissions": [
    ],
  • "expiry_secs": 300000
}

Create admin token

Creates an admin token. An admin token is a special type of token that has full access to all resources in the system.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "_admin",
  • "token": "apiv3_00xx0Xx0xx00XX0x0",
  • "hash": "00xx0Xx0xx00XX0x0",
  • "created_at": "2025-04-18T14:02:45.331Z",
  • "expiry": null
}

Regenerate admin token

Regenerates an admin token and revokes the previous token with the same name.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "_admin",
  • "token": "apiv3_00xx0Xx0xx00XX0x0",
  • "hash": "00xx0Xx0xx00XX0x0",
  • "created_at": "2025-04-18T14:02:45.331Z",
  • "expiry": null
}

Query data

Query data using SQL or InfluxQL

Execute SQL query

Executes an SQL query to retrieve data from the specified database.

Authorizations:
query Parameters
db
required
string

The name of the database.

format
string
q
required
string
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/jsonl" "application/vnd.apache.parquet" "text/csv"

The content type that the client can understand.

Content-Type
string
Value: "application/json"

The format of the data in the request body.

Responses

Response samples

Content type
{
  • "results": [
    ]
}

Execute SQL query

Executes an SQL query to retrieve data from the specified database.

Authorizations:
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/jsonl" "application/vnd.apache.parquet" "text/csv"

The content type that the client can understand.

Content-Type
string
Value: "application/json"

The format of the data in the request body.

Request Body schema: application/json
database
required
string

The name of the database to query. Required if the query (query_str) doesn't specify the database.

format
string
Enum: "json" "csv" "parquet" "jsonl" "pretty"

The format of the query results.

object

Additional parameters for the query. Use this field to pass query parameters.

query_str
required
string

The query to execute.

Responses

Request samples

Content type
application/json
{
  • "database": "mydb",
  • "query_str": "SELECT * FROM mytable",
  • "format": "json",
  • "params": { }
}

Response samples

Content type
{
  • "results": [
    ]
}

Execute InfluxQL query

Executes an InfluxQL query to retrieve data from the specified database.

Authorizations:
query Parameters
db
string

The name of the database.

If you provide a query that specifies the database, you can omit the 'db' parameter from your request.

format
string
q
required
string
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/jsonl" "application/vnd.apache.parquet" "text/csv"

The content type that the client can understand.

Responses

Response samples

Content type
{
  • "results": [
    ]
}

Execute InfluxQL query

Executes an InfluxQL query to retrieve data from the specified database.

Authorizations:
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/jsonl" "application/vnd.apache.parquet" "text/csv"

The content type that the client can understand.

Content-Type
string
Value: "application/json"

The format of the data in the request body.

Request Body schema: application/json
database
required
string

The name of the database to query. Required if the query (query_str) doesn't specify the database.

format
string
Enum: "json" "csv" "parquet" "jsonl" "pretty"

The format of the query results.

object

Additional parameters for the query. Use this field to pass query parameters.

query_str
required
string

The query to execute.

Responses

Request samples

Content type
application/json
{
  • "database": "mydb",
  • "query_str": "SELECT * FROM mytable",
  • "format": "json",
  • "params": { }
}

Response samples

Content type
{
  • "results": [
    ]
}

Execute InfluxQL query (v1-compatible)

Executes an InfluxQL query to retrieve data from the specified database.

This endpoint is compatible with InfluxDB 1.x client libraries and third-party integrations such as Grafana. Use query parameters to specify the database and the InfluxQL query.

Authorizations:
query Parameters
chunk_size
integer
Default: 10000

The number of records that will go into a chunk. This parameter is only used if chunked=true.

chunked
boolean
Default: false

If true, the response is divided into chunks of size chunk_size.

db
string <InfluxQL>

The database to query. If not provided, the InfluxQL query string must specify the database.

epoch
string (EpochCompatibility)
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

Formats timestamps as unix (epoch) timestamps with the specified precision instead of RFC3339 timestamps with nanosecond precision.

pretty
boolean
Default: false

If true, the JSON response is formatted in a human-readable format.

q
required
string

The InfluxQL query string.

header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv"

The content type that the client can understand.

If text/csv is specified, the Content-type response header is application/csv and the response is formatted as CSV.

Returns an error if the format is invalid or non-UTF8.

Responses

Response samples

Content type
{
  • "results": [
    ]
}

Execute InfluxQL query (v1-compatible)

Executes an InfluxQL query to retrieve data from the specified database.

Authorizations:
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv"

The content type that the client can understand.

If text/csv is specified, the Content-type response header is application/csv and the response is formatted as CSV.

Returns an error if the format is invalid or non-UTF8.

Request Body schema: application/json
chunk_size
integer
Default: 10000

The number of records that will go into a chunk. This parameter is only used if chunked=true.

chunked
boolean

If true, the response is divided into chunks of size chunk_size.

db
string

The database to query. If not provided, the InfluxQL query string must specify the database.

epoch
string
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

A unix timestamp precision.

  • h for hours
  • m for minutes
  • s for seconds
  • ms for milliseconds
  • u or µ for microseconds
  • ns for nanoseconds

Formats timestamps as unix (epoch) timestamps with the specified precision instead of RFC3339 timestamps with nanosecond precision.

pretty
boolean

If true, the JSON response is formatted in a human-readable format.

q
required
string

The InfluxQL query string.

Responses

Request samples

Content type
application/json
{
  • "db": "string",
  • "q": "string",
  • "chunked": true,
  • "chunk_size": 10000,
  • "epoch": "ns",
  • "pretty": true
}

Response samples

Content type
{
  • "results": [
    ]
}

Write data

Write data to InfluxDB 3

Write line protocol (v1-compatible)

Writes line protocol to the specified database.

This endpoint provides backward compatibility for InfluxDB 1.x write workloads using tools such as InfluxDB 1.x client libraries, the Telegraf outputs.influxdb output plugin, or third-party tools.

Use this endpoint to send data in line protocol format to InfluxDB. Use query parameters to specify options for writing data.

Authorizations:
query Parameters
db
required
string

The name of the database. The name of the database. InfluxDB creates the database if it doesn't already exist, and then writes all points in the batch to the database.

precision
required
string (PrecisionWriteCompatibility)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

header Parameters
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 (partially or completely)--for example, due to a syntax problem or type mismatch.

Content-Encoding
string (ContentEncoding)
Default: identity
Enum: "gzip" "identity"

The compression applied to the line protocol in the request payload. To send a gzip payload, pass Content-Encoding: gzip header.

Content-Length
integer (ContentLength)

The size of the entity-body, in bytes, sent to InfluxDB.

Content-Type
string (LineProtocol)
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The content type of the request payload.

Request Body schema: text/plain
string

Responses

Request samples

Content type
text/plain
Example
measurement,tag=value field=1 1234567890

Response samples

Content type
application/json
Example
"{\n \"error\": \"write of line protocol failed\",\n \"data\": [\n {\n \"original_line\": \"dquote> home,room=Kitchen temp=hi\",\n \"line_number\": 2,\n \"error_message\": \"No fields were provided\"\n }\n ]\n}\n"

Write line protocol (v2-compatible)

Writes line protocol to the specified database.

This endpoint provides backward compatibility for InfluxDB 2.x write workloads using tools such as InfluxDB 2.x client libraries, the Telegraf outputs.influxdb_v2 output plugin, or third-party tools.

Use this endpoint to send data in line protocol format to InfluxDB. Use query parameters to specify options for writing data.

Authorizations:
query Parameters
accept_partial
boolean (AcceptPartial)
Default: true

Accept partial writes.

db
required
string

A database name. InfluxDB creates the database if it doesn't already exist, and then writes all points in the batch to the database.

precision
required
string (PrecisionWriteCompatibility)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

header Parameters
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 (partially or completely)--for example, due to a syntax problem or type mismatch.

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-Encoding: gzip header.

Content-Length
integer

The size of the entity-body, in bytes, sent to InfluxDB.

Content-Type
string (LineProtocol)
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The content type of the request payload.

Request Body schema: text/plain
string

Responses

Request samples

Content type
text/plain
Example
measurement,tag=value field=1 1234567890

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}

Write line protocol

Writes line protocol to the specified database.

Use this endpoint to send data in line protocol format to InfluxDB. Use query parameters to specify options for writing data.

Authorizations:
query Parameters
accept_partial
boolean (AcceptPartial)
Default: true

Accept partial writes.

db
required
string

The name of the database. The name of the database. InfluxDB creates the database if it doesn't already exist, and then writes all points in the batch to the database.

no_sync
boolean (NoSync)
Default: false

Acknowledges a successful write without waiting for WAL persistence.

precision
required
string (PrecisionWrite)
Enum: "auto" "millisecond" "second" "microsecond" "nanosecond"

Precision of timestamps.

header Parameters
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 (partially or completely)--for example, due to a syntax problem or type mismatch.

Content-Encoding
string (ContentEncoding)
Default: identity
Enum: "gzip" "identity"

The compression applied to the line protocol in the request payload. To send a gzip payload, pass Content-Encoding: gzip header.

Content-Length
integer (ContentLength)

The size of the entity-body, in bytes, sent to InfluxDB.

Content-Type
string (LineProtocol)
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The content type of the request payload.

Request Body schema: text/plain
string

Responses

Request samples

Content type
text/plain
Example
measurement,tag=value field=1 1234567890

Response samples

Content type
application/json
{
  • "error": "string",
  • "data": { }
}