Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This is a **Go CLI tool** for managing an Immich photo server. It enables bulk o
- Respect required vs. optional parameters as defined in the spec.
- Use the `x-immich-history` field to prefer stable (`"state": "Stable"`) endpoints over beta ones.
- **Never use deprecated endpoints.** An endpoint is deprecated if it has `"deprecated": true` at the operation level OR if `"Deprecated"` appears in its `tags` array. Use the `replacementId` in `x-immich-history` to find the replacement.
- **One documented exception**: `updateAsset` (`PUT /assets/{id}`) is deprecated upstream with a self-referential `replacementId` (i.e. no real replacement exists) — it is the only Immich API that can set an asset's capture date. It is used deliberately and narrowly by `assets update` and `client-workflow fix-album-dates`. Do not use the bulk `updateAssets` variant or extend this exception to any other deprecated endpoint without the same "no alternative exists" verification.
- `updateAsset` / `updateAssets` (`PUT /assets/{id}`, `PUT /assets`) were deprecated in v3.3 but are **not deprecated since v3.4** (history: "Updated", PATCH added; PUT dropped in v5). They are regular endpoints again; `updateAsset` sets capture dates and time zones (`assets update`, `fix-album-dates`, `date-from-ocr`, `tz-set`).
- Authentication: the spec defines three security schemes — `bearer` (Authorization header), `cookie`, and `api_key` (x-api-key header). Prefer `api_key` for CLI usage.
- **When the OpenAPI spec's description, enum, or parameter documentation is unclear, ambiguous, or seemingly incomplete**, cross-check the upstream Immich server source directly (DTOs under `immich-app/immich`'s `server/src/dtos/` on GitHub, e.g. `asset-media.dto.ts` for `AssetMediaSize`) to confirm the actual accepted values, defaults, and behavior before implementing. The spec is generated from these DTOs, so they are the ultimate source of truth when the generated description is terse or missing context (e.g. `x-immich-history` deprecation notes on individual enum values, not just whole operations).
- **When a spec parameter or field is a closed set of possible values (a `schema.enum`, e.g. `AssetMediaSize`, `AssetTypeEnum`, `JobName`), never pass a raw/unchecked user-supplied string straight into the generated type.** Implement an explicit guard (e.g. a small `resolveX`/`validateX` helper, or the generated type's own `Valid()` method where its accepted set matches exactly what this operation allows) that rejects any value outside that closed set, with an error message listing the valid options. Then reflect those exact options in the command's CLI help/`Usage` text (and in `README.md`) — the set the CLI advertises and the set it actually accepts must always match. Do not rely on the upstream API to reject invalid values at request time; some invalid values are only individually deprecated for one specific operation (not invalid across the whole enum — see `AssetMediaSize`'s `original`, valid on `download-original`-style endpoints but deprecated specifically on `GET /assets/{id}/thumbnail`), so a single generated `Valid()` check is not always sufficient — validate against the subset that specific operation actually supports.
Expand Down
56 changes: 43 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
| Albums and sharing | Create, rename, delete, and manage album assets; add users to matching albums in bulk; merge albums; download or mirror an album locally | `albums --help`, `cw add-users-to-album-with-pattern`, `cw merge-album`, `cw download-album` |
| Find and organize | Search by filename, type, camera, location, date, status, OCR, or description; emit pipeable asset IDs; manage tags and tag assignments | `search metadata --help`, `tags --help` |
| Repair and replace | Replace an asset while preserving its Immich metadata; locate missing thumbnails; repair malformed JPEG/TIFF files; remove Google Takeout JSON sidecars | `cw replace-asset`, `cw find-no-thumbhash`, `cw repair-assets` |
| Date and duplicate assistance | Check and correct assets that do not fit date-named albums; set capture years from years printed in scanned photos (OCR); find visually similar library assets for a local image | `cw fix-album-dates`, `cw date-from-ocr`, `cw find-similar` |
| Date and duplicate assistance | Check and correct assets that do not fit date-named albums; set capture years from years printed in scanned photos (OCR); find visually similar library assets for a local image; audit time zones and give assets without one an IANA zone's offset | `cw fix-album-dates`, `cw date-from-ocr`, `cw find-similar`, `cw tz-audit`, `cw tz-set` |
| Watch folders | Watch local folders and upload new files, or download matching assets as they appear | `cw watch-upload`, `cw watch-download` |
| Server workflows and users | List, inspect, and read logs for Immich server-side workflows; look up users and the authenticated account | `immich-workflow --help`, `users --help` |
| Automation | Preview changes with `--dry-run`, bypass prompts with `--yes`, pass IDs through files or stdin, use JSON/IDs-only output, and retrieve agent instructions from the binary | `immich-admin return-agent-skill` |
Expand Down Expand Up @@ -64,10 +64,10 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu

<!-- Generated by tools/apitable — do not edit between the markers. Refresh with `go generate ./...` -->
<!-- API-TABLE:BEGIN -->
**29 of 253 endpoints implemented** (24 deprecated and 2 internal endpoints omitted per project policy).
**30 of 275 endpoints implemented** (10 deprecated and 2 internal endpoints omitted per project policy).

<details>
<summary><b>API keys</b> (0/6)</summary>
<summary><b>API keys</b> (0/7)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
Expand All @@ -76,6 +76,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| | GET | `/api-keys/me` | `getMyApiKey` | Stable |
| | DELETE | `/api-keys/{id}` | `deleteApiKey` | Stable |
| | GET | `/api-keys/{id}` | `getApiKey` | Stable |
| | PUT | `/api-keys/{id}` | `updateApiKey` | Stable |
| | POST | `/api-keys/{id}/rotate` | `rotateApiKey` | – |

</details>
Expand Down Expand Up @@ -126,19 +127,21 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Assets</b> (8/24)</summary>
<summary><b>Assets</b> (9/26)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
| ✅ | DELETE | `/assets` | `deleteAssets` | Stable |
| ✅ | POST | `/assets` | `uploadAsset` | Stable |
| | PUT | `/assets` | `updateAssets` | Stable |
| ✅ | POST | `/assets/bulk-upload-check` | `checkBulkUpload` | Stable |
| ✅ | PUT | `/assets/copy` | `copyAsset` | Stable |
| | POST | `/assets/jobs` | `runAssetJobs` | Stable |
| | DELETE | `/assets/metadata` | `deleteBulkAssetMetadata` | Beta |
| | PUT | `/assets/metadata` | `updateBulkAssetMetadata` | Beta |
| | GET | `/assets/statistics` | `getAssetStatistics` | Stable |
| ✅ | GET | `/assets/{id}` | `getAssetInfo` | Stable |
| ✅ | PUT | `/assets/{id}` | `updateAsset` | Stable |
| | DELETE | `/assets/{id}/edits` | `removeAssetEdits` | Beta |
| | GET | `/assets/{id}/edits` | `getAssetEdits` | Beta |
| | PUT | `/assets/{id}/edits` | `editAsset` | Beta |
Expand Down Expand Up @@ -295,14 +298,15 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Libraries</b> (0/7)</summary>
<summary><b>Libraries</b> (0/8)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
| | GET | `/libraries` | `getAllLibraries` | Stable |
| | POST | `/libraries` | `createLibrary` | Stable |
| | DELETE | `/libraries/{id}` | `deleteLibrary` | Stable |
| | GET | `/libraries/{id}` | `getLibrary` | Stable |
| | PUT | `/libraries/{id}` | `updateLibrary` | Stable |
| | POST | `/libraries/{id}/scan` | `scanLibrary` | Stable |
| | GET | `/libraries/{id}/statistics` | `getLibraryStatistics` | Stable |
| | POST | `/libraries/{id}/validate` | `validate` | Stable |
Expand Down Expand Up @@ -337,7 +341,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Memories</b> (0/7)</summary>
<summary><b>Memories</b> (0/8)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
Expand All @@ -346,6 +350,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| | GET | `/memories/statistics` | `memoriesStatistics` | Stable |
| | DELETE | `/memories/{id}` | `deleteMemory` | Stable |
| | GET | `/memories/{id}` | `getMemory` | Stable |
| | PUT | `/memories/{id}` | `updateMemory` | Stable |
| | DELETE | `/memories/{id}/assets` | `removeMemoryAssets` | Stable |
| | PUT | `/memories/{id}/assets` | `addMemoryAssets` | Stable |

Expand Down Expand Up @@ -389,7 +394,23 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>People</b> (0/13)</summary>
<summary><b>Passkeys</b> (0/8)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
| | GET | `/passkeys` | `searchPasskeys` | Alpha |
| | POST | `/passkeys/authentication/finish` | `finishAuthentication` | Alpha |
| | POST | `/passkeys/authentication/start` | `startAuthentication` | Alpha |
| | POST | `/passkeys/registration/finish` | `finishRegistration` | Alpha |
| | POST | `/passkeys/registration/start` | `startRegistration` | Alpha |
| | DELETE | `/passkeys/{id}` | `deletePasskey` | Alpha |
| | GET | `/passkeys/{id}` | `getPasskey` | Alpha |
| | PATCH | `/passkeys/{id}` | `updatePasskey` | Alpha |

</details>

<details>
<summary><b>People</b> (0/14)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
Expand All @@ -403,6 +424,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| | PUT | `/people/users` | `upsertPeopleUsers` | Beta |
| | DELETE | `/people/{id}` | `deletePerson` | Stable |
| | GET | `/people/{id}` | `getPerson` | Stable |
| | PUT | `/people/{id}` | `updatePerson` | Stable |
| | PUT | `/people/{id}/reassign` | `reassignFaces` | Stable |
| | GET | `/people/{id}/statistics` | `getPersonStatistics` | Stable |
| | GET | `/people/{id}/thumbnail` | `getPersonThumbnail` | Stable |
Expand Down Expand Up @@ -472,14 +494,15 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Sessions</b> (0/5)</summary>
<summary><b>Sessions</b> (0/6)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
| | DELETE | `/sessions` | `deleteAllSessions` | Stable |
| | GET | `/sessions` | `getSessions` | Stable |
| | POST | `/sessions` | `createSession` | Stable |
| | DELETE | `/sessions/{id}` | `deleteSession` | Stable |
| | PUT | `/sessions/{id}` | `updateSession` | Stable |
| | POST | `/sessions/{id}/lock` | `lockSession` | Stable |

</details>
Expand All @@ -502,7 +525,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Stacks</b> (0/6)</summary>
<summary><b>Stacks</b> (0/7)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
Expand All @@ -511,6 +534,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| | POST | `/stacks` | `createStack` | Stable |
| | DELETE | `/stacks/{id}` | `deleteStack` | Stable |
| | GET | `/stacks/{id}` | `getStack` | Stable |
| | PUT | `/stacks/{id}` | `updateStack` | Stable |
| | DELETE | `/stacks/{id}/assets/{assetId}` | `removeAssetFromStack` | Stable |

</details>
Expand Down Expand Up @@ -549,7 +573,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Tags</b> (6/8)</summary>
<summary><b>Tags</b> (6/9)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
Expand All @@ -559,6 +583,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| ✅ | PUT | `/tags/assets` | `bulkTagAssets` | Stable |
| ✅ | DELETE | `/tags/{id}` | `deleteTag` | Stable |
| ✅ | GET | `/tags/{id}` | `getTagById` | Stable |
| | PUT | `/tags/{id}` | `updateTag` | Stable |
| | DELETE | `/tags/{id}/assets` | `untagAssets` | Stable |
| ✅ | PUT | `/tags/{id}/assets` | `tagAssets` | Stable |

Expand All @@ -576,12 +601,13 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Users</b> (3/14)</summary>
<summary><b>Users</b> (3/16)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
| ✅ | GET | `/users` | `searchUsers` | Stable |
| ✅ | GET | `/users/me` | `getMyUser` | Stable |
| | PUT | `/users/me` | `updateMyUser` | Stable |
| | GET | `/users/me/calendar-heatmap` | `getMyCalendarHeatmap` | Stable |
| | DELETE | `/users/me/license` | `deleteUserLicense` | Stable |
| | GET | `/users/me/license` | `getUserLicense` | Stable |
Expand All @@ -590,6 +616,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| | GET | `/users/me/onboarding` | `getUserOnboarding` | Stable |
| | PUT | `/users/me/onboarding` | `setUserOnboarding` | Stable |
| | GET | `/users/me/preferences` | `getMyPreferences` | Stable |
| | PUT | `/users/me/preferences` | `updateMyPreferences` | Stable |
| | DELETE | `/users/profile-image` | `deleteProfileImage` | Stable |
| | POST | `/users/profile-image` | `createProfileImage` | Stable |
| ✅ | GET | `/users/{id}` | `getUser` | Stable |
Expand All @@ -598,16 +625,18 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Users (admin)</b> (0/9)</summary>
<summary><b>Users (admin)</b> (0/11)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
| | GET | `/admin/users` | `searchUsersAdmin` | Stable |
| | POST | `/admin/users` | `createUserAdmin` | Stable |
| | DELETE | `/admin/users/{id}` | `deleteUserAdmin` | Stable |
| | GET | `/admin/users/{id}` | `getUserAdmin` | Stable |
| | PUT | `/admin/users/{id}` | `updateUserAdmin` | Stable |
| | GET | `/admin/users/{id}/calendar-heatmap` | `getUserCalendarHeatmapAdmin` | Stable |
| | GET | `/admin/users/{id}/preferences` | `getUserPreferencesAdmin` | Stable |
| | PUT | `/admin/users/{id}/preferences` | `updateUserPreferencesAdmin` | Stable |
| | POST | `/admin/users/{id}/restore` | `restoreUserAdmin` | Stable |
| | GET | `/admin/users/{id}/sessions` | `getUserSessionsAdmin` | Stable |
| | GET | `/admin/users/{id}/statistics` | `getUserStatisticsAdmin` | Stable |
Expand All @@ -625,7 +654,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Workflows</b> (3/7)</summary>
<summary><b>Workflows</b> (3/8)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
Expand All @@ -634,6 +663,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| | GET | `/workflows/triggers` | `getWorkflowTriggers` | – |
| | DELETE | `/workflows/{id}` | `deleteWorkflow` | – |
| ✅ | GET | `/workflows/{id}` | `getWorkflow` | – |
| | PUT | `/workflows/{id}` | `updateWorkflow` | – |
| ✅ | GET | `/workflows/{id}/logs` | `getWorkflowLogs` | – |
| | GET | `/workflows/{id}/share` | `getWorkflowForShare` | – |

Expand Down
2 changes: 1 addition & 1 deletion api/download.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version = "v3.3.5"
$version = "v3.4.2"
$url = "https://raw.githubusercontent.com/immich-app/immich/refs/tags/$version/open-api/immich-openapi-specs.json"
$outFile = Join-Path -Path $PSScriptRoot -ChildPath "immich-openapi-specs.json"
Invoke-WebRequest -Uri $url -OutFile $outFile
Expand Down
Loading
Loading