Annotations

Get annotation by its ID

GET

Tasks can have multiple annotations. Use this call to retrieve a specific annotation using its ID.

You can find the ID in the Label Studio UI listed at the top of the annotation in its tab. It is also listed in the History panel when viewing the annotation. Or you can use Get all task annotations to find all annotation IDs.

Path parameters

idintegerRequired
A unique integer value identifying this annotation.

Response

This endpoint returns an object
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/annotations/1/ \
2 -H "Authorization: Token <api_key>"
200Retrieved
1{
2 "id": 1,
3 "result": [
4 {
5 "original_width": 1920,
6 "original_height": 1080,
7 "image_rotation": 0,
8 "from_name": "bboxes",
9 "to_name": "image",
10 "type": "rectanglelabels",
11 "value": {
12 "x": 20,
13 "y": 30,
14 "width": 50,
15 "height": 60,
16 "rotation": 0,
17 "values": {
18 "rectanglelabels": {
19 "0": "Person"
20 }
21 }
22 }
23 }
24 ],
25 "created_username": "created_username",
26 "created_ago": "created_ago",
27 "completed_by": 1,
28 "unique_id": "unique_id",
29 "was_cancelled": false,
30 "ground_truth": false,
31 "created_at": "2024-01-15T09:30:00Z",
32 "updated_at": "2024-01-15T09:30:00Z",
33 "draft_created_at": "2024-01-15T09:30:00Z",
34 "lead_time": 10,
35 "import_id": 1,
36 "last_action": "prediction",
37 "task": 1,
38 "project": 1,
39 "updated_by": 1,
40 "parent_prediction": 1,
41 "parent_annotation": 1,
42 "last_created_by": 1
43}