跳转到内容
EN

移除组件库引用

DELETE /canvas/v1/canvases/{canvas_id}/imports/{alias}

Stop using an imported library in this canvas. Supply this canvas’s canvas_id and the alias it was imported under, as listed in imports of retrieve. The import is refused while any node still instantiates one of the library’s components (the count is in error.details.instances, and retrieve lists them per component), so delete or replace those nodes first. The removal is one new canvas version. Component libraries are available only to organizations where the canvas-libraries feature is enabled.

支持状态: 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.
aliaspathstringtrueThe alias the library was imported under, as shown in imports of retrieve.
expected_versionquerystringfalseCurrent canvas version from retrieve; the removal is refused with REVISION_CONFLICT if the canvas has moved on. Omission removes the import whatever the current version is.

响应

HTTP 200

Confirmation that the import was removed, with the canvas version after the removal.

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.
alias string The alias that was removed.
library string The canvas id of the library that was imported under it.
deleted boolean Always true on success.