List contents
Code Mode: praxis.content.contents.list
HTTP: GET /content/v1/contents
Discover the video contents of the API key’s organization and obtain the content_id each later call takes. Archived contents stay out of the list unless status is archived; results are ordered by update_time, newest first. Filter with status (draft, published, unpublished or archived), kind (video), asset_id (the Media asset a content was made from) and q (a substring of the title). page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null, keeping the same filters.
签名
praxis.content.contents.list(args?:{query?:{page_size?:number;page_token?:string;status?:"draft"|"published"|"unpublished"|"archived";kind?:"video";asset_id?:string;q?:string}}):Promise<{/** The contents of this page, newest update first. */ data?:Array<{/** Object type, always content. */ type?:"content";/** Content id (cnt_…) that every read, write and playback call on this content takes. */ id?:string;/** Content kind; video is the only kind today. */ kind?:"video";/** Merchant-facing title, set on create or update and shown by the Kit player when show_title is true. */ title?:string;/** Publication state: draft before the first publish, published while a version is live, unpublished after an unpublish, archived after an archive and final in tha */ status?:"draft"|"published"|"unpublished"|"archived";/** Version number a playback plays, or null when nothing is live (draft or unpublished). */ live_version?:number|null;/** Highest version number, made by each settings save; publish with no version pins this one. */ latest_version?:number;/** Whether Media has every wanted rendition of the pinned asset version: processing while transcoding starts or is running, ready when a publish can go live, faile */ readiness?:"processing"|"ready"|"failed";/** The settings of the latest version, as this read returns them. */ settings?:{/** The asset this content publishes and how it follows it. */ source?:{/** Media library id (lib_…) holding the asset, from praxis.media. */ library_id?:string;/** Media asset id (ast_…) to publish, from praxis.media. */ asset_id?:string;/** Version of that asset this content pins; defaults to 1 and is used unless follow_new_versions is true. */ asset_version?:number;/** Whether a playback follows the asset newest version instead of pinning asset_version; false by default. */ follow_new_versions?:boolean;/** Output heights wanted from Media, one of 480, 720 or 1080 each and no repeat; defaults to 480, 720 and 1080, and a change asks Media to transcode what is missin */ renditions?:Array<480|720|1080>};/** How a playback is authorized; a playback reads this group from the latest version, so a change takes effect at once. */ access?:{/** Lifetime of each playback capability in seconds, from 100 to 3000; defaults to 600 and a capability never outlives the 3000 second ceiling. */ capability_seconds?:number;/** Whether the delivered renditions are encrypted; false by default. */ encryption?:boolean;/** Page origins allowed to open a playback, for example https://school.example.com, at most 20 entries; each must be a canonical https origin (http://localhost is */ allowed_origins?:Array<string>};/** How the Kit renders the player; a playback reads this group from the live version. */ player?:{/** Poster image URL shown before playback starts; null by default. */ poster?:string|null;/** Whether the player shows the content title; true by default, and when false the playback title is null. */ show_title?:boolean;/** Player accent colour as */ accent_color?:string|null;/** Quality the player starts with; auto by default, or one output height that this content actually has, one of 480, 720 or 1080. e.g. "auto" */ default_quality?:"auto"|480|720|1080;/** Playback speeds the player offers, each between 0.25 and 4 and the list must contain 1; defaults to 0.75, 1, 1.25, 1.5 and 2. */ speeds?:Array<number>;/** Whether the player shows storyboard previews while scrubbing; true by default. */ storyboard?:boolean;/** Whether the player starts playing without a click; false by default. */ autoplay?:boolean;/** Whether the player resumes at the position the end user left; true by default. */ remember_position?:boolean};/** Free text about the content, at most 2000 characters; empty by default. */ description?:string};/** RFC 3339 time the content was created. */ create_time?:string;/** RFC 3339 time of the last change; list results are ordered by it, newest first. */ update_time?:string;/** RFC 3339 time of the first publish, or null for a content never published. */ publish_time?:string|null;/** RFC 3339 time the content was archived, or null while it is not archived. */ archive_time?:string|null}>;/** Cursor to send as page_token for the next page, or null when this is the last page. */ next_page?:string|null}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | query | number | 否 | Maximum contents in one page, from 1 to 100; defaults to 50. |
| page_token | query | string | 否 | next_page from the preceding list response with the same filters; omit for the first page. |
| status | query | “draft” | “published” | “unpublished” | “archived” | 否 | Only contents in this publication state; draft, published, unpublished or archived. Omit to see every state but archived. |
| kind | query | “video” | 否 | Only contents of this kind; video is the only kind today. |
| asset_id | query | string | 否 | Only contents made from this Media asset id, from praxis.media; omit for every asset. |
| q | query | string | 否 | Substring of the content title to match, for example lesson; omit for every title. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | One page of contents, newest update first, with the cursor for the next page. |
| 400 | application/json | INVALID_PARAMS: the request is not shaped the way this face accepts — an unknown or misspelled field, a repeated query parameter, a value outside its allowed range (for example capability_seconds outside 100 to 3000 or a rendition other than 480, 720 or 1080), or a body that is not a JSON object. The error names the field at fault and what it accepts; correct that field and send the request again. |
| 401 | application/json | The credential is missing, malformed or expired. Merchant routes answer UNAUTHENTICATED when the API key or session names no organization; the playback door answers ACCESS_TOKEN_EXPIRED when the end-user token cannot be verified and SIGN_IN_EXPIRED or SIGN_IN_REVOKED when the sign-in behind it is over. Send a valid API key, or sign the end user in again for a fresh access token, then retry. |
| 502 | application/json | UPSTREAM_UNAVAILABLE: a dependency refused the call — Media (the transcoder or the manifest issuer) or, for a playback, the end-user token verifier. Nothing was written; retry later, and if it persists report the time and the request path. |
| 503 | application/json | UPSTREAM_UNAVAILABLE: this face is not usable in this environment — the CONTENT service binding is unwired, or the anonymous rate limiter is unavailable or misconfigured so the door fails closed. Use an environment where the face is wired, or retry when the dependency is back. |