跳转到内容
EN

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_idpathstring是Library ID returned by creation.
kindquery“gallery” | “article” | “product_listing” | “blocks”否Only works of this kind: gallery, article, product_listing or blocks.
seriesquerystring否Only works of this series.
qquerystring否Only works whose title contains this text, at most 100 characters.
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.