API - Sets & galleries

Sets are how your images are grouped and ordered, and they're what your public galleries are built from. They nest inside each other, so a set can hold both images and other sets.

Reading sets

  • GET /v1/sets gives you the top-level sets. Add ?parent_public_uuid= to get a set's children, in the order that set is arranged in.
  • GET /v1/sets/tree gives you the whole nested structure in one go, ready to draw as a folder tree.
  • GET /v1/sets/{public_uuid} gives you a single set, with its counts and which website it's on.
  • GET /v1/sets/{public_uuid}/images gives you the images in a set, in the order the gallery shows them.

Building and arranging

These are all writes, so each one hands back an Operation to poll and needs an Idempotency-Key.

  • POST /v1/sets creates a set (a name, and optionally a parent_public_uuid, colour, description and type).
  • PATCH /v1/sets/{public_uuid} renames it, recolours it, sets its lead image, or moves it under a new parent.
  • POST and DELETE /v1/sets/{public_uuid}/images add and remove images (image_public_uuids: […]).
  • PATCH /v1/sets/{public_uuid}/order sets the order of the images.
  • PATCH /v1/sets/reorder sets the order of the sets themselves.
POST /v1/sets/{public_uuid}/images
Idempotency-Key: <uuid>

{ "image_public_uuids": ["be66ea4e-…", "c0ffee00-…"] }

colour and type take the same fixed choices as the admin, so an off-palette colour or an unknown type is turned away rather than saved.

Going live, and holding back

When you're ready to publish, PATCH /v1/sets/{public_uuid}/visibility is the tool. It sets whether particular images are hidden, and if you give it an activation_time it will bring embargoed images out at exactly the moment you choose. That's how you prepare a shoot in advance and release it on a deadline.

Every time you rearrange a set we take a snapshot of it first, so you can always go back: GET /v1/sets/{public_uuid}/snapshots lists them and POST /v1/sets/{public_uuid}/restore puts one back.

hidden has to be a real true or false. We won't guess at anything in between, so a stray value can never accidentally publish images you're holding back.

Last updated: