Skip to content
You are reading the unreleased documentation. No version is released yet, and these pages describe code that is not in a release.

Assets (admin API)

Admin routes of the assets module. Every route needs a staff session and the permission named on it; send X-Resolve-Locale: false to receive every locale of a translatable field for editing.

List assets

Parameters:

  • from in query (string, optional).
  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).
  • to in query (string, optional).

Responses:

  • 200: Assets retrieved.

Delete asset (hard delete, refused while referenced)

Parameters:

  • id in path (string, required).

Responses:

  • 204: Deleted.
  • 400: Asset not found.
  • 409: Asset has references.

Get asset with usage counts

Parameters:

  • id in path (string, required).

Responses:

  • 200: Asset retrieved.
  • 400: Asset not found.

Get a short-TTL signed URL for the original (asset-variant-serving)

Parameters:

  • id in path (string, required).

Responses:

  • 200: Signed URL returned (5-minute TTL).
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Asset missing or original deleted.

List entities that reference this asset

Parameters:

  • id in path (string, required).
  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 200, optional).

Responses:

  • 200: References listed.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Upload asset file

Responses:

  • 201: Asset created.
  • 400: Invalid file.
  • 401: Unauthorized.
  • 403: Insufficient permissions.