跳转到内容
EN

列出画布版本

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

Inspect retained edits before restoring a canvas or reading historical nodes and images. Supply a canvas_id from canvases.list or create. Results include successful execute, import and restore commits since history was enabled, newest first. limit is 1–100 and defaults to 30; pass next_cursor as cursor until it is null. All versions from the last 30 days are retained unless the 256 MiB history budget requires pruning; the newest 100 versions are always retained regardless of age or size. earliest_restorable_version is the oldest readable and restorable version, including the state immediately before the first retained commit; null means no history has been recorded. Listing does not change the canvas.

支持状态: 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.
limitqueryintegerfalseMaximum commits to return, from 1 to 100 inclusive; omission uses 30.
cursorquerystringfalseCopy next_cursor from the preceding page to continue toward older commits; omit for the first page.

响应

HTTP 200

Retained commits ordered newest first, the continuation cursor, and the oldest version available for reads or restore.

application/json

名称 类型 说明
versions array<object> Successful retained canvas edits, ordered from highest version to lowest; failed scripts and read-only calls are absent.
versions[].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.
versions[].created_at string ISO 8601 time at which this edit committed successfully.
versions[].kind string Source of the edit; execute is a drawing script, import loads document content, and restore recovers a historical snapshot.
versions[].actor object Principal responsible for the edit, resolved from the authenticated caller.
versions[].op_count integer Number of design operations for execute, imported top-level trees for import, or restored before images for restore.
versions[].touched_frames array<string> Up to 50 affected top-level node ids for locating the changed areas; larger edits truncate this list.
versions[].summary string | null Script prefix of at most 300 characters for execute, import or import (reset) for imports, or restored to version N for restore; null when no summary is recorded.
versions[].restored_from string | null Historical target version for a restore commit; null for execute and import commits.
next_cursor string | null Continuation token to pass as cursor to read older commits; null marks the final page.
earliest_restorable_version string | null Oldest version available for historical reads and restore, including the state immediately before the oldest retained commit; null means no historical commit exists.