---
title: "List the product photos of a component"
method: GET
path: "/api/admin/components/{id}/gallery"
tags: ["admin-components"]
---

# List the product photos of a component

`GET /api/admin/components/{id}/gallery`

## Request

- Base URL: `https://voltplan.app`
- URL: `https://voltplan.app/api/admin/components/{id}/gallery`
- Auth: HTTP bearer

Returns the stored filenames of the `gallery` file field and their public file URLs. An unknown `id` answers 500.

## Response `200`

Current gallery.

- AdminComponentGallery
  - `success` unknown, required
  - `gallery` string[], required: Stored filenames in display order; the first one is the cover image.
  - `urls` string[], required: Public file URLs `<PocketBase>/api/files/<collectionId>/<id>/<filename>`, same order as `gallery`.

## Other responses

- `403`: Admin access required. Returned for a missing, invalid or expired bearer token as well as for a valid token whose user lacks `is_admin=true`; admin endpoints never answer 401.
- `500`: PocketBase read failed, including an unknown `id`.

---

[API](https://skmtc.dev/voltplan/apis/voltplan-api.md) · [All operations](https://skmtc.dev/voltplan/apis/voltplan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/voltplan/apis/voltplan-api/revisions/575b86a7af92?raw)
