跳转到内容
EN

Read one reference library

Code Mode: praxis.studio.codexes.retrieve

HTTP: GET /studio/v1/codexes/{codex}

Read one reference library: its name, its description, its labels and how many entries it holds. Read this to confirm a library exists before attaching it to a work; the entries themselves are listed with the entry list call, because a library may hold more of them than fit in one answer.

签名

praxis.studio.codexes.retrieve(args:{path:{/** e.g. "cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ codex:string}}):Promise<{/** Reference library identifier, which is also its only address: a library has no name-based path. e.g. "cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Resource kind marker, always studio.codex for this shape. e.g. "studio.codex" */ object:string;/** Creation time in RFC 3339 UTC. e.g. "2026-11-04T09:31:02Z" */ create_time?:string;/** Time of the last change to the library itself in RFC 3339 UTC; adding an entry moves the entry, not this. e.g. "2026-11-04T10:02:44Z" */ update_time?:string;/** Console address of this library, which opens its entry list; the same address carries an entry parameter when one entry is open. e.g. "https://console.deepraxis.com/studio/codexes/cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ viewer_url:string;/** Name of the library, used by people to pick it when attaching it to a work; it is not unique across the organization. e.g. "乌江设定集" */ name:string;/** What this library is for and which works draw on it, shown beside the name wherever a library is chosen. e.g. "1935 年南京的人物、地点与报纸资料" */ description:string;/** How many entries the library holds right now, which is what tells a caller whether the entry list still needs paging. e.g. 48 */ entry_count:number;/** Work this library belongs to, or null for a library shared across works; every work is created with one library of its own, named after it. e.g. "wk_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ work:string;labels:{[key:string]:string}}>;

参数

名称位置类型必填说明
codexpathstring是Reference library being addressed, given by its cdx_ identifier; a library has no name-based address, so read the library list first when only the name is known.

响应

状态码内容类型说明
200application/jsonThe reference library with its description, labels and entry count.
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/jsonCODEX_NOT_FOUND means no reference library in this organization has that identifier; read the library list and pass one of its identifiers, since a library owned by another organization answers the same way.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.