List works
Code Mode: praxis.media.libraries.works.list
HTTP: GET /media/v1/libraries/{library_id}/works
List the works of a library as summaries, most recently changed first: id, kind, title, series, cover_url, item_count, missing_count and updated_at. Filter with kind and series (for example all platform versions of one story), match the title with q, and continue with next_cursor.
签名
praxis.media.libraries.works.list(args:{path:{library_id:string};query?:{kind?:"gallery"|"article"|"product_listing"|"blocks";series?:string;q?:string;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. |
| kind | query | “gallery” | “article” | “product_listing” | “blocks” | 否 | Only works of this kind: gallery, article, product_listing or blocks. |
| series | query | string | 否 | Only works of this series. |
| q | query | string | 否 | Only works whose title contains this text, at most 100 characters. |
| 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. |