跳转到内容
EN

Read one rendition theme

Code Mode: praxis.studio.themes.retrieve

HTTP: GET /studio/v1/themes/{theme}

Read one theme in full: the HTML template and stylesheet it renders with, the header and footer it always carries, the reference document a DOCX rendition uses, or the card proportions a card rendition uses. Read it before creating a rendition with it, because a theme decides what the output looks like and a DOCX theme is a file rather than markup.

签名

praxis.studio.themes.retrieve(args:{path:{/** e.g. "thm_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ theme:string}}):Promise<{/** Theme identifier for an organization's own theme, or the built-in key when builtin is true. e.g. "thm_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Resource kind marker, always studio.theme for this shape. e.g. "studio.theme" */ object:string;/** Creation time in RFC 3339 UTC. e.g. "2026-11-04T09:44:10Z" */ create_time?:string;/** Time of the last change to this theme in RFC 3339 UTC. e.g. "2026-11-04T10:20:33Z" */ update_time?:string;/** Versioned platform key this theme renders for; a theme of another platform cannot produce that platform's rendition. e.g. "wechat_mp@1" */ platform:string;/** Name of the theme, shown where a rendition chooses its layout. e.g. "素雅正文" */ name:string;/** Version of this theme, advanced by each change; a rendition records the version it was built with, so a later edit does not rewrite it. e.g. 3 */ version:number;/** HTML template the rendition is built from, using a small mustache-like subset over the title, the units and the pages; absent for a DOCX or card theme. e.g. "<article><h1>{{title}}</h1>{{#units}}<section>{{{markdown}}}</section>{{/units}}</article>" */ html?:string;/** Stylesheet applied to the HTML and, for a platform that inlines styles, folded into the markup before publishing. e.g. "article{font-size:16px;line-height:1.75;}" */ css?:string;/** Reference document that gives a DOCX rendition its styles, referenced by its file identifier; present instead of the markup for a word-processor platform. e.g. "file_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ reference_docx?:string;/** Fragment placed at the top of every rendition, such as a publication name; it is fixed across the whole output. e.g. "乌江连载" */ header?:string;/** Fragment placed at the bottom of every rendition, such as a follow prompt; it is fixed across the whole output. e.g. "关注「乌江日报」追更" */ footer?:string;card?:{/** Proportions of each card page, which the platform's image requirements decide. e.g. "3:4" */ aspect:"3:4"|"1:1"|"4:5";/** Width the card is rendered at in pixels before any platform-side scaling, chosen above the platform minimum. e.g. 1080 */ width_px:number;/** Font families the card expects; a font that is not available is reported rather than silently substituted. */ fonts:Array<string>};/** Whether this theme ships with the platform instead of being created here; a built-in theme cannot be changed or deleted. e.g. false */ builtin:boolean}>;

参数

名称位置类型必填说明
themepathstring是Theme being addressed: a saved one by its thm_ identifier, or a built-in one by its key; the identifier is what the theme list returns for an organization’s own theme.

响应

状态码内容类型说明
200application/jsonThe theme with its platform, version, markup or reference document, and its fixed fragments.
400application/jsonINVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call.
401application/jsonThe API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header.
404application/jsonTHEME_NOT_FOUND means no theme in this organization has that identifier; read the theme list for the platform and pass one of its identifiers, since a built-in theme cannot be changed or deleted.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.