Assets

Download an asset, or read its metadata

Returns the file itself by default, with its stored content type. ?format=json returns the metadata plus the bytes as base64 and the stored SHA-256; ?format=meta returns the metadata only, without reading the file. The key is the path after /assets/ — for example photos/hero.webp or style.css. Do not prefix it with assets/ or /. Keys may not contain .. segments or start with .dotsy/.

get/api/v1/sites/{slug}/assets/{key}

Request

  • Base URL: https://api.dotsy.ai
  • URL: https://api.dotsy.ai/api/v1/sites/{slug}/assets/{key}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

slugstring required
Example:acme-studio

Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.

keystring required

Percent-encode each segment; '/' may be sent raw or as %2F. Keys may contain '/'.

Query parameters

format'json' | 'meta'

json: metadata plus base64 bytes and sha256. meta: metadata only. Omit it to download the file.

Response

The file's bytes (default), or its JSON form when format is json or meta.

OR

Example response

{
  "key": "photos/hero.webp",
  "contentType": "image/webp",
  "originalKey": "photos/hero.jpg"
}

Changes

No recorded changes to this operation across all 1 revision of this API.