Skip to content
中文

Change what a reference entry says

Code Mode: praxis.studio.codexes.entries.update

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

Change one entry: its type, its name, its aliases, its description, its facts, its notes, its story time, its tracking setting, its picture gallery or its relations. Send update_mask naming exactly the fields you change, because a field the mask leaves out keeps its value while a list field the mask names is replaced whole. Renaming an entry changes what the text has to mention for detection to find it.

Signature

praxis.studio.codexes.entries.update(args:{path:{/** e.g. "cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ codex:string;/** e.g. "乌江日报" */ entry:string};body:{/** Field paths this call changes, such as name, description or facts.成立年份; a field left out keeps its value, and a list field named here is replaced whole. */ update_mask:Array<string>;/** New kind for this entry, which changes how it is shown and how genres treat it. e.g. "source" */ type?:"character"|"location"|"item"|"lore"|"event"|"source"|"fact"|"reference"|"product"|"audience"|"brand"|"persona"|"footage";/** New name for this entry, which also changes what the text has to mention for detection to find it. e.g. "乌江日报社" */ name?:string;/** New group, replacing the previous one when group is named in the update mask; an empty string removes the entry from its group. e.g. "第 3 层 · 势力" */ group?:string;/** Complete set of aliases, replacing the previous ones. */ aliases?:Array<string>;/** Whether matching distinguishes letter case. e.g. false */ case_sensitive?:boolean;/** Complete set of phrases in which this name must not count as a mention. */ exclude_phrases?:Array<string>;/** New text a writer should know, replacing the previous description rather than appending to it. e.g. "1935 年南京的一家民营报纸,主角在此做排字工。" */ description?:string;/** Complete fact ledger for this entry, replacing the previous one, so a fact removed here stops reaching writers. e.g. {"成立年份":"1928"} */ facts?:{[key:string]:string};/** New notes on this entry, replacing the previous ones; they reach the writer's context pack on the line after the description and the facts, and an empty string e.g. "名字取自原型人物的笔名。" */ notes?:string;/** New story time for this entry, replacing the previous one; at most 40 characters, and an empty string removes the time. e.g. "2037–2039" */ time?:string;/** When this entry reaches a context pack. e.g. "always" */ tracking?:"always"|"when_mentioned"|"never";/** Complete relation set for this entry, replacing the previous one; leave it out to keep the relations as they are. */ relations?:Array<{/** Entry this one relates to, by its name in the same library or by its ent_ identifier. e.g. "陈望之" */ entry:string;/** How the relation reads from this entry to that one, such as 工作单位 or 对手. e.g. "社长" */ label:string}>;/** Complete picture gallery for this entry, replacing the previous one and keeping the order you send; a picture left out stops being shown beside the entry. */ images?:Array<string|{/** Identifier of the uploaded file, from the file service; the bytes stay there and the gallery only references them, so attaching the same file to several entries e.g. "file_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ file:string;/** Short name shown under the picture, such as a view or a costume; at most 40 characters after trimming. e.g. "定妆 · 正面" */ name:string;/** What this particular picture shows and why it was chosen, such as the lighting or the angle; at most 200 characters, and an empty string means no description. e.g. "冷光,半身,衣领扣到最上面一颗。" */ description:string}>}}):Promise<{/** Entry identifier, stable across a rename; the name beside it is what the text has to mention. e.g. "ent_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Resource kind marker, always studio.entry for this shape. e.g. "studio.entry" */ object:string;/** Creation time in RFC 3339 UTC. e.g. "2026-11-04T09:33:18Z" */ create_time?:string;/** Time of the last change to this entry in RFC 3339 UTC. e.g. "2026-11-04T10:05:01Z" */ update_time?:string;/** Console address that opens this entry inside its library, which is where its facts and mentions can be read side by side. e.g. "https://console.deepraxis.com/studio/codexes/cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW?entry=%E4%B9%8C%E6%B1%9F%E6%97%A5%E6%8A%A5" */ viewer_url:string;/** Library this entry belongs to; an entry never moves between libraries. e.g. "cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ codex:string;/** What kind of thing this entry is, which decides how it is shown and which genres treat it as a viewpoint or a product rather than as background. */ type:"character"|"location"|"item"|"lore"|"event"|"source"|"fact"|"reference"|"product"|"audience"|"brand"|"persona"|"footage";/** Name as the text mentions it, unique inside this library after normalization; detection matches this and the aliases by word boundary. e.g. "乌江日报" */ name:string;/** Free-text group the person or agent chose for this entry, such as a layer of the setting, a faction or a cast; the Console lists entries under it, and an empty e.g. "第 0 层 · 内核" */ group:string;/** Other spellings or short forms the text may use for this entry, each matched like the name itself. */ aliases:Array<string>;/** Whether matching distinguishes letter case; leave it false for Chinese text and turn it on for names that collide with ordinary words. */ case_sensitive:boolean;/** Phrases in which this name must not count as a mention, such as an idiom that happens to contain it. */ exclude_phrases:Array<string>;/** What a writer should know about this entry; it is the text that reaches the context pack when the entry is included. e.g. "1935 年南京的一家民营报纸,主角在此做排字工。" */ description:string;/** Fact ledger for this entry, such as a birth year, an age or a possession; the keys are the caller's own and the values are compared for consistency across units e.g. {"成立年份":"1928","社长":"陈望之"} */ facts:{[key:string]:string};/** Notes on this entry that reach the writer's context pack, rendered on the line after the description and the facts; an empty string adds no line. e.g. "名字取自原型人物的笔名。" */ notes:string;/** When this entry reaches a context pack: in every unit of a work that attaches the library, only when the text mentions it, or never. */ tracking:"always"|"when_mentioned"|"never";/** Other entries this one relates to, each with the label that reads from this entry to the other, such as a workplace or a rival. */ relations:Array<{/** Entry this one relates to, by its ent_ identifier. e.g. "ent_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ entry:string;/** How the relation reads from this entry to that one, such as 工作单位 or 对手. e.g. "工作单位" */ label:string}>;/** Picture gallery of this entry, in the order the pictures were written; each carries a name and a description, and the gallery is shown beside the entry rather t */ images:Array<{/** Identifier of the uploaded file, from the file service; the bytes stay there and the gallery only references them, so attaching the same file to several entries e.g. "file_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ file:string;/** Short name shown under the picture, such as a view or a costume; at most 40 characters after trimming. e.g. "定妆 · 正面" */ name:string;/** What this particular picture shows and why it was chosen, such as the lighting or the angle; at most 200 characters, and an empty string means no description. e.g. "冷光,半身,衣领扣到最上面一颗。" */ description:string}>;/** When this entry happens in the story, written the way the setting reads it, such as 2037 or 民国二十四年冬; an empty string means no time is recorded, which is also wh e.g. "2037–2039" */ time: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.
entrypathstringyesEntry being addressed, by its name inside this library or by its ent_ identifier; a name containing a slash is passed by identifier instead.

Request body

RequiredContent typesDescription
yesapplication/jsonThe entry fields to change, with the update mask that names them and the optional full set of relations.

Responses

StatusContent typesDescription
200application/jsonThe updated entry as it now reads, including any renamed detection keys.
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 or ENTRY_NOT_FOUND means the library or the entry name inside it names nothing reachable; read the entry list and use a name it returns, or pass the entry identifier.
409application/jsonENTRY_NAME_TAKEN means an entry with that name or an alias of it already exists in this library after normalization; change the existing entry instead of adding a second one.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.