For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
EnterpriseQuick Start
API ReferenceTutorials
  • Introduction
    • Getting started
  • API Reference
      • GETGet project import status
      • DELDelete all tasks
      • GETList tasks
      • POSTCreate a new task
      • GETGet task
      • DELDelete task
      • PATCHUpdate task
      • POSTCreate task event
LogoLogo
EnterpriseQuick Start
API ReferenceTasks

Update task

PATCH
http://localhost:8000/api/tasks/:id/
PATCH
/api/tasks/:id/
$curl -X PATCH http://localhost:8000/api/tasks/id/ \
> -H "Authorization: Token <api_key>" \
> -H "Content-Type: application/json" \
> -d '{}'
200Updated
1{
2 "agreement": "0.85",
3 "agreement_selected": "0.90",
4 "allow_skip": true,
5 "annotation_time": 360,
6 "annotations": "[{\"id\": 101, \"result\": [{\"from_name\": \"label\", \"to_name\": \"image\", \"type\": \"rectanglelabels\", \"value\": {\"x\": 10, \"y\": 20, \"width\": 30, \"height\": 40}}]}]",
7 "annotations_ids": "[101, 102]",
8 "annotations_results": "[{\"id\": 101, \"result\": [{\"from_name\": \"label\", \"to_name\": \"image\", \"type\": \"rectanglelabels\", \"value\": {\"x\": 10, \"y\": 20, \"width\": 30, \"height\": 40}}]}]",
9 "annotators": [
10 {}
11 ],
12 "annotators_count": 3,
13 "avg_lead_time": 420.5,
14 "cancelled_annotations": 2,
15 "comment_authors": [
16 {}
17 ],
18 "comment_authors_count": 2,
19 "comment_count": 5,
20 "comments": "[{\"author\": \"user1\", \"text\": \"Please review the bounding box.\"}, {\"author\": \"user2\", \"text\": \"Annotation looks good.\"}]",
21 "completed_at": "2024-01-15T09:30:00Z",
22 "created_at": "2024-01-10T08:00:00Z",
23 "data": {},
24 "draft_exists": true,
25 "drafts": [
26 {
27 "created_at": "2024-01-14T12:00:00Z",
28 "result": [
29 {}
30 ],
31 "updated_at": "2024-01-14T15:00:00Z"
32 }
33 ],
34 "file_upload": "image_001.jpg",
35 "ground_truth": false,
36 "id": 12345,
37 "inner_id": 67890,
38 "is_labeled": true,
39 "last_comment_updated_at": "2024-01-15T08:45:00Z",
40 "meta": null,
41 "overlap": 2,
42 "precomputed_agreement": 0.88,
43 "predictions": [
44 {
45 "created_at": "2024-01-14T10:00:00Z",
46 "model": {},
47 "model_run": {},
48 "model_version": "v1.2.3",
49 "project": 101,
50 "result": [
51 {}
52 ],
53 "score": 0.92,
54 "task": 12345,
55 "updated_at": "2024-01-14T11:00:00Z"
56 }
57 ],
58 "predictions_model_versions": "v1.2.3",
59 "predictions_results": "[{\"result\": [{\"from_name\": \"label\", \"to_name\": \"image\", \"type\": \"rectanglelabels\", \"value\": {\"x\": 12, \"y\": 22, \"width\": 28, \"height\": 38}}]}]",
60 "predictions_score": 0.92,
61 "project": 101,
62 "review_time": 180,
63 "reviewed": true,
64 "reviewers": [
65 {}
66 ],
67 "reviewers_count": 2,
68 "reviews_accepted": 4,
69 "reviews_rejected": 1,
70 "state": "completed",
71 "storage_filename": "image_001.jpg",
72 "total_annotations": 5,
73 "total_predictions": 3,
74 "unresolved_comment_count": 1,
75 "updated_at": "2024-01-15T09:00:00Z",
76 "updated_by": [
77 {}
78 ]
79}
Update the attributes of an existing labeling task.
Was this page helpful?
Previous

Create task event

Next
Built with

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>

Path parameters

idstringRequired
Task ID

Request

This endpoint expects an object.
allow_skipboolean or nullOptional
Whether this task can be skipped. Set to False to make task unskippable.
avg_lead_timedoubleOptional
cancelled_annotationsintegerOptional
comment_countintegerOptional-2147483648-2147483647
Number of comments in the task including all annotations
completed_atdatetimeOptional
datamap from strings to anyOptional
User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI.
draft_existsbooleanOptional
ground_truthbooleanOptional
inner_idintegerOptional
is_labeledbooleanOptional

True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project

last_comment_updated_atdatetime or nullOptional
When the last comment was updated
metaany or nullOptional

Meta is user imported (uploaded) data and can be useful as input for an ML Backend for embeddings, advanced vectors, and other info. It is passed to ML during training/predicting steps.

overlapintegerOptional-2147483648-2147483647
Number of distinct annotators that processed the current task
precomputed_agreementdouble or nullOptional
Average agreement score for the task
predictions_scoredoubleOptional
projectinteger or nullOptional
Project ID for this task
reviewedbooleanOptional
reviews_acceptedintegerOptional
reviews_rejectedintegerOptional
total_annotationsintegerOptional
total_predictionsintegerOptional
unresolved_comment_countintegerOptional-2147483648-2147483647
Number of unresolved comments in the task including all annotations

Response

LseTaskobject
Data Manager Task Serializer with FSM state support.
OR
LseTaskSerializerForReviewersobject
Data Manager Task Serializer with FSM state support.
OR
LseTaskSerializerForAnnotatorsobject
Data Manager Task Serializer with FSM state support.
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:
curl https://label-studio-host/api/projects -H “Authorization: Token [your-token]”