读取工序步骤简报
GET /canvas/v1/canvases/{canvas_id}/processes/{process_id}/steps/{step_id}/brief
Read everything needed to fill one step of a canvas process, in one call, before writing its output. A process is a frame whose steps are requirement blocks; this read returns the step’s requirement and derived state (waiting, ready or filled), its linked materials resolved to content, the process’s shared context, the outputs of the steps it needs, and its own current outputs. Supply process_id from canvases.state or nodes.list (the process frame, or the instance of a library process that is this production) and the step key from a requirement. To fill the step, create the output element and write metadata.output through canvases.execute; this read stores nothing. A platform object linked as an embed node comes back as its reference only; read it from its own domain. Links that point at deleted nodes are dropped from the lists and named in issues.
支持状态: supported
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| canvas_id | path | string | true | Canvas id returned by create or list, in the form cvs_ followed by 16 lowercase letters or digits; a display name is not accepted. |
| version | query | string | false | Decimal version from versions.list, or its earliest_restorable_version, for a read-only historical snapshot; omit to read current state. Unavailable versions return VERSION_NOT_FOUND. |
| process_id | path | string | true | Node id of the process frame, or of the ref instance that is one production of a library process; the outputs of a production point at this id. |
| step_id | path | string | true | Step key from the requirement block, such as 1 or 9a; not the node id of the step frame. |
响应
HTTP 200
The step brief at the requested canvas version.
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| version | string | Current revision as a decimal string, incremented by one after each successful write; pass it as expected_version to guard a subsequent execute call. |
| process | object | The process this step belongs to. |
| process.id | string | Node id of the process frame or instance. |
| process.name | string | Process name from its metadata. |
| step | object | The step and what is asked of it. |
| step.step | string | Step key within the process. |
| step.node_id | string | Node id of the step frame; inside an instance it is a path such as inst/frame. |
| step.title | string | Step title shown on the block. |
| step.state | string | Derived from the document; filled means at least one output points at the step (an each step with expected needs that many), ready means unfilled with every needed step filled, waiting means otherwise; the state never blocks a write. |
| step.expected | integer | For an each step, how many outputs the filler decided on; omitted when none was set. |
| step.requirement | object | The requirement as stored in metadata.requirement; output says what to produce, rules are instructions where a skill:name entry names a skill to follow, and needs, back and each carry when and by text for you to read, never evaluated. |
| materials | array<object> | This production's linked materials for the step, resolved; dangling links are dropped. |
| materials[].kind | string | What the element is; text carries content, image carries file_id, embed carries ref, other carries type, and html carries only its name because its source is large. |
| materials[].node_id | string | Node id of the element on this canvas; use it with nodes.list to read the full node. |
| materials[].name | string | The node's name, when it has one. |
| materials[].content | string | Text of a text node. |
| materials[].file_id | string | Platform file id of an image fill; read the picture through the file domain. |
| materials[].ref | object | Reference of an embed node's platform object; read the object from its own domain, as the canvas stores no copy of it. |
| materials[].appearance | string | How an embed node is drawn on the canvas, one of card, embed or inline. |
| materials[].type | string | Node type of an element that is none of the other kinds. |
| materials[].item | string | For an output of an each step, which item it answers, such as a section name. |
| shared | array<object> | The process's shared context elements, such as the series bible, resolved. |
| shared[].kind | string | What the element is; text carries content, image carries file_id, embed carries ref, other carries type, and html carries only its name because its source is large. |
| shared[].node_id | string | Node id of the element on this canvas; use it with nodes.list to read the full node. |
| shared[].name | string | The node's name, when it has one. |
| shared[].content | string | Text of a text node. |
| shared[].file_id | string | Platform file id of an image fill; read the picture through the file domain. |
| shared[].ref | object | Reference of an embed node's platform object; read the object from its own domain, as the canvas stores no copy of it. |
| shared[].appearance | string | How an embed node is drawn on the canvas, one of card, embed or inline. |
| shared[].type | string | Node type of an element that is none of the other kinds. |
| shared[].item | string | For an output of an each step, which item it answers, such as a section name. |
| upstream | array<object> | One entry per step in needs, in needs order, with that step's current outputs. |
| upstream[].step | string | Key of the upstream step. |
| upstream[].title | string | Title of the upstream step. |
| upstream[].state | string | Derived state of the upstream step; filled means it has its outputs, ready means unfilled with its own needs filled, waiting means otherwise. |
| upstream[].outputs | array<object> | Outputs of the upstream step, resolved. |
| outputs | array<object> | Elements that already answer this step through metadata.output; check them before adding more. |
| outputs[].kind | string | What the element is; text carries content, image carries file_id, embed carries ref, other carries type, and html carries only its name because its source is large. |
| outputs[].node_id | string | Node id of the element on this canvas; use it with nodes.list to read the full node. |
| outputs[].name | string | The node's name, when it has one. |
| outputs[].content | string | Text of a text node. |
| outputs[].file_id | string | Platform file id of an image fill; read the picture through the file domain. |
| outputs[].ref | object | Reference of an embed node's platform object; read the object from its own domain, as the canvas stores no copy of it. |
| outputs[].appearance | string | How an embed node is drawn on the canvas, one of card, embed or inline. |
| outputs[].type | string | Node type of an element that is none of the other kinds. |
| outputs[].item | string | For an output of an each step, which item it answers, such as a section name. |
| issues | array<object> | Problems found in the whole process, such as dangling-material, dangling-shared, orphan-output, duplicate-step, unknown-step, needs-cycle and invalid-requirement; each has a kind plus the step or node it names. |