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_id | path | string | 是 | Library ID returned by creation. |
| asset_id | path | string | 是 | 32-character asset ID. |
| limit | query | number | 否 | Maximum entries in this page, from 1 through 100; defaults to 100. |
| cursor | query | string | 否 | Cursor from the previous next_cursor. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | Successful response. |
| 400 | application/json | A selector, cursor, limit or other parameter is invalid; correct the reported field before retrying. |
| 402 | application/json | Request failed; see the error code reference. |
| 403 | application/json | This credential has read-only access to the library; use a write-capable binding for mutations. |
| 404 | application/json | The library or asset is missing, deleted or belongs to another tenant; verify its identifier and owner. |
| 409 | application/json | Request failed; see the error code reference. |
| 413 | application/json | The file exceeds an input limit; provide a smaller source file. |
| 415 | application/json | This media format is unsupported; provide a supported format. |
| 422 | application/json | Request failed; see the error code reference. |
| 429 | application/json | A rate limit was reached; wait before retrying. |
| 501 | application/json | The requested operation is unsupported; choose a supported method. |
| 502 | application/json | Request failed; see the error code reference. |
| 503 | application/json | Historical projections are still being initialized, or library storage is temporarily unavailable; retry shortly and check failureSummary counts_complete. |