Skip to content
中文

List versions

Code Mode: praxis.content.versions.list

HTTP: GET /content/v1/contents/{content_id}/versions

Read the immutable version history of a content, newest version first. Each entry is a snapshot of the settings at the time it was saved, with live telling whether that version is the one a playback plays. Use it to find the version number to pin in publish, or to read the access settings a playback is currently reading (they come from the latest version). page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null.

Signature

praxis.content.versions.list(args:{path:{content_id:string};query?:{page_size?:number;page_token?:string}}):Promise<{/** The versions of this page, highest version first. */ data?:Array<{/** Object type, always content.version. */ type?:"content.version";/** Content this version belongs to. */ content_id?:string;/** Version number, starting at 1 and rising by one on each settings save. */ version?:number;/** The settings exactly as they were saved in this version. */ 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};/** Whether this version is the live one a playback plays. */ live?:boolean;/** RFC 3339 time this version was saved. */ create_time?:string;/** Actor that made this version, either human:<user id> or agent:<api key id>. */ created_by?:string}>;/** Cursor to send as page_token for the next page, or null when this is the last page. */ next_page?:string|null}>;

Parameters

NameInTypeRequiredDescription
content_idpathstringyesContent id (cnt_…) from praxis.content.contents.create or praxis.content.contents.list; a content of another organization answers CONTENT_NOT_FOUND.
page_sizequerynumbernoMaximum versions in one page, from 1 to 100; defaults to 50.
page_tokenquerystringnonext_page from the preceding versions response; omit for the first page.

Responses

StatusContent typesDescription
200application/jsonOne page of versions, newest first, with the cursor for the next page.
400application/jsonINVALID_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.
401application/jsonThe 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.
404application/jsonThe reference does not name a content this organization owns: CONTENT_NOT_FOUND for an unknown, foreign or archived content id, VERSION_NOT_FOUND for a version number that does not exist, SOURCE_NOT_FOUND when the library or asset behind a source is gone. Read the current id from praxis.content.contents.list (or praxis.media for the asset) and retry with that; never construct an id.
502application/jsonUPSTREAM_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.
503application/jsonUPSTREAM_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.