跳转到内容
EN

读取节点

GET /canvas/v1/canvases/{canvas_id}/nodes

Read node documents for inspection before changing individual nodes. Supply 1–100 comma-separated node ids from retrieve or execute, or instance paths such as a/b. depth is an integer at least 0; omit it for complete subtrees. Each requested id maps to a document wrapper or null if absent. Unlike Figma, document contains a Pencil .pen 2.21 node, not a Figma node. For top-level summaries use canvases.retrieve; for pixels use images.list.

支持状态: supported

参数

名称位置类型必填说明
canvas_idpathstringtrueCanvas id returned by create or list, in the form cvs_ followed by 16 lowercase letters or digits; a display name is not accepted.
versionquerystringfalseDecimal 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.
idsquerystringtrueComma-separated list of 1–100 node ids from retrieve or execute, or instance paths such as a/b; missing ids map to null.
depthqueryintegerfalseMaximum child depth below each requested node, as an integer at least 0; 0 returns the node without descendants, and omission returns the complete subtree.

响应

HTTP 200

Requested version and node documents; omission of version reads the current canvas, and absent ids map to null rather than failing the request.

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.
nodes object Map keyed by each requested node id or instance path; null means that id was not found.