openapi: 3.0.0
info:
title: Complete InfluxDB Cloud Authorizations (API tokens) Authorizations (API tokens) Tasks API
description: '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](https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/).
To create a user session, use the [`POST /api/v2/signin` endpoint](#operation/PostSignin).
### Related endpoints
- [Signin](#tag/Signin)
- [Signout](#tag/Signout)
### Related guides
- [Authorize API requests](https://docs.influxdata.com/influxdb/cloud/api-guide/api_intro/#authentication)
- [Manage API tokens](https://docs.influxdata.com/influxdb/cloud/security/tokens/)
- [Assign a token to a specific user](https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/)
'
servers:
- url: ''
security:
- TokenAuthentication: []
tags:
- description: '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).
<span id="tasks-schemaref-task" />
### Properties
A `task` object contains information about an InfluxDB task resource.
The following table defines the properties that appear in this object:
<SchemaDefinition schemaRef="#/components/schemas/Task" />
### 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)
'
name: Tasks
paths:
/api/v2/tasks:
get:
description: 'Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task).
To limit which tasks are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`.
'
operationId: GetTasks
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) name.
Only returns tasks with the specified name.
Different tasks may have the same name.
'
in: query
name: name
schema:
type: string
- description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) ID.
Only returns tasks created after the specified task.
'
in: query
name: after
schema:
type: string
- description: 'A [user](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#user) ID.
Only returns tasks owned by the specified user.
'
in: query
name: user
schema:
type: string
- description: 'An [organization](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#organization) name.
Only returns tasks owned by the specified organization.
'
in: query
name: org
schema:
type: string
- description: 'An [organization](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#organization) ID.
Only returns tasks owned by the specified organization.
'
in: query
name: orgID
schema:
type: string
- description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) status.
Only returns tasks that have the specified status (`active` or `inactive`).
'
in: query
name: status
schema:
enum:
- active
- inactive
type: string
- description: 'The maximum number of [tasks](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) to return.
Default is `100`.
The minimum is `1` and the maximum is `500`.
To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_).
For more information about the `basic` response, see the _`type`_ parameter.
'
examples:
all:
summary: Return all tasks, without pagination.
value: '-1'
minPaginated:
summary: Return a maximum of 50 tasks.
value: '50'
in: query
name: limit
schema:
default: 100
maximum: 500
minimum: -1
type: integer
- description: The number of records to skip.
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- description: 'The sort field. Only `name` is supported.
Specifies the field used to sort records in the list.
'
in: query
name: sortBy
required: false
schema:
enum:
- name
type: string
- description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) type (`basic` or `system`).
Default is `system`.
Specifies the level of detail for tasks in the response.
The default (`system`) response contains all the metadata properties for tasks.
To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`).
'
in: query
name: type
required: false
schema:
default: ''
enum:
- basic
- system
type: string
- description: 'A [script](#tag/Invokable-Scripts) ID.
Only returns tasks that use the specified invokable script.
'
in: query
name: scriptID
schema:
type: string
responses:
'200':
content:
application/json:
examples:
basicTypeTaskOutput:
description: 'A sample response body for the `?type=basic` parameter.
`type=basic` omits some task fields (`createdAt` and `updatedAt`)
and field values (`org`, `flux`) in the response.
'
summary: Basic output
value:
links:
self: /api/v2/tasks?limit=100
tasks:
- every: 30m
flux: ''
id: 09956cbb6d378000
labels: []
lastRunStatus: success
latestCompleted: '2022-06-30T15:00:00Z'
links:
labels: /api/v2/tasks/09956cbb6d378000/labels
logs: /api/v2/tasks/09956cbb6d378000/logs
members: /api/v2/tasks/09956cbb6d378000/members
owners: /api/v2/tasks/09956cbb6d378000/owners
runs: /api/v2/tasks/09956cbb6d378000/runs
self: /api/v2/tasks/09956cbb6d378000
name: task1
org: ''
orgID: 48c88459ee424a04
ownerID: 0772396d1f411000
status: active
systemTypeTaskOutput:
description: 'A sample response body for the `?type=system` parameter.
`type=system` returns all task fields.
'
summary: System output
value:
links:
self: /api/v2/tasks?limit=100
tasks:
- createdAt: '2022-06-27T15:09:06Z'
description: IoT Center 90-day environment average.
every: 30m
flux: "option task = {name: \"task1\", every: 30m}\n\nfrom(bucket: \"iot_center\")\n |> range(start: -90d)\n |> filter(fn: (r) => r._measurement == \"environment\")\n |> aggregateWindow(every: 1h, fn: mean)"
id: 09956cbb6d378000
labels: []
lastRunStatus: success
latestCompleted: '2022-06-30T15:00:00Z'
links:
labels: /api/v2/tasks/09956cbb6d378000/labels
logs: /api/v2/tasks/09956cbb6d378000/logs
members: /api/v2/tasks/09956cbb6d378000/members
owners: /api/v2/tasks/09956cbb6d378000/owners
runs: /api/v2/tasks/09956cbb6d378000/runs
self: /api/v2/tasks/09956cbb6d378000
name: task1
org: my-iot-center
orgID: 48c88459ee424a04
ownerID: 0772396d1f411000
status: active
updatedAt: '2022-06-28T18:10:15Z'
schema:
$ref: '#/components/schemas/Tasks'
description: 'Success.
The response body contains the list of tasks.
'
'401':
$ref: '#/components/responses/AuthorizationError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: List all tasks
tags:
- Tasks
x-codeSamples:
- label: 'cURL: all tasks, basic output'
lang: Shell
source: "curl INFLUX_URL/api/v2/tasks/?limit=-1&type=basic \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Token INFLUX_API_TOKEN'\n"
post:
description: "Creates a [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) and returns the task.\n\nUse this endpoint to create a scheduled task that runs a Flux script.\n\n#### InfluxDB Cloud\n\n- You can use either `flux` or `scriptID` to provide the task script.\n\n - `flux`: a string of \"raw\" Flux that contains task options and the script--for example:\n\n ```json\n {\n \"flux\": \"option task = {name: \\\"CPU Total 1 Hour New\\\", every: 1h}\\\n from(bucket: \\\"telegraf\\\")\n |> range(start: -1h)\n |> filter(fn: (r) => (r._measurement == \\\"cpu\\\"))\n |> filter(fn: (r) =>\\n\\t\\t(r._field == \\\"usage_system\\\"))\n |> filter(fn: (r) => (r.cpu == \\\"cpu-total\\\"))\n |> aggregateWindow(every: 1h, fn: max)\n |> to(bucket: \\\"cpu_usage_user_total_1h\\\", org: \\\"INFLUX_ORG\\\")\",\n \"status\": \"active\",\n \"description\": \"This task downsamples CPU data every hour\"\n }\n ```\n\n - `scriptID`: the ID of an [invokable script](#tag/Invokable-Scripts)\n for the task to run.\n To pass task options when using `scriptID`, pass the options as\n properties in the request body--for example:\n\n ```json\n {\n \"name\": \"CPU Total 1 Hour New\",\n \"description\": \"This task downsamples CPU data every hour\",\n \"every\": \"1h\",\n \"scriptID\": \"SCRIPT_ID\",\n \"scriptParameters\":\n {\n \"rangeStart\": \"-1h\",\n \"bucket\": \"telegraf\",\n \"filterField\": \"cpu-total\"\n }\n }\n ```\n\n#### Limitations:\n\n- You can't use `flux` and `scriptID` for the same task.\n\n#### Related guides\n\n- [Get started with tasks](https://docs.influxdata.com/influxdb/cloud/process-data/get-started/)\n- [Create a task](https://docs.influxdata.com/influxdb/cloud/process-data/manage-tasks/create-task/)\n- [Common tasks](https://docs.influxdata.com/influxdb/cloud/process-data/common-tasks/)\n- [Task configuration options](https://docs.influxdata.com/influxdb/cloud/process-data/task-options/)\n"
operationId: PostTasks
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TaskCreateRequest'
description: The task to create
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
description: Success. The response body contains a `tasks` list with the new task.
'400':
content:
application/json:
examples:
fluxAndScriptError:
summary: The request body can't contain both flux and scriptID
value:
code: invalid
message: 'failed to decode request: can not provide both scriptID and flux'
missingFluxError:
summary: The request body requires either a flux parameter or scriptID parameter
value:
code: invalid
message: 'failed to decode request: flux required'
schema:
$ref: '#/components/schemas/Error'
description: 'Bad request.
The response body contains detail about the error.
#### InfluxDB Cloud
- Returns this error if the task doesn''t contain one of _`flux`_ or _`scriptID`_.
- Returns this error if the task contains _`flux`_ _and_ _`scriptID`_.
'
'401':
$ref: '#/components/responses/AuthorizationError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Create a task
tags:
- Tasks
x-codeSamples:
- label: 'cURL: create a Flux script task'
lang: Shell
source: "curl INFLUX_URL/api/v2/tasks \\\n--header \"Content-type: application/json\" \\\n--header \"Authorization: Token INFLUX_API_TOKEN\" \\\n--data-binary @- << EOF\n {\n \"orgID\": \"INFLUX_ORG_ID\",\n \"description\": \"IoT Center 30d environment average.\",\n \"flux\": \"option task = {name: \\\"iot-center-task-1\\\", every: 30m}\\\n from(bucket: \\\"iot_center\\\")\\\n |> range(start: -30d)\\\n |> filter(fn: (r) => r._measurement == \\\"environment\\\")\\\n |> aggregateWindow(every: 1h, fn: mean)\"\n }\nEOF\n"
- label: 'cURL: create a Flux script reference task'
lang: Shell
source: "curl INFLUX_URL/api/v2/tasks \\\n--header \"Content-type: application/json\" \\\n--header \"Authorization: Token INFLUX_API_TOKEN\" \\\n--data-binary @- << EOF\n {\n \"orgID\": \"INFLUX_ORG_ID\",\n \"description\": \"IoT Center 30d environment average.\",\n \"scriptID\": \"085138a111448000\",\n \"scriptParameters\":\n {\n \"rangeStart\": \"-30d\",\n \"bucket\": \"air_sensor\",\n \"filterField\": \"temperature\",\n \"groupColumn\": \"_time\"\n }\n }\nEOF\n"
/api/v2/tasks/{taskID}:
delete:
description: 'Deletes a [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) and associated records.
Use this endpoint to delete a task and all associated records (task runs, logs, and labels).
Once the task is deleted, InfluxDB cancels all scheduled runs of the task.
If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID).
'
operationId: DeleteTasksID
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) ID. Specifies the task to delete.
in: path
name: taskID
required: true
schema:
type: string
responses:
'204':
description: Success. The task and task runs are deleted. Scheduled runs are canceled.
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: Delete a task
tags:
- Tasks
get:
description: 'Retrieves a [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task).
'
operationId: GetTasksID
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) ID.
Specifies the task to retrieve.
'
in: path
name: taskID
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
description: Success. The response body contains the task.
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: Retrieve a task
tags:
- Tasks
patch:
description: "Updates a [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task),\nand then cancels all scheduled runs of the task.\n\nUse this endpoint to set, modify, or clear task properties--for example: `cron`, `name`, `flux`, `status`.\nOnce InfluxDB applies the update, it cancels all previously scheduled runs of the task.\n\nTo update a task, pass an object that contains the updated key-value pairs.\nTo activate or inactivate a task, set the `status` property.\n_`\"status\": \"inactive\"`_ cancels scheduled runs and prevents manual runs of the task.\n\n#### InfluxDB Cloud\n\n- Use either `flux` or `scriptID` to provide the task script.\n\n - `flux`: a string of \"raw\" Flux that contains task options and the script--for example:\n\n ```json\n {\n \"flux\": \"option task = {name: \\\"CPU Total 1 Hour New\\\", every: 1h}\\\n from(bucket: \\\"telegraf\\\")\n |> range(start: -1h)\n |> filter(fn: (r) => (r._measurement == \\\"cpu\\\"))\n |> filter(fn: (r) =>\\n\\t\\t(r._field == \\\"usage_system\\\"))\n |> filter(fn: (r) => (r.cpu == \\\"cpu-total\\\"))\n |> aggregateWindow(every: 1h, fn: max)\n |> to(bucket: \\\"cpu_usage_user_total_1h\\\", org: \\\"INFLUX_ORG\\\")\",\n \"status\": \"active\",\n \"description\": \"This task downsamples CPU data every hour\"\n }\n ```\n\n - `scriptID`: the ID of an [invokable script](#tag/Invokable-Scripts)\n for the task to run.\n To pass task options when using `scriptID`, pass the options as\n properties in the request body--for example:\n\n ```json\n {\n \"name\": \"CPU Total 1 Hour New\",\n \"description\": \"This task downsamples CPU data every hour\",\n \"every\": \"1h\",\n \"scriptID\": \"SCRIPT_ID\",\n \"scriptParameters\":\n {\n \"rangeStart\": \"-1h\",\n \"bucket\": \"telegraf\",\n \"filterField\": \"cpu-total\"\n }\n }\n ```\n\n#### Limitations:\n\n- You can't use `flux` and `scriptID` for the same task.\n"
operationId: PatchTasksID
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) ID.
Specifies the task to update.
'
in: path
name: taskID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TaskUpdateRequest'
description: An task update to apply.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
description: Success. The response body contains the updated task.
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: Update a task
tags:
- Tasks
/api/v2/tasks/{taskID}/labels:
get:
description: 'Retrieves a list of all labels for a task.
Labels may be used for grouping and filtering tasks.
'
operationId: GetTasksIDLabels
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: The ID of the task to retrieve labels for.
in: path
name: taskID
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/LabelsResponse'
description: Success. The response body contains a list of all labels for the task.
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: List labels for a task
tags:
- Tasks
post:
description: 'Adds a label to a task.
Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI.
'
operationId: PostTasksIDLabels
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: The ID of the task to label.
in: path
name: taskID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LabelMapping'
description: An object that contains a _`labelID`_ to add to the task.
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/LabelResponse'
description: Success. The response body contains a list of all labels for the task.
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: Add a label to a task
tags:
- Tasks
/api/v2/tasks/{taskID}/labels/{labelID}:
delete:
description: 'Deletes a label from a task.
'
operationId: DeleteTasksIDLabelsID
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: The ID of the task to delete the label from.
in: path
name: taskID
required: true
schema:
type: string
- description: The ID of the label to delete.
in: path
name: labelID
required: true
schema:
type: string
responses:
'204':
description: Success. The label is deleted.
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: Delete a label from a task
tags:
- Tasks
/api/v2/tasks/{taskID}/logs:
get:
description: 'Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task).
When an InfluxDB task runs, a “run” record is created in the task’s history.
Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt.
Use this endpoint to retrieve only the log events for a task,
without additional task metadata.
'
operationId: GetTasksIDLogs
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: The task ID.
in: path
name: taskID
required: true
schema:
type: string
responses:
'200':
content:
application/json:
examples:
taskFailure:
summary: Events for a failed task run.
value:
events:
- message: 'Started task from script: "option task = {name: \"test task\", every: 3d, offset: 0s}"'
runID: 09a946fc3167d000
time: '2022-07-13T07:06:54.198167Z'
- message: Completed(failed)
runID: 09a946fc3167d000
time: '2022-07-13T07:07:13.104037Z'
- message: 'error exhausting result iterator: error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment'
runID: 09a946fc3167d000
time: '2022-07-13T08:24:37.115323Z'
taskSuccess:
summary: Events for a successful task run.
value:
events:
- message: 'Started task from script: "option task = {name: \"task1\", every: 30m} from(bucket: \"iot_center\") |> range(start: -90d) |> filter(fn: (r) => r._measurement == \"environment\") |> aggregateWindow(every: 1h, fn: mean)"'
runID: 09b070dadaa7d000
time: '2022-07-18T14:46:07.101231Z'
- message: Completed(success)
runID: 09b070dadaa7d000
time: '2022-07-18T14:46:07.242859Z'
schema:
$ref: '#/components/schemas/Logs'
description: 'Success. The response body contains an `events` list with logs for the task.
Each log event `message` contains detail about the event.
If a task run fails, InfluxDB logs an event with the reason for the failure.
'
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/GeneralServerError'
summary: Retrieve all logs for a task
tags:
- Tasks
/api/v2/tasks/{taskID}/members:
get:
deprecated: true
description: '**Deprecated**: Tasks don''t use `owner` and `member` roles.
Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.
Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task).
'
operationId: GetTasksIDMembers
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: The task ID.
in: path
name: taskID
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceMembers'
description: 'Success. The response body contains a list of `users` that have
the `member` role for a task.
'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: List all task members
tags:
- Tasks
post:
deprecated: true
description: '**Deprecated**: Tasks don''t use `owner` and `member` roles.
Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.
Adds a user to members of a task and returns the member.
'
operationId: PostTasksIDMembers
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: The task ID.
in: path
name: taskID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddResourceMemberRequestBody'
description: A user to add as a member of the task.
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceMember'
description: Created. The user is added to task members.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Add a member to a task
tags:
- Tasks
/api/v2/tasks/{taskID}/members/{userID}:
delete:
deprecated: true
description: '**Deprecated**: Tasks don''t use `owner` and `member` roles.
Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.
Removes a member from a [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task).
'
operationId: DeleteTasksIDMembersID
parameters:
- $ref: '#/components/parameters/TraceSpan'
- description: The ID of the member to remove.
in: path
name: userID
required: true
schema:
type: string
- description: The task ID.
in: path
name: taskID
required: true
schema:
type: string
responses:
'204':
description: Member removed
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Remove a member from a task
tags:
- Tasks
/api/v2/tasks/{taskID}/owners:
get:
deprecated: true
description: '**Deprecated**: Tasks don''t use `owner` and `member` roles.
Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.
Retrieves all users that have owner permission for a t
# --- truncated at 32 KB (75 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/influxdb/refs/heads/main/openapi/influxdb-tasks-api-openapi.yml