Skip to content

Photos API

Upload and manage photos for screens. All requests need a secret key; see REST API for keys, errors and limits.

List images, newest first

GET /v1/images

Parameters

NameInTypeDescription
cursorquerystring
limitqueryinteger
sortByquery"createdAt"
sortDirquery"asc" | "desc"
statusquery"uploading" | "ready" | "failed"
Terminal window
curl -X GET https://api.loomieo.com/v1/images \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
imagesrequiredlist of object
paginationrequiredobject
Errors
  • 401: auth_unauthenticated
  • 403: forbidden
  • 422: validation_failed
  • 429: rate_limited

Start an image upload

POST /v1/images/uploads

Start an image upload: a one-time Cloudflare Images URL the browser posts the file to

Body

NameTypeDescription
contentTyperequired"image/jpeg" | "image/png" | "image/webp"
sizeBytesrequiredinteger1 to 10485760
titlerequiredstring1 to 200 characters
heightinteger or nullMeasured in the browser.
scopeobjectWho it belongs to: everyone (org), a site or a store (location). Left out: everyone, or for a member scoped to one site or store, that one. A scoped member can only choose inside their scope.
widthinteger or nullMeasured in the browser.
Terminal window
curl -X POST https://api.loomieo.com/v1/images/uploads \
-H "Authorization: Bearer $LUMIEO_KEY" \
-H "Content-Type: application/json" \
-d '{"contentType":"image/jpeg","sizeBytes":1,"title":"…"}'

Response 200

NameTypeDescription
uploadrequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: location_not_found, site_not_found
  • 422: validation_failed
  • 429: rate_limited
  • 502: images_upstream_error
  • 503: images_unavailable

Delete an image no playlist shows

DELETE /v1/images/{id}

Parameters

NameInTypeDescription
idrequiredpathid
Terminal window
curl -X DELETE https://api.loomieo.com/v1/images/:id \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
imagerequiredobject
Errors
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: image_not_found
  • 409: image_in_use
  • 422: validation_failed
  • 429: rate_limited

One image

GET /v1/images/{id}

Parameters

NameInTypeDescription
idrequiredpathid
Terminal window
curl -X GET https://api.loomieo.com/v1/images/:id \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
imagerequiredobject
Errors
  • 401: auth_unauthenticated
  • 403: forbidden
  • 404: image_not_found
  • 422: validation_failed
  • 429: rate_limited

Rename an image or move it to another scope

PATCH /v1/images/{id}

Parameters

NameInTypeDescription
idrequiredpathid

Body

NameTypeDescription
scopeobjectMove it to everyone, a site or a store. A scoped member can move it only within their scope.
titlestring1 to 200 characters
Terminal window
curl -X PATCH https://api.loomieo.com/v1/images/:id \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
imagerequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: image_not_found, location_not_found, site_not_found
  • 422: validation_failed
  • 429: rate_limited

The browser finished uploading

POST /v1/images/{id}/complete

The browser finished uploading: ready once Cloudflare has the file, failed if it never arrived

Parameters

NameInTypeDescription
idrequiredpathid
Terminal window
curl -X POST https://api.loomieo.com/v1/images/:id/complete \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
imagerequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: image_not_found
  • 422: validation_failed
  • 429: rate_limited
  • 502: images_upstream_error
  • 503: images_unavailable