Connect to AI
Database API Key

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.

Base URL https://your-influxdb-instance.com:8086/api/v2

API Endpoints

MethodEndpointDescription
POST/writeWrite time series data points to a bucket using line protocol format
POST/queryQuery data using Flux language and return results in annotated CSV or JSON format
GET/bucketsList all buckets (data storage containers) in the organization
POST/bucketsCreate 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/orgsList all organizations available to the authenticated user
POST/authorizationsCreate a new API token with specific read/write permissions
GET/authorizationsList all API tokens and their permissions
DELETE/authorizations/{authID}Revoke an API token by deleting the authorization
GET/tasksList all scheduled tasks that run Flux queries automatically
POST/tasksCreate a new task to execute Flux queries on a schedule
GET/healthCheck the health status of the InfluxDB instance
POST/deleteDelete time series data within a specified time range and predicate
GET/backup/metadataRetrieve backup metadata for disaster recovery purposes

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 →

Related APIs