InfluxDB Cloud Serverless API Service
The InfluxDB v2 HTTP API lets you use /api/v2
endpoints for managing retention policy mappings and writing data stored in an InfluxDB v3 instance.
This documentation is generated from the InfluxDB OpenAPI specification. \n
Routes /api/v2
Authorizations (API tokens) /api/v2/authorizations
Create and manage authorizations (API tokens).
An authorization contains a list of read
and write
permissions for organization resources and provides an API token for authentication.
An authorization belongs to an organization and only contains permissions for that organization.
We recommend the following for managing your tokens:
- Create a generic user to create and manage tokens for writing data.
- Store your tokens in a secure password vault for future access.
User sessions with authorizations
Optionally, when creating an authorization, you can scope it to a specific user.
If the user signs in with username and password, creating a user session,
the session carries the permissions granted by all the user’s authorizations.
For more information, see how to assign a token to a specific user.
To create a user session, use the POST /api/v2/signin
endpoint.
Buckets /api/v2/buckets
Store your data in InfluxDB buckets. A bucket is a named location where time series data is stored. All buckets have a retention period, a duration of time that each data point persists. InfluxDB drops all points with timestamps older than the bucket’s retention period. A bucket belongs to an organization.
/api/v2/checks
InfluxDB API documentation
/api/v2/dashboards
InfluxDB API documentation
DBRPs /api/v2/dbrps
The InfluxDB 1.x data model includes databases and retention policies. InfluxDB 2.x replaces databases and retention policies with buckets. To support InfluxDB 1.x query and write patterns in InfluxDB 2.x, databases and retention policies are mapped to buckets using the database and retention policy (DBRP) mapping service. The DBRP mapping service uses the database and retention policy specified in 1.x compatibility API requests to route operations to a bucket.
Delete /api/v2/delete
Delete data from an InfluxDB bucket.
/api/v2/flags
InfluxDB API documentation
/api/v2/labels
InfluxDB API documentation
/api/v2/maps
InfluxDB API documentation
/api/v2/me
InfluxDB API documentation
/api/v2/notificationEndpoints
InfluxDB API documentation
/api/v2/notificationRules
InfluxDB API documentation
Organizations /api/v2/orgs
Manage your organization. An organization is a workspace for a group of users. Organizations can be used to separate different environments, projects, teams or users within InfluxDB.
Use the /api/v2/orgs
endpoints to view and manage organizations.
Query /api/v2/query
Query data stored in a bucket.
- HTTP clients can query the v1
/query
endpoint using InfluxQL and retrieve data in CSV or JSON format. - Flight + gRPC clients can query using SQL or InfluxQL and retrieve data in Arrow format.
x-influxdata-related-content:
- /influxdb/cloud-serverless/get-started/query/
- /influxdb/cloud-serverless/query-data/execute-queries/
Resources /api/v2/resources
Invokable Scripts /api/v2/scripts
Store, manage, and execute scripts in InfluxDB.
A script stores your custom Flux script and provides an invokable
endpoint that accepts runtime parameters.
In a script, you can specify custom runtime parameters
(params
)–for example, params.myparameter
.
Once you create a script, InfluxDB generates an
/api/v2/scripts/SCRIPT_ID/invoke
endpoint
for your organization.
You can run the script from API requests and tasks, defining parameter
values for each run.
When the script runs, InfluxDB replaces params
references in the
script with the runtime parameter values you define.
Use the /api/v2/scripts
endpoints to create and manage scripts.
See related guides to learn how to define parameters and execute scripts.
/api/v2/setup
InfluxDB API documentation
/api/v2/signin
InfluxDB API documentation
/api/v2/signout
InfluxDB API documentation
Templates /api/v2/stacks
Export and apply InfluxDB templates. Manage stacks of templated InfluxDB resources.
InfluxDB templates are prepackaged configurations for resources. Use InfluxDB templates to configure a fresh instance of InfluxDB, back up your dashboard configuration, or share your configuration.
Use the /api/v2/templates
endpoints to export templates and apply templates.
InfluxDB stacks are stateful InfluxDB templates that let you add, update, and remove installed template resources over time, avoid duplicating resources when applying the same or similar templates more than once, and apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
Use the /api/v2/stacks
endpoints to manage installed template resources.
Tasks /api/v2/tasks
Process and analyze your data with tasks
in the InfluxDB task engine.
Use the /api/v2/tasks
endpoints to schedule and manage tasks, retry task runs, and retrieve run logs.
To configure a task, provide the script and the schedule to run the task.
For examples, see how to create a task with the POST /api/v2/tasks
endpoint.
Properties
A task
object contains information about an InfluxDB task resource.
The following table defines the properties that appear in this object:
/api/v2/telegraf
InfluxDB API documentation
Telegrafs /api/v2/telegrafs
Templates /api/v2/templates
Export and apply InfluxDB templates. Manage stacks of templated InfluxDB resources.
InfluxDB templates are prepackaged configurations for resources. Use InfluxDB templates to configure a fresh instance of InfluxDB, back up your dashboard configuration, or share your configuration.
Use the /api/v2/templates
endpoints to export templates and apply templates.
InfluxDB stacks are stateful InfluxDB templates that let you add, update, and remove installed template resources over time, avoid duplicating resources when applying the same or similar templates more than once, and apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
Use the /api/v2/stacks
endpoints to manage installed template resources.
/api/v2/users
InfluxDB API documentation
Variables /api/v2/variables
Data I/O endpoints /api/v2/write
/legacy/authorizations
InfluxDB API documentation
/ping
InfluxDB API documentation
Data I/O endpoints /query
Data I/O endpoints /write
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 and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.