Analyze — Referencia de la API

What the app works out: the library and its duplicates, bursts, race numbers, HDR and panorama merges, the models behind them, and what you keep.

La referencia de la API está en inglés: se genera a partir del propio documento OpenAPI de la aplicación.

What the app works out: the library and its duplicates, bursts, race numbers, HDR and panorama merges, the models behind them, and what you keep.

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

POST /api/burst/detection

Burst detection

Body

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

Responses

  • 200 — Enable/disable burst detection

POST /api/burst/reject-unmarked

Reject unmarked in group

curl -X POST http://127.0.0.1:9100/api/burst/reject-unmarked \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Reject unrated, unpicked images in the current burst group

POST /api/detect

Who is in a frame

`auto-crop` picks one subject and crops to it. A caller with its own rules about the people it finds — one crop per runner, a crop of a pair running together, a crop of the whole group — needs the boxes themselves, and this is the only way to them.

The numbers go through the same check as the Identify step (`analysis::bib::identify`): the start lists, the hidden-digit guard, a second read of one plate, and the text printed on the plate.

Detection runs OUT OF PROCESS, as it does everywhere else in this codebase: inside a working app the same frame yields eight boxes, then three, then none (#222).

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

Responses

  • 200 — What is in the frame
  • 400 — No such file, an unknown model, or an unusable start list

POST /api/detect-bibs

Detect bib numbers

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

Responses

  • 200 — Bib-number detection started on the current image
  • 400 — No images loaded
  • 409 — A bib detection is already running
  • 500 — The detection worker could not take it

GET /api/images/current/people-sharpness

Sharpness per person

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

Responses

  • 200 — Each person in the picture on screen and how sharp they are beside the others; null until read

POST /api/library/backup

Back up library

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

Responses

  • 200 — Backed up, with the albums and saved searches, after the database passed its integrity check
  • 400 — The database is damaged (not backed up over the good copies), or the folder could not be written

POST /api/library/backup-copy

Back up

Body

FieldTypeRequiredDescription
deststringyesA 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).
scopeanyyesWhich pictures a backup copies: every picture on one drive only, those of a source, or of a shoot.
curl -X POST http://127.0.0.1:9100/api/library/backup-copy \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"scope":null,"dest":"text"}'

Responses

  • 200 — Copying the pictures on one drive only into `dest`, each checked by its hash, with their sidecars; `dest` is scanned so the copies count. Follow it in `GET /api/library/backup-coverage`
  • 400 — A backup is still being made

GET /api/library/backup-coverage

Backup coverage

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

Responses

  • 200 — Per source, the pictures that exist on its physical drive only — the same picture is the same file, the same image data or the same sensor data, never an export; drives not connected count — and the backup being made. Per shoot it is `unbacked` in `GET /api/library/shoots`

GET /api/library/backups

Library backups

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

Responses

  • 200 — Every backup of the library, newest first, where the next goes, and a damaged library or an overdue backup

GET /api/library/browse

Library panel

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

Responses

  • 200 — What the Library view's panel lists, with how many pictures each holds: the disks and their folders, the days, the keywords, people, places, cameras and lenses

GET /api/library/content

Search by content

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

Responses

  • 200 — The content model, and how far it has read the library (#809). Search with `content` or `similar_to` in POST /api/catalog/search, or the Library view's search

POST /api/library/content/download

Download the content model

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

Responses

  • 200 — The content model is here or on its way (#809); GET /api/library/content says how far

POST /api/library/excludes

Exclude folder

Body

FieldTypeRequiredDescription
relPathstringyesFolder relative to the source root. Leading and trailing `/` are ignored.
sourceIdnumberyes
curl -X POST http://127.0.0.1:9100/api/library/excludes \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sourceId":0,"relPath":"text"}'

Responses

  • 200 — Folder excluded from scans; the folder and what is below it, never a sibling that starts with the same name
  • 400 — Empty, the root, or not a folder below the root: excluding the root is removing the source

POST /api/library/excludes/remove

Include folder again

Body

FieldTypeRequiredDescription
relPathstringyesFolder relative to the source root. Leading and trailing `/` are ignored.
sourceIdnumberyes
curl -X POST http://127.0.0.1:9100/api/library/excludes/remove \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sourceId":0,"relPath":"text"}'

Responses

  • 200 — Exclude removed; the next scan walks the folder again

GET /api/library/files

File in the library

ParameterInTypeDescription
pathquerystringAbsolute path of a file.
curl -X GET http://127.0.0.1:9100/api/library/files \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — The library's row for the file: its marks as the app last wrote or read them, what its header said, whether a scan has read it
  • 404 — The file is not in the library

GET /api/library/files/{id}/preview

File preview

ParameterInTypeDescription
idpathnumberThe file's id in the library
curl -X GET http://127.0.0.1:9100/api/library/files/<id>/preview \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — The library's stored preview of the file, a JPEG at the library's preview size, upright — there whether its disk is connected or not
  • 404 — The library has no preview of it

POST /api/library/merge-metadata

Merge metadata into the kept copy

Body

FieldTypeRequiredDescription
fromIdsnumber[]yesFiles in the same group to take metadata from.
keeperIdnumberyesThe file that stays and receives the metadata.
curl -X POST http://127.0.0.1:9100/api/library/merge-metadata \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keeperId":0,"fromIds":[0]}'

Responses

  • 200 — Rating, labels, keywords, people and IPTC text brought into the kept file and written to its sidecar; when the kept file is open in the app, its grid state has them too
  • 400 — Files not in one group, the kept file is offline, or it is masked in the open folder

GET /api/library/missing

Missing files

ParameterInTypeDescription
sourceIdquerynumberOnly this source; every source without.
curl -X GET http://127.0.0.1:9100/api/library/missing \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Files a scan did not find where they were, with their last path; a file moved elsewhere on a source is followed at the scan, these were not

POST /api/library/missing/forget

Forget missing files

Body

FieldTypeRequiredDescription
idsnumber[]yes
curl -X POST http://127.0.0.1:9100/api/library/missing/forget \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ids":[0]}'

Responses

  • 200 — The missing files among the ids are forgotten; a file that is there is not

GET /api/library/on-devices

Albums and folders on my devices

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

Responses

  • 200 — The albums and folders whose previews go to the site for the photographer's other devices (#864)

PUT /api/library/on-devices

Put on my devices

Body

FieldTypeRequiredDescription
albumstringAn album, by name. Give this or `folder`.
folderany
onbooleanyesOn the devices, or off them (its previews come down from the site).
curl -X PUT http://127.0.0.1:9100/api/library/on-devices \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"on":true}'

Responses

  • 200 — What is on the devices now; the previews go up or come down in the sync's next round
  • 400 — Neither or both of album and folder, or no such album

POST /api/library/relink

Locate missing files

Body

FieldTypeRequiredDescription
folderstringyesA 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).
idnumberyesA missing file.
curl -X POST http://127.0.0.1:9100/api/library/relink \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":0,"folder":"text"}'

Responses

  • 200 — The missing file and its siblings found in the folder, now at their new paths with their ids; albums follow
  • 400 — The file is not missing

POST /api/library/restore

Restore library

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/library/restore \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"text"}'

Responses

  • 200 — The library is the backup again, the albums and saved searches with it; the connected disks are being scanned so what changed since comes back from the pictures
  • 400 — Not a backup, or a damaged one

GET /api/library/results

Duplicates found

ParameterInTypeDescription
relationqueryanyOnly groups containing this relation.
offsetquerynumberGroups to skip (after filtering). Folder matches are never paged.
limitquerynumberGroups to return. Default 200.
curl -X GET http://127.0.0.1:9100/api/library/results \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Folder matches and duplicate groups, largest recoverable first

POST /api/library/results/refresh

Group duplicates again

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

Responses

  • 202 — Regrouping started; listen for library_results_changed

GET /api/library/scan

Scan status

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

Responses

  • 200 — Progress of the current or last scan

POST /api/library/scan

Scan disks

Body

FieldTypeRequiredDescription
sourceIdsnumber[]Sources to scan. Absent or empty scans every connected source.
curl -X POST http://127.0.0.1:9100/api/library/scan \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sourceIds":[0]}'

Responses

  • 202 — Scan started; poll GET /api/library/scan or listen for library_scan_* events
  • 400 — A scan is already running

POST /api/library/scan/cancel

Cancel scan

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

Responses

  • 200 — Cancellation requested; the scan stops at the next file

GET /api/library/settings

Library settings

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

Responses

  • 200 — Library scan preferences

PUT /api/library/settings

Change library settings

Body

FieldTypeRequiredDescription
backupEveryDaysnumberDays between backups; 0 makes none on a schedule.
backupFolderstringWhere backups go (#673); unset, on another disk in the library than the database's when one is connected, else beside the database.
backupsKeptnumberBackups kept in the folder; the oldest go.
perceptualbooleanAlso compare files with no capture identity by how they look. Decodes a preview of every such file, so it is off until asked for.
previewSizenumberThe long edge of the stored previews, in pixels (#662); 0 makes none. A new size remakes them at the next scan.
shootsany
curl -X PUT http://127.0.0.1:9100/api/library/settings \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"backupEveryDays":0,"backupFolder":"text","backupsKept":0}'

Responses

  • 200 — Preferences saved; they apply from the next scan

GET /api/library/sources

Library folders

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

Responses

  • 200 — Registered sources with file counts

POST /api/library/sources

Add library folder

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/library/sources \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"text"}'

Responses

  • 200 — The source, new or already registered
  • 400 — Not a folder, or overlaps a source

DELETE /api/library/sources/{id}

Remove library folder

ParameterInTypeDescription
idpathnumberSource id
curl -X DELETE http://127.0.0.1:9100/api/library/sources/<id> \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Source and everything scanned on it forgotten
  • 400 — A scan is running

POST /api/library/trash

Move copies to trash

Body

FieldTypeRequiredDescription
allowLastOfClusterbooleanAllow trashing every interchangeable copy of an image when only other versions of the capture remain (e.g. the raw, keeping its JPEG export), for every file in `fileIds`.
allowLastOfClusterIdsnumber[]The same allowance for these files only; the others keep the guard.
fileIdsnumber[]yes
curl -X POST http://127.0.0.1:9100/api/library/trash \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fileIds":[0]}'

Responses

  • 200 — What went to the trash and what stayed, with reasons

POST /api/library/trash-folders

Move folder copies to trash

Body

FieldTypeRequiredDescription
dirGroupIdstringyes
foldersobject[]yes
curl -X POST http://127.0.0.1:9100/api/library/trash-folders \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"dirGroupId":"text","folders":[{"relPath":"text","sourceId":0}]}'

Responses

  • 200 — Folders moved to the trash
  • 400 — Every folder of the match was selected, or the match is gone

GET /api/library/volumes

Disks

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

Responses

  • 200 — Mounted volumes not registered as a source

POST /api/merge

Merge to HDR or panorama

Body

FieldTypeRequiredDescription
kind"hdr" | "panorama"yesWhat to make of the frames.
pathsstring[]RAWs in the open folder, in any order (they are taken in the order they were shot). Left out: the selection when it has two or more, else the bracket (HDR) or burst (panorama) of the picture on screen.
projectionany
curl -X POST http://127.0.0.1:9100/api/merge \
  -H "Authorization: Bearer $CULLING_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"kind":"hdr"}'

Responses

  • 200 — The merged picture: a linear DNG beside the first frame, shown in the folder
  • 400 — Fewer than two RAWs, no bracket or burst to take, frames that could not be lined up

GET /api/models

Detection models

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

Responses

  • 200 — The detection models, and which are downloaded

POST /api/models/{model}/download

Download detection model

ParameterInTypeDescription
modelpathstringnano | tiny | small | medium | large | xlarge
curl -X POST http://127.0.0.1:9100/api/models/<model>/download \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Downloading; GET /api/models says when it is there
  • 400 — Not a model
  • 409 — A model is downloading already

POST /api/pick-best-in-bursts

Pick best in bursts

curl -X POST http://127.0.0.1:9100/api/pick-best-in-bursts \
  -H "Authorization: Bearer $CULLING_API_TOKEN"

Responses

  • 200 — Picked the best frame in each burst: what you keep (GET /api/taste, once learned), then the sharpest; the message says in how many of them someone's eyes are closed

POST /api/reject-duplicates

Reject duplicates (keep sharpest)

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

Responses

  • 200 — Rejected near-duplicates, kept the sharpest

GET /api/taste

What you keep

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

Responses

  • 200 — What the app has learned of what you keep, from your picks and stars in earlier folders; Pick Best in Bursts and Reject Duplicates rank by it once there are enough of each

DELETE /api/taste

Forget what you keep

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

Responses

  • 200 — Forgot what was learned; it learns again from the next folders
  • 500 — The record could not be deleted

POST /api/ui/landscape-sharpness

Landscape sharpness

Body

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

Responses

  • 200 — Sharpness reading set

POST /api/ui/people-sharpness

Sharpness per person

Body

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

Responses

  • 200 — People outlined with their sharpness, or not
esc
    ↑↓ navegar↵ abrir