列出组件库
GET /canvas/v1/libraries
Discover the component libraries of the API key’s organization, most recently published first. A library is a canvas that has been published at least once; each item gives its latest version, component count and how many live canvases use it. query keeps only libraries whose name contains the text, ignoring case. limit is 1–100 and defaults to 50; pass next_cursor as cursor until it is null. Deleted canvases are not listed. Available only to organizations where the canvas-libraries feature is enabled.
支持状态: supported
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| query | query | string | false | Keep only libraries whose name contains this text, ignoring case; omit to list every library. |
| limit | query | integer | false | Maximum libraries to return per page, from 1 to 100; defaults to 50 when omitted. |
| cursor | query | string | false | Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null. |
响应
HTTP 200
One page of the organization’s libraries, most recently published first.
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| data | array<object> | Libraries on this page, most recently published first. |
| data[].canvas_id | string | The library's canvas id; use it as canvas_id in library_versions and publish. |
| data[].name | string | The library canvas's display name. |
| data[].version | string | Latest published library version. |
| data[].published_at | string | ISO 8601 time at which the latest version was published. |
| data[].component_count | integer | Number of components in the latest version. |
| data[].used_by | integer | Number of live canvases that import this library. |
| next_cursor | string | null | Continuation token to pass as cursor to read the next page; null marks the final page. |