[Tech-Debt] Restify Asset Endpoints #634

Closed
opened 2026-02-04 21:36:04 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @jrasm91 on GitHub (Jan 30, 2023).

We should simplify (and restify) the set of API endpoints related to assets.

All endpoints will return a new header, indicating total item count, which can be used for display totals. A HEAD to the endpoint will return the header without the items.

Search:

  • GET /search/<metadata|smart> - get a list of assets with search/sort filters, including isFavorite, created before/after/on, albumId, etc.

Single:

  • POST /: - create an asset (with file upload)
  • GET /:id - get asset

Multiple:

  • POST /download/archive - download a list of asset by ids (as an archive)
  • POST /check - check a list of asset metadata to determine which ones to upload
  • PUT / -update multiple assets by ids
  • DELETE / -delete multiple assets by ids

Serve:

  • GET /media/thumb?assetId=<id> - get thumbnail
  • GET /media/original?assetId=<id> - get thumbnail
  • GET /media/resize?assetId=<id> - get dynamic/resized version

Remove:

  • GET /download/:id
  • GET /download-library
  • GET /:deviceId
  • GET /count-by-time-bucket
  • GET /count-by-user-id
  • POST /check
  • POST /exist
  • POST /shared-link (move to /shared)
  • PATCH /shared-link (move to /shared)
  • GET /assetById/:assetId (renamed)
  • GET /curated-objects
  • GET /curated-locations
  • GET /search-terms
  • POST /search
Originally created by @jrasm91 on GitHub (Jan 30, 2023). We should simplify (and restify) the set of API endpoints related to assets. All endpoints will return a new header, indicating total item count, which can be used for display totals. A `HEAD` to the endpoint will return the header without the items. Search: - [x] `GET` `/search/<metadata|smart>` - get a list of assets with search/sort filters, including `isFavorite`, created before/after/on, albumId, etc. Single: - [x] `POST` `/`: - create an asset (with file upload) - [x] `GET` `/:id` - get asset Multiple: - [x] `POST` `/download/archive` - download a list of asset by ids (as an archive) - [ ] `POST` `/check` - check a list of asset metadata to determine which ones to upload - [x] `PUT` `/` -update multiple assets by ids - [x] `DELETE` `/` -delete multiple assets by ids Serve: - [ ] `GET` `/media/thumb?assetId=<id>` - get thumbnail - [ ] `GET` `/media/original?assetId=<id>` - get thumbnail - [ ] `GET` `/media/resize?assetId=<id>` - get dynamic/resized version Remove: - [x] `GET` `/download/:id` - [x] `GET` `/download-library` - [ ] `GET` `/:deviceId` - [x] `GET` `/count-by-time-bucket` - [x] `GET` `/count-by-user-id` - [ ] `POST` `/check` - [ ] `POST` `/exist` - [x] `POST` `/shared-link` (move to `/shared`) - [x] `PATCH` `/shared-link` (move to `/shared`) - [x] `GET` `/assetById/:assetId` (renamed) - [x] `GET` `/curated-objects` - [x] `GET` `/curated-locations` - [x] `GET` `/search-terms` - [x] `POST` `/search`
OVERLORD added the 🗄️servertech-debt labels 2026-02-04 21:36:04 +03:00
Author
Owner

@agross commented on GitHub (Mar 11, 2024):

Will there be at some point a new version of immich-sdk to reflect these changes for projects using Immich's API? @alextran1502 Context: https://github.com/agross/immich-duplicates/issues/16#issuecomment-1989279506

@agross commented on GitHub (Mar 11, 2024): Will there be at some point a new version of `immich-sdk` to reflect these changes for projects using Immich's API? @alextran1502 Context: https://github.com/agross/immich-duplicates/issues/16#issuecomment-1989279506
Author
Owner

@jrasm91 commented on GitHub (Jul 2, 2024):

I believe all of the asset endpoints are basically fixed, so closing. (at least CRUD seems to be done)

@jrasm91 commented on GitHub (Jul 2, 2024): I believe all of the asset endpoints are basically fixed, so closing. (at least CRUD seems to be done)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#634