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

InfluxData 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)

InfluxData Tasks API is one of 45 APIs that InfluxData publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

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

This API exposes 21 operations across 13 paths, and defines 24 schemas. It is described by OpenAPI 3.0.0, at version 2.0.1.

Requests are made against a single base URL, /api/v2.

21 operations 13 paths 24 schemas 5 DELETE9 GET1 PATCH6 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
2.0.1
Base URL
https://us-east-1-1.aws.cloud2.influxdata.com/api/v2
Authentication
API Key, HTTP Basic
License
Resource Areas
1

Authentication & Security 2

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

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

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

Schemas 24

The contract defines 24 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.

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

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

influxdata-tasks-api-openapi.yml Raw ↑

Other APIs InfluxData publishes across the network.

InfluxData Authorizations (API tokens) API
InfluxData Backup API
InfluxData Bucket Schemas API
InfluxData Buckets API
InfluxData Cells API
InfluxData Checks API
InfluxData Config API
InfluxData Dashboards API
InfluxData Data I/O endpoints API
InfluxData DBRPs API
InfluxData Debug API
InfluxData Delete API