跳转到内容
EN

List works using an asset

Code Mode: praxis.media.libraries.assets.works.list

HTTP: GET /media/v1/libraries/{library_id}/assets/{asset_id}/works

List the works whose body names one asset, as work summaries, most recently changed first. Check it before deleting an asset: the delete is never blocked, and those works would then show the asset as missing.

签名

praxis.media.libraries.assets.works.list(args:{path:{library_id:string;asset_id:string};query?:{limit?:number;cursor?:string}}):Promise<{/** Works in this page, most recently changed first. */ data:Array<{/** Always work. */ object:"work";/** Work id (wrk_…). */ id:string;/** The work’s kind. */ kind:"gallery"|"article"|"product_listing"|"blocks";/** The work’s title. */ title:string;/** The work’s series, or null. */ series:string|null;/** Short-lived URL of the cover picture, or null when it is missing. */ cover_url:string|null;/** How many distinct assets the body orders, cover and product element excluded. */ item_count:number;/** How many referenced assets have been deleted since. */ missing_count:number;/** When the work last changed. */ updated_at:string}>;/** Cursor for the next page, or null when there are no more works. */ next_cursor:string|null}>;

参数

名称位置类型必填说明
library_idpathstring是Library ID returned by creation.
asset_idpathstring是32-character asset ID.
limitquerynumber否Maximum entries in this page, from 1 through 100; defaults to 100.
cursorquerystring否Cursor from the previous next_cursor.

响应

状态码内容类型说明
200application/jsonSuccessful response.
400application/jsonA selector, cursor, limit or other parameter is invalid; correct the reported field before retrying.
402application/jsonRequest failed; see the error code reference.
403application/jsonThis credential has read-only access to the library; use a write-capable binding for mutations.
404application/jsonThe library or asset is missing, deleted or belongs to another tenant; verify its identifier and owner.
409application/jsonRequest failed; see the error code reference.
413application/jsonThe file exceeds an input limit; provide a smaller source file.
415application/jsonThis media format is unsupported; provide a supported format.
422application/jsonRequest failed; see the error code reference.
429application/jsonA rate limit was reached; wait before retrying.
501application/jsonThe requested operation is unsupported; choose a supported method.
502application/jsonRequest failed; see the error code reference.
503application/jsonHistorical projections are still being initialized, or library storage is temporarily unavailable; retry shortly and check failureSummary counts_complete.