Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

InfluxDB Tasks API

Process and analyze your data with [tasks](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task)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](#operation/PostTasks).### PropertiesA `task` object contains information about an InfluxDB task resource.The following table defines the properties that appear in this object:### Related guides- [Get started with tasks](https://docs.influxdata.com/influxdb/cloud/process-data/get-started/)- [Common data processing tasks](https://docs.influxdata.com/influxdb/cloud/process-data/common-tasks/)- [Create a script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/#create-an-invokable-script)

InfluxDB Tasks API is one of 40 APIs that InfluxDB publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Tasks. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, authentication docs, and a getting-started guide.

This API exposes 21 operations across 13 paths, and defines 25 schemas. It is described by OpenAPI 3.0.0.

Requests are made against the base URL https://cloud2.influxdata.com/api/v2.

21 operations 13 paths 25 schemas 5 DELETE9 GET1 PATCH6 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
Base URL
https://cloud2.influxdata.com/api/v2
Authentication
HTTP Basic, API Key
Resource Areas
1

Authentication & Security 2

InfluxDB Tasks API declares 2 security schemes for authenticating requests. It accepts HTTP basic authentication (BasicAuthentication). An API key is passed in the header as Authorization (TokenAuthentication). By default, every request must be authenticated.

  • BasicAuthentication — Basic authentication scheme Use the HTTP Basic authentication scheme for InfluxDB /api/v2 API operations that support it: Syntax Authorization: Basic BASE64ENC…
  • TokenAuthentication — Use the [Token authentication](section/Authentication/TokenAuthentication) scheme to authenticate to the InfluxDB API. In your API requests, send an Authorizat…

Paths & Operations 21

Across 13 paths, the API surfaces 21 operations — 5 DELETE, 9 GET, 1 PATCH, 6 POST. Each is listed below with its method, path, parameters, and response codes.

Tasks 21

Process and analyze your data with [tasks](https://docs.influxdata.com/influxdb/cloud/reference/glossary/task) in the InfluxDB task engine. Use the /api/v2/tasks endpoints to sche…

GET
/api/v2/tasks
List all tasks
GetTasks 12 params → 200401500default
POST
/api/v2/tasks
Create a task
PostTasks 1 param body → 201400401500default
DELETE
/api/v2/tasks/{taskID}
Delete a task
DeleteTasksID 2 params → 204400401404500default
GET
/api/v2/tasks/{taskID}
Retrieve a task
GetTasksID 2 params → 200400401404500default
PATCH
/api/v2/tasks/{taskID}
Update a task
PatchTasksID 2 params body → 200400401404500default
GET
/api/v2/tasks/{taskID}/labels
List labels for a task
GetTasksIDLabels 2 params → 200400401404500default
POST
/api/v2/tasks/{taskID}/labels
Add a label to a task
PostTasksIDLabels 2 params body → 201400401404500default
DELETE
/api/v2/tasks/{taskID}/labels/{labelID}
Delete a label from a task
DeleteTasksIDLabelsID 3 params → 204400401404500default
GET
/api/v2/tasks/{taskID}/logs
Retrieve all logs for a task
GetTasksIDLogs 2 params → 200400401404500default
GET
/api/v2/tasks/{taskID}/membersdeprecated
List all task members
GetTasksIDMembers 2 params → 200default
POST
/api/v2/tasks/{taskID}/membersdeprecated
Add a member to a task
PostTasksIDMembers 2 params body → 201default
DELETE
/api/v2/tasks/{taskID}/members/{userID}deprecated
Remove a member from a task
DeleteTasksIDMembersID 3 params → 204default
GET
/api/v2/tasks/{taskID}/ownersdeprecated
List all owners of a task
GetTasksIDOwners 2 params → 200401422500default
POST
/api/v2/tasks/{taskID}/ownersdeprecated
Add an owner for a task
PostTasksIDOwners 2 params body → 201401422500default
DELETE
/api/v2/tasks/{taskID}/owners/{userID}deprecated
Remove an owner from a task
DeleteTasksIDOwnersID 3 params → 204default
GET
/api/v2/tasks/{taskID}/runs
List runs for a task
GetTasksIDRuns 6 params → 200401500default
POST
/api/v2/tasks/{taskID}/runs
Start a task run, overriding the schedule
PostTasksIDRuns 2 params body → 201401500default
DELETE
/api/v2/tasks/{taskID}/runs/{runID}
Cancel a running task
DeleteTasksIDRunsID 3 params → 204400401404405500default
GET
/api/v2/tasks/{taskID}/runs/{runID}
Retrieve a run for a task.
GetTasksIDRunsID 3 params → 200400401404500default
GET
/api/v2/tasks/{taskID}/runs/{runID}/logs
Retrieve all logs for a run
GetTasksIDRunsIDLogs 3 params → 200400401404500default
POST
/api/v2/tasks/{taskID}/runs/{runID}/retry
Retry a task run
PostTasksIDRunsIDRetry 3 params body → 200400401404500default

Schemas 25

The contract defines 25 schemas that model the data the API accepts and returns. The most detailed are Task (21 properties), TaskCreateRequest (11 properties), Run (10 properties), TaskUpdateRequest (9 properties). Each schema is shown below with its type and property counts.

Task
object
21 properties 3 required
Link
string
URI of resource.
ErrorCode
string
code is the machine-readable error code.
LabelResponse
object
2 properties
TaskCreateRequest
object
11 properties
ResourceOwner
ResourceMembers
object
2 properties
UserResponse
object
4 properties 1 required
TaskUpdateRequest
object
9 properties
Label
object
4 properties
Run
object
10 properties
Labels
array
Error
object
4 properties 1 required
LogEvent
object
3 properties
ResourceMember
RunManually
object
1 property
Links
object
URI pointers for additional paged results.
3 properties 1 required
TaskStatusType
string
inactive cancels scheduled runs and prevents manual runs of the task.
Logs
object
1 property
LabelsResponse
object
2 properties
Tasks
object
2 properties
Runs
object
2 properties
ResourceOwners
object
2 properties
AddResourceMemberRequestBody
object
2 properties 1 required
LabelMapping
object
A label mapping contains a label ID to attach to a resource.
1 property 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

influxdb-tasks-api-openapi.yml Raw ↑

Other APIs InfluxDB publishes across the network.

InfluxDB Authorizations (API tokens) API
InfluxDB Bucket Schemas API
InfluxDB Buckets API
InfluxDB Cells API
InfluxDB Checks API
InfluxDB Config API
InfluxDB Dashboards API
InfluxDB Data I/O endpoints API
InfluxDB DBRPs API
InfluxDB Delete API
InfluxDB Invokable Scripts API
InfluxDB Labels API