Galleries
Interfaces for getting gallery lists and images.
Get Gallery List
Get all public galleries.
Interface Information
- Endpoint:
GET /api/galleries - Authentication: Not required (public interface)
Get Gallery Detail
Get detailed information and image list for a specific gallery.
Interface Information
- Endpoint:
GET /api/galleries/:id - Authentication: Not required (public interface)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | number | Yes | Gallery ID |
Response Fields
| Field Name | Type | Description |
|---|---|---|
| id | number | Gallery ID |
| title | string | Gallery name |
| description | string | Description |
| coverImage | string | Cover image URL |
| images | array | Image list |
| images[].id | number | Image ID |
| images[].url | string | Image URL |
| images[].thumbnail | string | Thumbnail URL |
Request Example
bash
curl http://localhost:3000/api/galleries/1Response Example
json
{
"success": true,
"data": {
"id": 1,
"title": "Photography Works",
"description": "My photography portfolio",
"coverImage": "https://example.com/cover.jpg",
"images": [
{
"id": 1,
"url": "https://example.com/image1.jpg",
"thumbnail": "https://example.com/image1-thumb.jpg"
}
]
}
}Error Responses
| HTTP Status Code | Description |
|---|---|
| 404 | Gallery does not exist |
| 500 | Server error |