InfluxDB HTTP API
Use the InfluxDB HTTP API to write data, query data, and manage databases, tables, and tokens.
Quick start
Authenticate, write, and query with the InfluxDB OSS v2 API:
Authentication
Use one of the following schemes to authenticate to the InfluxDB OSS v2 API:
Common parameters
Most InfluxDB OSS v2 API endpoints require parameters in the request–for example, to specify the bucket or organization.
Compatibility endpoints
InfluxDB v1-compatible API endpoints for backward compatibility with InfluxDB 1.x clients, tools, and integrations such as Grafana and Telegraf.
Headers
InfluxDB OSS v2 API endpoints use standard HTTP request and response headers. The following table shows common headers used by many InfluxDB OSS v2 API endpoints. Some endpoints may use other headers…
Pagination
List endpoints in the InfluxDB OSS v2 API support pagination via query parameters. Use these parameters to page through large result sets.
Response codes
InfluxDB OSS v2 API endpoints return standard HTTP status codes. The following table summarizes the most common response codes.
Supported operations
The InfluxDB OSS v2 API supports create, read, update, and delete operations on resources. Most endpoints follow standard HTTP method conventions:
Authorizations (API tokens)
Create and manage API token authorizations that grant read and write permissions to InfluxDB OSS v2 organization resources.
Authorizations (v1-compatible)
Manage v1-compatible legacy authorization credentials in InfluxDB OSS v2.
Backup
Back up InfluxDB OSS v2 data, including time series data and metadata, for use in restore operations.
Buckets
Create and manage named storage locations (buckets) in InfluxDB OSS v2, each with a configurable retention period.
Cells
Manage cells within InfluxDB OSS v2 dashboards.
Checks
Create and manage monitoring checks that query data on a schedule and generate notification statuses in InfluxDB OSS v2.
Config
Retrieve configuration information for an InfluxDB OSS v2 instance.
Dashboards
Create and manage dashboards in InfluxDB OSS v2.
DBRPs
Manage database and retention policy (DBRP) mappings that route InfluxDB v1-compatible requests to InfluxDB OSS v2 buckets.
Debug
Generate Go runtime profiling and trace reports for troubleshooting and performance analysis of an InfluxDB OSS v2 instance.
Delete
Delete time series data from an InfluxDB OSS v2 bucket by specifying a time range and optional tag predicate.
Health
Check the health and readiness of an InfluxDB OSS v2 instance.
Labels
Create and manage labels for organizing InfluxDB OSS v2 resources such as dashboards, tasks, and buckets.
Metrics
Retrieve internal metrics for an InfluxDB OSS v2 instance in Prometheus exposition format.
NotificationEndpoints
Create and manage notification endpoints that receive alert notifications from InfluxDB OSS v2 monitoring checks.
NotificationRules
Create and manage notification rules that define when and how InfluxDB OSS v2 sends notifications to configured endpoints.
Organizations
Create and manage InfluxDB OSS v2 organizations, which are workspaces that group users, buckets, and resources.
Ping
Check the availability of an InfluxDB OSS v2 instance.
Query data (v1-compatible)
Query data in InfluxDB OSS v2 using InfluxQL via the v1-compatible /query endpoint.
Query data
Retrieve data, analyze queries, and get query suggestions using the InfluxDB OSS v2 query API.
Ready
Check whether an InfluxDB OSS v2 instance is ready to accept requests.
RemoteConnections
Create and manage remote InfluxDB connections for replicating data from an InfluxDB OSS v2 instance to a remote InfluxDB instance.
Replications
Create and manage replication streams that copy data from an InfluxDB OSS v2 bucket to a remote InfluxDB instance.
Resources
Retrieve a list of top-level resource types available in the InfluxDB OSS v2 API.
Restore
Restore InfluxDB OSS v2 data from a backup, including time series data and metadata.
Routes
Retrieve top-level routes for the InfluxDB OSS v2 API.
Rules
Manage notification rules in InfluxDB OSS v2.
Scraper Targets
Create and manage Prometheus scraper targets that collect metrics and write them to InfluxDB OSS v2 buckets.
Secrets
Create and manage secrets (key-value pairs) for use in InfluxDB OSS v2 Flux scripts and tasks.
Security and access endpoints
Endpoints for managing authentication and access control in InfluxDB OSS v2.
Setup
Configure a new InfluxDB OSS v2 instance, including creating the initial user, organization, bucket, and API token.
Signin
Create a user session by signing in with username and password credentials.
Signout
End a user session by signing out.
Sources
Manage data sources configured in InfluxDB OSS v2.
System information endpoints
Endpoints for retrieving system-level information about the InfluxDB OSS v2 instance.
Tasks
Schedule and manage Flux tasks that process and transform data on a recurring basis in InfluxDB OSS v2.
Telegraf Plugins
Retrieve available Telegraf plugin configuration templates for use with InfluxDB OSS v2.
Telegrafs
Create and manage Telegraf agent configurations that collect and write data to InfluxDB OSS v2.
Templates
Export and apply InfluxDB templates, and manage template stacks for InfluxDB OSS v2.
Users
Create and manage users that have access to InfluxDB OSS v2 organizations and resources.
Variables
Create and manage variables for use in InfluxDB OSS v2 dashboards.
Views
Manage cell views within InfluxDB OSS v2 dashboards.
Write data (v1-compatible)
Write data to InfluxDB OSS v2 using the v1-compatible /write endpoint with line protocol.
Write data
Write time series data to InfluxDB OSS v2 buckets in line protocol format using the /api/v2/write endpoint.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB OSS v2 and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.