跳转到内容
EN

List the entries of a reference library

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

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

List the entries of one library in pages, each with its type, its name, its aliases and whether it is always present in context. Use it to see what a work already knows before adding an entry, since a duplicate name is refused rather than merged. Continue with next_page_token until the answer stops carrying one.

签名

praxis.studio.codexes.entries.list(args:{path:{/** e.g. "cdx_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ codex:string};query?:{/** e.g. 20 */ page_size?:number;/** e.g. "01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ page_token?:string}}):Promise<{/** Entries on this page, ordered by name. */ items:Array<{/** 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}>;/** Cursor for the next page, empty when this was the last one; pass it back as page_token unchanged. e.g. "" */ next_page_token?: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.
page_sizequerynumber否How many items this page returns, 1 to 100; omitted uses the service default. Treat the answer as one page, not the whole set, and keep following next_page_token while it is present.
page_tokenquerystring否Cursor from the previous answer’s next_page_token; it is opaque, so pass it back unchanged and never build one from an id or an offset.

响应

状态码内容类型说明
200application/jsonOne page of entries with the cursor for the next page.
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.