InfluxDB REST API
High-performance time series database for metrics and events
InfluxDB is a purpose-built time series database designed for storing and querying metrics, events, and real-time analytics data. Developers use it to handle massive volumes of timestamped data with high write and query performance, making it ideal for monitoring, IoT applications, and application metrics. The REST API provides complete access to data ingestion, querying with InfluxQL and Flux languages, and database management.
https://your-influxdb-instance.com:8086/api/v2
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /write | Write time series data points to a bucket using line protocol format |
| POST | /query | Query data using Flux language and return results in annotated CSV or JSON format |
| GET | /buckets | List all buckets (data storage containers) in the organization |
| POST | /buckets | Create a new bucket with specified retention policies and organization |
| GET | /buckets/{bucketID} | Retrieve details about a specific bucket by its ID |
| DELETE | /buckets/{bucketID} | Delete a bucket and all its data permanently |
| GET | /orgs | List all organizations available to the authenticated user |
| POST | /authorizations | Create a new API token with specific read/write permissions |
| GET | /authorizations | List all API tokens and their permissions |
| DELETE | /authorizations/{authID} | Revoke an API token by deleting the authorization |
| GET | /tasks | List all scheduled tasks that run Flux queries automatically |
| POST | /tasks | Create a new task to execute Flux queries on a schedule |
| GET | /health | Check the health status of the InfluxDB instance |
| POST | /delete | Delete time series data within a specified time range and predicate |
| GET | /backup/metadata | Retrieve backup metadata for disaster recovery purposes |
Sponsor this page
AvailableReach developers actively building with InfluxDB. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
# Write data points
curl -X POST "https://your-influxdb-instance.com:8086/api/v2/write?org=myorg&bucket=mybucket&precision=s" \
-H "Authorization: Token your-api-token" \
-H "Content-Type: text/plain; charset=utf-8" \
--data-binary '
temperature,location=room1 value=23.5 1625097600
temperature,location=room2 value=21.0 1625097600
'
# Query data
curl -X POST "https://your-influxdb-instance.com:8086/api/v2/query?org=myorg" \
-H "Authorization: Token your-api-token" \
-H "Content-Type: application/vnd.flux" \
-d 'from(bucket: "mybucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "temperature")
|> mean()'
Use InfluxDB from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for InfluxDB. Paste your InfluxDB API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls InfluxDB directly with your credentials — no local install, works on mobile.
write_metrics
Write time series metrics and events to InfluxDB buckets with automatic timestamp handling and tag parsing
query_timeseries
Execute Flux queries to retrieve and analyze time series data with natural language time range specifications
create_bucket
Create and configure new data buckets with retention policies for organizing time series data
manage_tasks
Create, schedule, and manage automated data processing tasks using Flux queries
analyze_metrics
Perform statistical analysis on time series data including aggregations, downsampling, and anomaly detection
Connect in 60 seconds
Paste your InfluxDB key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect InfluxDB to your AI →