REST API
Everything the browser does goes through the server’s REST API, so other programs can use it too, for example to import annotations or read the statistics.
Basics
-
All routes are under
/api; requests and answers are JSON.folderandnameare query parameters. -
Everything except
GET /api/statusand the sign-in routes needs a session: sign in withPOST /api/auth/loginand send the session cookie with every request. -
Changing requests (POST, PUT, DELETE) need the header
X-Requested-With: lsa. -
The user is always the signed-in one. Routes about images, settings, history and notes take
project=<id>(default: the only project the user takes part in, elsedefault). -
Errors:
{"error": "<code>", "message": "<text>"}with the HTTP status (400 bad request, 401 not signed in, 403 role missing, 404 not found, 409 conflict, 423 locked).
curl -c cookies.txt -H "X-Requested-With: lsa" -H "Content-Type: application/json" \
-d '{"username":"anna","password":"..."}' https://annotation.example.com/api/auth/login
curl -b cookies.txt "https://annotation.example.com/api/images?project=line-5&folder=2026-10-28"
Routes
Role in brackets: Admin is the server admin; the other roles are the user’s roles in the project.
Sign-in and users
| Method and path | Purpose |
|---|---|
|
Version, licence state (public) |
|
Which sign-in methods are offered (public) |
|
|
|
Single sign-on (browser redirects) |
|
End the session; returns the provider’s logout address for single sign-on sessions |
|
The signed-in user and their roles |
|
|
|
User management (Admin) |
|
Group → role mappings (Admin) |
|
Configured sign-in methods, test a directory sign-in (Admin) |
|
List, make and download backups (Admin) |
Projects
| Method and path | Purpose |
|---|---|
|
Projects the user takes part in, with their roles; for admins also the S3 targets |
|
|
|
Details; name, description, open to all, members (Project admin) |
|
|
|
The project file (tar) (Admin) |
|
Upload a project file in pieces and unpack it as a new project (Admin) |
|
People with a role in the project (to address notes) |
Images and annotations
| Method and path | Purpose |
|---|---|
|
Sub-folders of the project |
|
Images with annotated and locked state, open notes, box count and labels of the reference annotation, the network’s uncertainty once rated; with several annotators also the counts and review state |
|
The image (PNG) |
|
Boxes, image size, revision, lock. |
|
Save |
|
Take, renew or release the edit lock ( |
|
Delete an image with its files, versions, history and notes (Project admin) |
|
Smallest oriented box around |
A box is {"cx": 412.3, "cy": 267.8, "width": 188.0, "height": 71.4, "angle": -0.385, "label": "bracket", "metadata": null} (angle in radians).
History, notes, settings
| Method and path | Purpose |
|---|---|
|
Saved versions of an annotation; one version with its boxes |
|
Revision notes of an image; open notes of the project |
|
|
|
Project settings (changing: Project admin) |
|
Add a label to the shared list (Annotator, Reviewer) |
Review and suggestions
| Method and path | Purpose |
|---|---|
|
All annotators' boxes, matched objects and differences (Reviewer) |
|
Agreement statistics for a folder or the project (Reviewer) |
|
Box suggestions; body |
|
The box suggestion services, their backends and networks |
|
|
|
Progress of the rating; stop it |
|
What an export for LumiScan Training would contain; parameters |
|
The export as a ZIP file, same parameters (Reviewer) |