Analyze — API-referanse
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.
API-referansen er på engelsk: han blir laga frå OpenAPI-dokumentet til appen.
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
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes |
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 frame400— 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 image400— No images loaded409— A bib detection is already running500— 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 check400— 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
| Field | Type | Required | Description |
|---|---|---|---|
dest | string | yes | A 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). |
scope | any | yes | Which 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
| Field | Type | Required | Description |
|---|---|---|---|
relPath | string | yes | Folder relative to the source root. Leading and trailing `/` are ignored. |
sourceId | number | yes |
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 name400— 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
| Field | Type | Required | Description |
|---|---|---|---|
relPath | string | yes | Folder relative to the source root. Leading and trailing `/` are ignored. |
sourceId | number | yes |
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
| Parameter | In | Type | Description |
|---|---|---|---|
path | query | string | Absolute 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 it404— The file is not in the library
GET /api/library/files/{id}/preview
File preview
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | number | The 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 not404— The library has no preview of it
POST /api/library/merge-metadata
Merge metadata into the kept copy
Body
| Field | Type | Required | Description |
|---|---|---|---|
fromIds | number[] | yes | Files in the same group to take metadata from. |
keeperId | number | yes | The 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 too400— Files not in one group, the kept file is offline, or it is masked in the open folder
GET /api/library/missing
Missing files
| Parameter | In | Type | Description |
|---|---|---|---|
sourceId | query | number | Only 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
| Field | Type | Required | Description |
|---|---|---|---|
ids | number[] | 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
| Field | Type | Required | Description |
|---|---|---|---|
album | string | An album, by name. Give this or `folder`. | |
folder | any | ||
on | boolean | yes | On 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 round400— Neither or both of album and folder, or no such album
POST /api/library/relink
Locate missing files
Body
| Field | Type | Required | Description |
|---|---|---|---|
folder | string | yes | A 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). |
id | number | yes | A 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 follow400— The file is not missing
POST /api/library/restore
Restore library
Body
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | A 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 pictures400— Not a backup, or a damaged one
GET /api/library/results
Duplicates found
| Parameter | In | Type | Description |
|---|---|---|---|
relation | query | any | Only groups containing this relation. |
offset | query | number | Groups to skip (after filtering). Folder matches are never paged. |
limit | query | number | Groups 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
| Field | Type | Required | Description |
|---|---|---|---|
sourceIds | number[] | 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_* events400— 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
| Field | Type | Required | Description |
|---|---|---|---|
backupEveryDays | number | Days between backups; 0 makes none on a schedule. | |
backupFolder | string | Where backups go (#673); unset, on another disk in the library than the database's when one is connected, else beside the database. | |
backupsKept | number | Backups kept in the folder; the oldest go. | |
perceptual | boolean | Also compare files with no capture identity by how they look. Decodes a preview of every such file, so it is off until asked for. | |
previewSize | number | The long edge of the stored previews, in pixels (#662); 0 makes none. A new size remakes them at the next scan. | |
shoots | any |
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
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | A 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 registered400— Not a folder, or overlaps a source
DELETE /api/library/sources/{id}
Remove library folder
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | number | Source 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 forgotten400— A scan is running
POST /api/library/trash
Move copies to trash
Body
| Field | Type | Required | Description |
|---|---|---|---|
allowLastOfCluster | boolean | Allow 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`. | |
allowLastOfClusterIds | number[] | The same allowance for these files only; the others keep the guard. | |
fileIds | number[] | 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
| Field | Type | Required | Description |
|---|---|---|---|
dirGroupId | string | yes | |
folders | object[] | 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 trash400— 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
| Field | Type | Required | Description |
|---|---|---|---|
kind | "hdr" | "panorama" | yes | What to make of the frames. |
paths | string[] | 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. | |
projection | any |
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 folder400— 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
| Parameter | In | Type | Description |
|---|---|---|---|
model | path | string | nano | 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 there400— Not a model409— 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 folders500— The record could not be deleted
POST /api/ui/landscape-sharpness
Landscape sharpness
Body
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes |
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
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes |
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