Annotations

Get all task annotations

GET

List all annotations for a task.

You will need to supply the task ID. You can find this in Label Studio by opening a task and checking the URL. It is also listed at the top of the labeling interface. Or you can use Get tasks list.

Path parameters

idintegerRequired
Task ID

Response

This endpoint returns a list of objects
id
integerOptional
result
list of maps from strings to anyOptional
List of annotation results for the task
created_username
stringOptional
Username string
created_ago
stringOptionalDefaults to
Time delta from creation time
completed_by
integerOptional
unique_id
stringOptional
was_cancelled
booleanOptional
User skipped the task
ground_truth
booleanOptional

This annotation is a Ground Truth (ground_truth)

created_at
datetimeOptional
Creation time
updated_at
datetimeOptional
Last updated time
draft_created_at
datetimeOptional
Draft creation time
lead_time
doubleOptional
How much time it took to annotate the task
import_id
integerOptional
Original annotation ID that was at the import step or NULL if this annotation wasn't imported
last_action
enumOptional
Action which was performed in the last annotation history item
task
integerOptional
Corresponding task for this annotation
project
integerOptional
Project ID for this annotation
updated_by
integerOptional
Last user who updated this annotation
parent_prediction
integerOptional
Points to the prediction from which this annotation was created
parent_annotation
integerOptional
Points to the parent annotation from which this annotation was created
last_created_by
integerOptional
User who created the last annotation history item
GET
1curl http://localhost:8080/api/tasks/1/annotations/ \
2 -H "Authorization: Token <api_key>"
200Retrieved
1[
2 {
3 "id": 1,
4 "result": [
5 {
6 "original_width": 1920,
7 "original_height": 1080,
8 "image_rotation": 0,
9 "from_name": "bboxes",
10 "to_name": "image",
11 "type": "rectanglelabels",
12 "value": {
13 "x": 20,
14 "y": 30,
15 "width": 50,
16 "height": 60,
17 "rotation": 0,
18 "values": {
19 "rectanglelabels": {
20 "0": "Person"
21 }
22 }
23 }
24 }
25 ],
26 "created_username": "created_username",
27 "created_ago": "created_ago",
28 "completed_by": 1,
29 "unique_id": "unique_id",
30 "was_cancelled": false,
31 "ground_truth": false,
32 "created_at": "2024-01-15T09:30:00Z",
33 "updated_at": "2024-01-15T09:30:00Z",
34 "draft_created_at": "2024-01-15T09:30:00Z",
35 "lead_time": 10,
36 "import_id": 1,
37 "last_action": "prediction",
38 "task": 1,
39 "project": 1,
40 "updated_by": 1,
41 "parent_prediction": 1,
42 "parent_annotation": 1,
43 "last_created_by": 1
44 }
45]