Photos
LIVEAlbum photos with url and thumbnailUrl. Filter by albumId.
Endpoints
- GETPOSTList or create
- GETPATCHDELETERead, update, or delete one/api/photos/:id
- GETFilter by album
- GETSearch title
Query params
| Param | Description | Example |
|---|---|---|
| search | Search photo title | search=desk |
| albumId | Filter by album integer id | albumId=1 |
| sort | createdAt · title · albumId | sort=title |
| page | Page number · default 1 | page=2 |
| limit | Page size · default 12 · max 50 | limit=12 |
| order | asc · desc | order=asc |
| lang | Pass fa for Persian text · omit for English (default) | lang=fa |
| delay | Artificial wait in ms · max 5000 | delay=800 |
| status | Force error HTTP status · 400–599 | status=500 |
Persian text: add lang=fa. See Docs · Language.
Request
1const { data } = await axios.get('/api/photos', { params: { albumId: 1 } });Response
1{2 "data": [3 {4 "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",5 "albumId": 1,6 "title": "Morning desk setup",7 "url": "https://picsum.photos/seed/desk/600/400",8 "thumbnailUrl": "https://picsum.photos/seed/desk/150/150",9 "createdAt": "2026-09-14T10:00:00.000Z",10 "updatedAt": "2026-09-14T10:00:00.000Z"11 }12 ],13 "pagination": {14 "page": 1,15 "limit": 12,16 "total": 24,17 "totalPages": 218 }19}