Mark — API-viite
One picture's stars, flag, colour label, mask, tag and rotation, or the same on many at once.
API-viite on englanniksi: se luodaan sovelluksen omasta OpenAPI-dokumentista.
One picture's stars, flag, colour label, mask, tag and rotation, or the same on many at once.
12 operations. Generated from the application's own OpenAPI document.
POST /api/auto-advance
Auto-advance after marking
Body
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes |
curl -X POST http://127.0.0.1:9100/api/auto-advance \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'
Responses
200— Auto-advance set
POST /api/batch
Mark pictures
Body
| Field | Type | Required | Description |
|---|---|---|---|
action | "set_rating" | "set_flag" | "set_label" | "toggle_tag" | "move_to_trash" | "queue_upload" | "rotate" | "clear_crop" | "auto_crop" | "set_mask" | yes | The batch action: set_rating, set_flag, set_label, toggle_tag, move_to_trash, queue_upload, rotate, clear_crop, auto_crop, set_mask |
indices | number[] | yes | Indices of images to act on |
value | any |
curl -X POST http://127.0.0.1:9100/api/batch \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"indices":[0],"action":"set_rating"}'
Responses
200— Batch action applied400— Invalid batch action or indices
PUT /api/burst/groups/{id}/state
Burst to do, later or done
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | number | Burst group id |
Body
| Field | Type | Required | Description |
|---|---|---|---|
state | "to_do" | "later" | "done" | yes | The burst state: to_do, later, done |
curl -X PUT http://127.0.0.1:9100/api/burst/groups/<id>/state \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"state":"to_do"}'
Responses
200— The burst's state set by hand (#808)404— No such burst
POST /api/burst/settle
Settle burst
Body
| Field | Type | Required | Description |
|---|---|---|---|
index | number | The frame to keep, by index; left out, `keep` says which. | |
keep | string | `on_screen` (the default) or `pick`. |
curl -X POST http://127.0.0.1:9100/api/burst/settle \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"index":0,"keep":"text"}'
Responses
200— One frame of the burst on screen kept, the rest rejected, and on to the next burst to do (#808); one undo400— Not in a burst, or nothing scored to pick
POST /api/images/current/flag
Flag
Body
| Field | Type | Required | Description |
|---|---|---|---|
flag | "pick" | "reject" | "none" | yes | The flag: pick, reject, none |
curl -X POST http://127.0.0.1:9100/api/images/current/flag \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"flag":"pick"}'
Responses
200— Flag set400— Invalid flag value
POST /api/images/current/label
Color label
Body
| Field | Type | Required | Description |
|---|---|---|---|
color | "red" | "yellow" | "green" | "blue" | "purple" | "orange" | "pink" | "gray" | "none" | The color label, or none: red, yellow, green, blue, purple, orange, pink, gray, none |
curl -X POST http://127.0.0.1:9100/api/images/current/label \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"color":"red"}'
Responses
200— Color label set400— Invalid color label
POST /api/images/current/mask
Mask picture
Body
| Field | Type | Required | Description |
|---|---|---|---|
masked | boolean | yes |
curl -X POST http://127.0.0.1:9100/api/images/current/mask \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"masked":true}'
Responses
200— Mask state set
POST /api/images/current/rating
Set rating
Body
| Field | Type | Required | Description |
|---|---|---|---|
rating | number | yes | Star rating 0-5 |
curl -X POST http://127.0.0.1:9100/api/images/current/rating \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"rating":0}'
Responses
200— Rating set400— Invalid rating
POST /api/images/current/rotate
Rotate
Body
| Field | Type | Required | Description |
|---|---|---|---|
degrees | 90 | 180 | 270 | -90 | yes | Degrees: 90, 180, 270, or -90 |
curl -X POST http://127.0.0.1:9100/api/images/current/rotate \
-H "Authorization: Bearer $CULLING_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"degrees":90}'
Responses
200— Image rotated400— Invalid rotation degrees
POST /api/images/current/tag
Tag
curl -X POST http://127.0.0.1:9100/api/images/current/tag \
-H "Authorization: Bearer $CULLING_API_TOKEN"
Responses
200— Tag toggled
GET /api/label-names
Color label names
curl -X GET http://127.0.0.1:9100/api/label-names \
-H "Authorization: Bearer $CULLING_API_TOKEN"
Responses
200— What each colour label is called: `{red, yellow, green, blue, purple, orange, pink, gray}`
PATCH /api/label-names
Rename color labels
curl -X PATCH http://127.0.0.1:9100/api/label-names \
-H "Authorization: Bearer $CULLING_API_TOKEN"
Responses
200— The names as they are now; the menu bar shows them400— Not a colour label