Mark — API Reference

One picture's stars, flag, colour label, mask, tag and rotation, or the same on many at once.

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

FieldTypeRequiredDescription
enabledbooleanyes
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

FieldTypeRequiredDescription
action"set_rating" | "set_flag" | "set_label" | "toggle_tag" | "move_to_trash" | "queue_upload" | "rotate" | "clear_crop" | "auto_crop" | "set_mask"yesThe batch action: set_rating, set_flag, set_label, toggle_tag, move_to_trash, queue_upload, rotate, clear_crop, auto_crop, set_mask
indicesnumber[]yesIndices of images to act on
valueany
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 applied
  • 400 — Invalid batch action or indices

PUT /api/burst/groups/{id}/state

Burst to do, later or done

ParameterInTypeDescription
idpathnumberBurst group id

Body

FieldTypeRequiredDescription
state"to_do" | "later" | "done"yesThe 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

FieldTypeRequiredDescription
indexnumberThe frame to keep, by index; left out, `keep` says which.
keepstring`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 undo
  • 400 — Not in a burst, or nothing scored to pick

POST /api/images/current/flag

Flag

Body

FieldTypeRequiredDescription
flag"pick" | "reject" | "none"yesThe 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 set
  • 400 — Invalid flag value

POST /api/images/current/label

Color label

Body

FieldTypeRequiredDescription
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 set
  • 400 — Invalid color label

POST /api/images/current/mask

Mask picture

Body

FieldTypeRequiredDescription
maskedbooleanyes
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

FieldTypeRequiredDescription
ratingnumberyesStar 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 set
  • 400 — Invalid rating

POST /api/images/current/rotate

Rotate

Body

FieldTypeRequiredDescription
degrees90 | 180 | 270 | -90yesDegrees: 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 rotated
  • 400 — 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 them
  • 400 — Not a colour label
esc
    ↑↓ navigate↵ open