Skip to content
中文

Rename a reference library or change its description

Code Mode: praxis.studio.codexes.update

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

Change the library itself: its name, its description or its labels. Send update_mask naming exactly the fields you change; a field left out keeps its value. The entries inside are untouched, and a work that has the library attached keeps it attached under the new name.

Signature

praxis.studio.codexes.update(args:{path:{/** e.g. "cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ codex:string};body:{/** Field paths this call changes, such as name, description or labels; a field left out keeps its value. */ update_mask:Array<string>;/** New name of the library, replacing the previous one when name is named in the update mask. e.g. "乌江设定集(修订)" */ name?:string;/** New description of what the library is for; it replaces the previous description rather than appending to it. e.g. "1935 年南京的人物、地点、报纸与物价" */ description?:string;labels?:{[key:string]: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}}>;

Parameters

NameInTypeRequiredDescription
codexpathstringyesReference 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.

Request body

RequiredContent typesDescription
yesapplication/jsonThe library fields to change, with the update mask that names them.

Responses

StatusContent typesDescription
200application/jsonThe updated library as it now reads.
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.