List the asset library
const url = 'https://app.currentpim.se/api/v1/assets?rights=ok&orientation=landscape';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.currentpim.se/api/v1/assets?rights=ok&orientation=landscape' \ --header 'Authorization: Bearer <token>'Pages in id order by cursor, narrowed by the library’s filters (the same ones as the library page and the MCP tool search_assets). A filter that can’t be read, or names an unknown category, collection or supplier, is refused with 422. Needs assets:read and assets.view.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The meta.next_cursor of the previous page; leave out for the first page.
Rows per page: 100 unless given, at most 500.
Words to find. Every word must be in the asset, in any of its code, file names, title, caption, alt text, tags, field values or metadata (values only, not the locale or field codes), or, for words of three characters or more, anywhere in the SKU of a live product the account may see that uses one of the asset’s files (its own value or inherited from a model; a few seconds after that product was saved); at most 8 words count.
Only assets with this tag, ignoring case. Repeat as tag[]=a&tag[]=b for assets that have all of several tags (at most 10).
Only files a live product with exactly this SKU uses (ignoring case), its own value or inherited from a model. Repeat as product[]=A&product[]=B for files any of several products use (at most 100; products is read the same). A SKU no product has, or one the account may not see, finds nothing.
Only files of this kind. Repeat as kind[]=image&kind[]=pdf for files of any of several kinds.
An asset category code, with the categories below it.
Only assets filed in no category (ignored when category is given).
An asset collection code: only assets in it.
A supplier code: only files that came from that supplier.
Only assets in this status: approved files may leave the PIM, draft ones wait for approval, archived ones are no longer used. Repeat as status[]=draft&status[]=archived for any of several.
Only assets in this usage-rights state.
Only assets no live product and no open draft uses, as counted nightly.
Only pictures that have a near duplicate, as found nightly.
Only assets added by the user with this id.
Only assets added on or after this day.
Only assets added on or before this day.
Only assets changed at or after this time (ISO 8601).
Only pictures that lie this way, as they are shown.
Only pictures at least this many pixels wide, as they are shown.
Only pictures at most this many pixels wide.
Only pictures at least this many pixels high.
Only pictures at most this many pixels high.
Only files of at least this many bytes.
Only files of at most this many bytes.
The workspace’s own asset fields of select or yes/no type to narrow by, by field code: fields[setting]=studio, fields[setting][]=studio&fields[setting][]=outdoor (any of them), fields[retouched]=1 (or 0, true, false). Several fields must all match (at most 10, with at most 20 answers each). An unknown field, a field of another type or an answer the field can’t have is refused with 422.
object
Responses
Section titled “Responses”A page of assets.
object
object
Alt text per locale code.
object
Title per locale code.
object
Caption per locale code.
object
The workspace’s asset metadata fields (Settings → Metadata fields) in the product value structure: field code → “” → locale code or “” → value.
object
object
The point cover renditions crop around, in 0–1 from the top left; null is the centre.
object
What the picture said about itself when it arrived (EXIF, IPTC, XMP): camera, lens, exposure, aperture, iso, focal_length, software, orientation, gps, title, caption, keywords, byline, credit, copyright, source, taken_at. Renditions carry none of it.
object
When the picture was taken, from its metadata.
Usage rights: feeds leave out files that are expired or not yet usable.
object
Draft, approved or archived: only approved files leave the PIM.
Whether the file may leave the PIM today: approved, and usable by its usage rights. Feeds, shops and share links leave out the others; product values keep naming them.
Asset category codes.
The code of the supplier the file came from, when known.
SHA-256 of the file.
Every name the file arrived under.
object
media:<id>, what product values and writes use.
Bytes.
Pixels across a picture as it is shown: one its camera turned a quarter (EXIF orientation 5 to 8) is measured turned. Null for other files and for pictures whose size can’t be read.
Pixels down, likewise.
How a picture lies, from its width and height.
Serves the file without a session for as long as it exists.
A 240 px JPEG, images only.
A 1200 px JPEG, images only.
Lasting URLs of the file in every rendition of the workspace (Settings → Renditions), by rendition code: files/{tenant}/{media}/{rendition}/{version}.{ext}, immutable and cacheable for a year; the version changes with the file, its focal point and the rendition’s settings. Empty for files that can’t have renditions (documents without a preview).
object
object
Pass back as cursor for the next page; null on the last page.
object
The URL of the next page, or null.
Example
{ "data": [ { "kind": "image", "rights": { "state": "ok" }, "status": "draft", "source": "library", "file": { "orientation": "landscape" } } ]}No valid token (missing, revoked, expired, or the account is deactivated).
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}The token lacks the ability or the account the permission.
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}An invalid cursor, limit, kind or category.
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}More than the allowed requests a minute for this token; Retry-After says when to try again.
object
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}