List the drafts a work carries
Code Mode: praxis.studio.works.drafts.list
HTTP: GET /studio/v1/works/{work}/drafts
List every draft of one work, each with its genre, its size and whether it is out of date against what it was derived from. Use it to choose the draft a later call works in: the key beside each draft is what the draft path segment takes. This list is not paged, because a work carries a handful of drafts rather than thousands.
签名
praxis.studio.works.drafts.list(args:{path:{/** e.g. "wu-gang" */ work:string}}):Promise<{/** Drafts of the work, each with its genre, size, revision and staleness. */ items:Array<{/** Draft identifier, stable when its in-work key is renamed. e.g. "drf_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Resource kind marker, always studio.draft for this shape. e.g. "studio.draft" */ object:string;/** Creation time in RFC 3339 UTC. e.g. "2026-11-04T09:20:11Z" */ create_time?:string;/** Time of the last change to this draft in RFC 3339 UTC. e.g. "2026-11-04T10:44:52Z" */ update_time?:string;/** Console address of this draft, which opens the work page with the draft already selected. e.g. "https://console.deepraxis.com/studio/wu-gang?draft=novel" */ viewer_url:string;/** Work this draft belongs to; drafts never move between works. e.g. "wk_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ work:string;/** In-work key of this draft, such as novel or xiaohongshu; it is the value the draft path segment takes. e.g. "novel" */ key:string;brief:{/** The requirement exactly as the person gave it, never rewritten by software; it is handed to the writer in the context pack. e.g. "写一部民国背景的长篇,主角是报社排字工。" */ text?:string;/** Files the person attached as source material, referenced by their file identifiers. */ attachments?:Array<string>;/** Requirements split out of the brief, each with a stable key. */ points?:Array<{/** Stable key of the point inside this draft, assigned in order as p1, p2 and so on, so an outline in the same drafts create call can claim p1 and p2; keys are nev e.g. "p1" */ key:string;/** The requirement itself, short enough to be claimed by one unit and specific enough to be checked. e.g. "主角是报社排字工" */ text:string;/** unit (the default) is a requirement that must land in some unit: a plot beat, a selling point, a fact the piece has to state; a unit claims it and the coverage e.g. "unit" */ scope?:"unit"|"work"}>;/** Limits this draft is written under, one per line: a length such as 3000 字以内 or 2000 字左右, banned wording, a deadline. e.g. "全文 3000 字以内,不写血腥场面" */ constraints?:string;/** Brief revision, independent of the draft's own revision; pass it as expected_revision when changing the brief. e.g. 2 */ revision?:number};/** Genre this draft was created with, which decides the kinds, properties, checks and writing rules it obeys. e.g. "novel_long" */ genre:string;/** Genre configuration version this draft was created under, kept so later rule changes stay visible rather than silently applying. e.g. 1 */ genre_version:number;/** How much structure this draft requires: a skeleton draft needs an outline before writing, a space draft only enforces what publishing needs. */ mode:"skeleton"|"space";/** Page title of the draft, such as a platform note with its campaign name; the published title is a property instead. e.g. "乌江 · 长篇小说" */ title:string;/** Draft properties as the genre defines them, such as title, topics or an SEO description; the keys are the genre's own property keys, and a list-valued property e.g. {"title":"乌江","topics":["民国","长篇"]} */ props:{[key:string]:unknown};derived_from?:{/** What the draft was derived from: the goal message of the work, or another draft of the same work. */ kind:"message"|"draft";/** Identifier of the source draft, present only when the kind is draft. e.g. "drf_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ draft?:string;/** Source revision this draft was built on; when the source moves past it, stale becomes true until a rebase confirms the catch-up. e.g. 96 */ revision:number};/** Template that seeded this draft, recorded for reference only; changing the template later does not rewrite the draft. e.g. "tmpl_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ template?:string;/** Style attached to this draft, which overrides the work style for it; null means it inherits the work style. e.g. "sty_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ style?:string;/** Draft structure and property revision; pass it as expected_revision when changing the draft itself or its units in bulk. e.g. 9 */ revision:number;/** Content revision of this draft, moved by any unit or property write; renditions and drafts derived from it compare against it. e.g. 96 */ content_revision:number;/** Keys this draft answered to before it was renamed, kept so an old link or an old reference still resolves. */ previous_keys:Array<string>;/** Whether what this draft derives from moved past the revision recorded here, which a rebase clears after the text is brought up to date. */ stale:boolean;/** Whether the thing this draft derives from is itself out of date; it is a note for the reader and does not make this draft stale. */ upstream_pending:boolean}>}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| work | path | string | 是 | The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | Every draft of the work with its genre, revision, size and staleness. |
| 400 | application/json | INVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call. |
| 401 | application/json | The API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header. |
| 404 | application/json | WORK_NOT_FOUND means no work in this organization matches that slug or identifier; use the value from the work list, or resolve a loose name first. |
| 500 | application/json | INTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed. |