Post actions

Perform a Data Manager action with the selected tasks and filters. Note: More complex actions require additional parameters in the request body. Call GET api/actions?project=<id> to explore them.
Example: GET api/actions?id=delete_tasks&project=1

Authentication

AuthorizationToken
The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>

Query parameters

idenumRequired

Action name ID, see the full list of actions in the GET api/actions request

projectintegerRequired
Project ID
viewintegerOptional

View ID (optional, it has higher priority than filters, selectedItems and ordering from the request body payload)

Request

This endpoint expects an object.
filtersobjectOptional
Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.<br>Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`
orderinglist of enumsOptional

List of fields to order by. Fields are similar to filters but without the filter: prefix. To reverse the order, add a minus sign before the field name, e.g. -tasks:created_at.

selectedItemsobjectOptional
Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.<br>Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}`

Response

Action performed successfully