Skip to content
You are reading the pinned copy of v1.0, which is also the latest release. Read the latest.

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).
  • status in query ("FAILED", "PENDING", "PROCESSING", "READY", optional).
  • to in query (string, optional).
  • type in query ("AUDIO", "DOCUMENT", "IMAGE", "VIDEO", 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).
  • type in query ("category", "product", "return", "review", "section", "variant", 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.
As seen on Open Source Alternatives The Merchant Engine badge