Select & Filter — API Reference

Choose pictures by hand or by criteria, filter and sort the list, and keep albums and saved searches in the library.

Choose pictures by hand or by criteria, filter and sort the list, and keep albums and saved searches in the library.

47 operations. Generated from the application's own OpenAPI document.

GET /api/catalog/collections

Smart collections

curl -X GET http://127.0.0.1:9100/api/catalog/collections \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Saved smart collections

POST /api/catalog/collections

Save smart collection

curl -X POST http://127.0.0.1:9100/api/catalog/collections \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Smart collection saved

DELETE /api/catalog/collections/{name}

Delete smart collection

ParameterInTypeDescription
namepathstringCollection name
curl -X DELETE http://127.0.0.1:9100/api/catalog/collections/<name> \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Deleted
  • 404 — Not found

POST /api/catalog/collections/{name}/run

Smart collection

ParameterInTypeDescription
namepathstringCollection name
curl -X POST http://127.0.0.1:9100/api/catalog/collections/<name>/run \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Collection results
  • 404 — Not found

GET /api/catalog/manual-collections

Albums

curl -X GET http://127.0.0.1:9100/api/catalog/manual-collections \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Saved manual collections

POST /api/catalog/manual-collections

Save album

Body

FieldTypeRequiredDescription
itemsobject[]
lightroomstringThe Lightroom collection it was made from (`<catalog>/<id>`), so importing the catalog again updates it (#671).
namestringyes
publishany
curl -X POST http://127.0.0.1:9100/api/catalog/manual-collections \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"text"}'

Responses

  • 200 — Manual collection saved

DELETE /api/catalog/manual-collections/{name}

Delete album

ParameterInTypeDescription
namepathstringCollection name
curl -X DELETE http://127.0.0.1:9100/api/catalog/manual-collections/<name> \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Deleted
  • 404 — Not found

POST /api/catalog/manual-collections/{name}/run

Album

ParameterInTypeDescription
namepathstringCollection name
curl -X POST http://127.0.0.1:9100/api/catalog/manual-collections/<name>/run \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Collection members
  • 404 — Not found

POST /api/catalog/search

Search the catalog

curl -X POST http://127.0.0.1:9100/api/catalog/search \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Cross-folder catalog search results

POST /api/filter

Filter

Body

FieldTypeRequiredDescription
aperturestringAperture, as the equipment list names it; `""` takes it off.
burst_statestringOnly the frames of bursts in this state (#808): `to_do`, `later`, `done`; `""` takes it off.
camerastringCamera model, as the filter bar's equipment list names it; `""` takes the camera filter off.
color"red" | "yellow" | "green" | "blue" | "purple" | "orange" | "pink" | "gray" | "none"The color label, or none: red, yellow, green, blue, purple, orange, pink, gray, none
exposure_flaggedbooleanOnly pictures with an exposure problem (blown highlights or crushed shadows).
eyes_closedbooleanOnly pictures where someone's eyes are closed (#131; faces are read on macOS).
file_type"all" | "raw" | "jpeg" | "other" | "video"The file type: all, raw, jpeg, other, video
flag"all" | "pick" | "reject" | "unflagged"The flag filter: all, pick, reject, unflagged
focal_lengthstringFocal length, as the equipment list names it (`"600 mm"`); `""` takes it off.
hide_offlinebooleanLeave out pictures on disks that are not connected (#260).
in_target_albumstringOnly the pictures in the target album (`in`) or not in it (`out`), as ⇧B fills it (#927); `""` takes it off.
isostringISO, as the equipment list names it (`"100"`); `""` takes it off.
lensstringLens, as the equipment list names it; `""` takes it off.
map_areanumber[]Only pictures inside this part of the map, `[south, west, north, east]` in degrees; `[]` takes it off (#668).
min_ratingnumberStar rating (0-5)
min_sharpnessnumberOnly pictures at least this sharp: the score the sidebar shows, measured where the camera focused (under 1000 very soft, 2000 soft, 3000 normal, 5000 sharp, above that very sharp). `0` takes it off.
near_matchbooleanOnly pictures with a near-match in the folder.
needs_reviewbooleanOnly pictures with a read Identify held for a person (#491).
rating_mode"at_least" | "exactly" | "at_most"The rating mode: at_least, exactly, at_most
searchstringWords to find in the pictures' metadata, as the filter bar's search; `""` takes it off.
sent"all" | "sent" | "not_sent"The sent filter: all, sent, not_sent
taggedany
curl -X POST http://127.0.0.1:9100/api/filter \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"aperture":"text","burst_state":"text","camera":"text"}'

Responses

  • 200 — Filter applied
  • 400 — Invalid filter criteria

DELETE /api/filter

Clear filter

curl -X DELETE http://127.0.0.1:9100/api/filter \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Every filter taken off, as the filter bar's clear button does

GET /api/images/current/bracket

Bracket of this picture

curl -X GET http://127.0.0.1:9100/api/images/current/bracket \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — The exposure bracket the picture on screen is in: its burst, when the exposures span 0.6 EV or more
  • 404 — It is in none

POST /api/library/collection-sets

New collection set

Body

FieldTypeRequiredDescription
namestringyes
parentIdnumber
curl -X POST http://127.0.0.1:9100/api/library/collection-sets \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"text"}'

Responses

  • 200 — A set, at the top or in another
  • 400 — No name

PATCH /api/library/collection-sets/{id}

Change collection set

ParameterInTypeDescription
idpathnumberThe set's id

Body

FieldTypeRequiredDescription
namestring
parentIdnumber
curl -X PATCH http://127.0.0.1:9100/api/library/collection-sets/<id> \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","parentId":0}'

Responses

  • 200 — Renamed, or moved into another set or to the top
  • 400 — No such set, or into itself

DELETE /api/library/collection-sets/{id}

Delete collection set

ParameterInTypeDescription
idpathnumberThe set's id
curl -X DELETE http://127.0.0.1:9100/api/library/collection-sets/<id> \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Deleted; what was in it is in its parent now
  • 400 — No such set

GET /api/library/collections

Collections

curl -X GET http://127.0.0.1:9100/api/library/collections \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Every album and saved search with how many pictures each holds, the sets they are in, and the target album

POST /api/library/collections

New collection

Body

FieldTypeRequiredDescription
filterany
kind"hdr" | "panorama"yesWhat to make of the frames.
namestringyes
set_idnumberThe set to put it in.
curl -X POST http://127.0.0.1:9100/api/library/collections \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"kind":"hdr","name":"text"}'

Responses

  • 200 — Made: an empty album, or a saved search
  • 400 — No name, or the name is taken

PATCH /api/library/collections/{id}

Change collection

ParameterInTypeDescription
idpathnumberThe collection's id

Body

FieldTypeRequiredDescription
filterany
namestring
setIdnumber
curl -X PATCH http://127.0.0.1:9100/api/library/collections/<id> \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"filter":null,"name":"text","setId":0}'

Responses

  • 200 — Renamed, moved to a set, or a saved search's criteria changed
  • 400 — No such collection, or the name is taken

DELETE /api/library/collections/{id}

Delete collection

ParameterInTypeDescription
idpathnumberThe collection's id
curl -X DELETE http://127.0.0.1:9100/api/library/collections/<id> \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Deleted; its pictures are where they were. A published album's pictures stay on their event
  • 400 — No such collection

POST /api/library/collections/{id}/duplicate

Duplicate collection

ParameterInTypeDescription
idpathnumberThe collection's id
curl -X POST http://127.0.0.1:9100/api/library/collections/<id>/duplicate \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — A copy beside it, named "… copy"
  • 400 — No such collection

POST /api/library/collections/{id}/items

Album pictures

ParameterInTypeDescription
idpathnumberThe album's id

Body

FieldTypeRequiredDescription
addstring[]
removestring[]
replacebooleanA picture whose shot the album holds in another file (the raw of a DxO DNG in it) takes that file's place, and goes out over it where the album is published. Without it the picture is left out (#929).
selectedboolean
curl -X POST http://127.0.0.1:9100/api/library/collections/<id>/items \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"add":["text"],"remove":["text"],"replace":true}'

Responses

  • 200 — The pictures are in the album, or out of it
  • 400 — No such album, or it is a saved search

GET /api/library/collections/{id}/pictures

Collection pictures

ParameterInTypeDescription
idpathnumberThe collection's id
curl -X GET http://127.0.0.1:9100/api/library/collections/<id>/pictures \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — What the collection holds: an album's pictures in its order, or what a saved search finds now
  • 400 — No such collection

PUT /api/library/collections/target

Target album

Body

FieldTypeRequiredDescription
namestringThe album's name; `null` for none (⇧B then makes the Quick Collection).
curl -X PUT http://127.0.0.1:9100/api/library/collections/target \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"text"}'

Responses

  • 200 — The album Add to Target Album fills
  • 400 — No album by that name

POST /api/library/collections/target/toggle

Add to target album

curl -X POST http://127.0.0.1:9100/api/library/collections/target/toggle \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — The selected pictures, or the one on screen, are in the target album — or out of it, when every one was in it
  • 400 — No picture

GET /api/library/filter

Filter columns

curl -X GET http://127.0.0.1:9100/api/library/filter \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — What is searched and picked in the filter's columns, every column's values with their counts, and how many pictures are shown

PUT /api/library/filter

Pick in filter columns

Body

FieldTypeRequiredDescription
columnsobject
textstring
curl -X PUT http://127.0.0.1:9100/api/library/filter \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"columns":{},"text":"text"}'

Responses

  • 200 — The window shows what the search and the picks leave; the counts are for them
  • 400 — What the window works on could not be read

POST /api/library/filter/save

Save filter as smart collection

Body

FieldTypeRequiredDescription
namestringyesThe smart collection's name.
curl -X POST http://127.0.0.1:9100/api/library/filter/save \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"text"}'

Responses

  • 200 — What the window works on, the search and the picks, kept as a smart collection
  • 400 — Nothing is open, or the name is empty or taken

GET /api/library/shoots

Shoots

curl -X GET http://127.0.0.1:9100/api/library/shoots \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Every shoot, newest first — name, dates, place, cover, count, camera bodies — and the rules they were found by

POST /api/library/shoots/edit

Change a shoot

curl -X POST http://127.0.0.1:9100/api/library/shoots/edit \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Renamed, made one with the shoot before, split at a picture, given a cover, or marked done (off the to-do lists); the shoots found again with it. A change survives every later scan
  • 500 — No shoot at that time, or the library cannot be written

PUT /api/library/shoots/rules

Shoot rules

Body

FieldTypeRequiredDescription
distanceKmnumberyesKilometres between two pictures with a position that start a new shoot; 0 for none.
gapHoursnumberyesHours between two pictures that start a new shoot.
curl -X PUT http://127.0.0.1:9100/api/library/shoots/rules \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"gapHours":0,"distanceKm":0}'

Responses

  • 200 — The hours between pictures and the kilometres between positions that start a new shoot, kept with the library; the shoots found again with them

GET /api/library/todo

To do

curl -X GET http://127.0.0.1:9100/api/library/todo \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — What is left across the shoots not marked done: shoots not culled, picks not developed and edited pictures not delivered — shoots and pictures of each. Open a list with `POST /api/library/view` and the pick `{"kind": "todo", "list": "not_culled"}`

GET /api/library/view

Library view

curl -X GET http://127.0.0.1:9100/api/library/view \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — What the Library view has picked, searched and sorted, and what it opened

POST /api/library/view

Pick in the Library view

Body

FieldTypeRequiredDescription
pickany
searchstring
search_by"both" | "words" | "content"The search by: both, words, content
sort"capture_time" | "name" | "rating" | "added" | "edited" | "own" | "relevance"The library sort: capture_time, name, rating, added, edited, own, relevance
curl -X POST http://127.0.0.1:9100/api/library/view \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"pick":null,"search":"text","search_by":"both"}'

Responses

  • 200 — The Library view is shown with this picked, searched and sorted, and its pictures are what the window works on
  • 400 — Nothing to show for it: no such album, or no pictures

GET /api/selection

Selection

curl -X GET http://127.0.0.1:9100/api/selection \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Current selection

POST /api/selection/add

Add to selection

Body

FieldTypeRequiredDescription
indicesnumber[]yes
curl -X POST http://127.0.0.1:9100/api/selection/add \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"indices":[0]}'

Responses

  • 200 — Indices added to selection

POST /api/selection/all

Select all

curl -X POST http://127.0.0.1:9100/api/selection/all \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — All visible images selected

POST /api/selection/by-criteria

Select by criteria

Body

FieldTypeRequiredDescription
camerastring
color"red" | "yellow" | "green" | "blue" | "purple" | "orange" | "pink" | "gray" | "none"The color label, or none: red, yellow, green, blue, purple, orange, pink, gray, none
date_fromstring
date_tostring
file_type"all" | "raw" | "jpeg" | "other" | "video"The file type: all, raw, jpeg, other, video
flag"all" | "pick" | "reject" | "unflagged"The flag filter: all, pick, reject, unflagged
gps"any" | "has_gps" | "no_gps"The gps filter: any, has_gps, no_gps
lensstring
max_ratingnumber0-5
min_ratingnumber0-5
orientation"any" | "landscape" | "portrait"The orientation: any, landscape, portrait
curl -X POST http://127.0.0.1:9100/api/selection/by-criteria \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"camera":"text","color":"red","date_from":"text"}'

Responses

  • 200 — Images matching criteria selected
  • 400 — Invalid criteria

POST /api/selection/invert

Invert selection

curl -X POST http://127.0.0.1:9100/api/selection/invert \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Selection inverted

POST /api/selection/load

Load selection

Body

FieldTypeRequiredDescription
pathstringyesA path. In an instance started with `--dir` it is in the instance's root: `/` is the root, and a path that leads out of it is refused (403).
curl -X POST http://127.0.0.1:9100/api/selection/load \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"text"}'

Responses

  • 200 — Selection loaded from file
  • 400 — Failed to load selection

POST /api/selection/none

Select none

curl -X POST http://127.0.0.1:9100/api/selection/none \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Selection cleared

POST /api/selection/remove

Remove from selection

Body

FieldTypeRequiredDescription
indicesnumber[]yes
curl -X POST http://127.0.0.1:9100/api/selection/remove \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"indices":[0]}'

Responses

  • 200 — Indices removed from selection

POST /api/selection/save

Save selection

Body

FieldTypeRequiredDescription
pathstringyesA path. In an instance started with `--dir` it is in the instance's root: `/` is the root, and a path that leads out of it is refused (403).
curl -X POST http://127.0.0.1:9100/api/selection/save \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"text"}'

Responses

  • 200 — Selection saved to file
  • 400 — Failed to save selection

POST /api/selection/set

Select pictures

Body

FieldTypeRequiredDescription
indicesnumber[]yes
curl -X POST http://127.0.0.1:9100/api/selection/set \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"indices":[0]}'

Responses

  • 200 — Selection set to specified indices

POST /api/selection/tagged

Select tagged

curl -X POST http://127.0.0.1:9100/api/selection/tagged \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Tagged images selected

POST /api/selection/untagged

Select untagged

curl -X POST http://127.0.0.1:9100/api/selection/untagged \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Untagged images selected

POST /api/sort

Sort

Body

FieldTypeRequiredDescription
direction"ascending" | "descending"The sort direction: ascending, descending. Default ascending.
order"filename" | "capture_date" | "rating" | "file_type" | "sharpness" | "own"yesThe sort order: filename, capture_date, rating, file_type, sharpness, own
curl -X POST http://127.0.0.1:9100/api/sort \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"order":"filename"}'

Responses

  • 200 — Sort order applied
  • 400 — Invalid sort criteria

POST /api/ui/filter-columns

Filter columns

Body

FieldTypeRequiredDescription
enabledbooleanyes
curl -X POST http://127.0.0.1:9100/api/ui/filter-columns \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true}'

Responses

  • 200 — Filter columns shown or hidden
esc
    ↑↓ navigate↵ open