GET /v1/plugin-ui/pages
List the ui_page plugin pages this principal may open
- operationId
listPluginUIPages- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
契约没有单独标注权限码,权限要求见下方说明与 403 响应。
说明(契约原文)
Any authenticated session. Only plugins enabled on this installation (and still served by the license service) are listed, filtered by the page role (platform scope = admin), its required_permission (no platform.admin fallback) and its required_module (lease). The web app mounts each page in <iframe sandbox="allow-scripts allow-forms"> on the plugin origin.
响应
listPluginUIPages 响应| 状态码 | 说明 |
|---|
200 | Mountable pages. 字段:items: array<PluginUIPage> |
|---|
401 | 认证失败或会话已失效。 |
|---|
503 | A required dependency is unavailable. |
|---|
失败时怎么办
401 检查凭据格式、是否过期或被轮换。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/plugin-ui/signing-key
The installation public key plugin backends verify proxied calls with
- operationId
getPluginUISigningKey- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
契约没有单独标注权限码,权限要求见下方说明与 403 响应。
说明(契约原文)
Requires plugin_installations.read or plugin_installations.manage (any scope) or platform.admin in the platform scope. Public material only: the administrator hands public_key to a ui_page plugin backend so it can verify X-Cdnca-Plugin-Signature; key_id equals X-Cdnca-Plugin-Key-Id. 503 plugin_ui_proxy_unavailable when this installation has no key configured.
响应
getPluginUISigningKey 响应| 状态码 | 说明 |
|---|
200 | The installation signing key. 字段:installation_id: string(uuid) key_id: string algorithm: any public_key: string signature_domain: any |
|---|
401 | 认证失败或会话已失效。 |
|---|
403 | 当前身份没有执行该操作的权限。 |
|---|
503 | A required dependency is unavailable. |
|---|
失败时怎么办
401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
POST /v1/plugin-ui/{plugin_id}/proxy
Call a ui_page plugin's own backend on behalf of one of its pages
- operationId
proxyPluginUIRequest- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
契约没有单独标注权限码,权限要求见下方说明与 403 响应。
说明(契约原文)
Any authenticated session that may open page_id. The control plane forwards method/path/query/body to the plugin's declared api_base_url (public addresses only, no redirects, JSON only) without the user's session or token; it adds X-Cdnca-Plugin-Context (base64url JSON, schema cdnca.plugin-ui-context/v1, 60 s), X-Cdnca-Plugin-Signature (Ed25519 by the installation key over "cdnca-plugin-ui-proxy/v1\n" + METHOD + "\n" + path?query + "\n" + hex(sha256(body)) + "\n" + context) and X-Cdnca-Plugin-Key-Id. site_id must be a site the caller can access. Writes and refusals are audited as plugin.ui_page.proxy. 120 calls per minute per user and plugin.
参数
proxyPluginUIRequest 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
plugin_id | path | string | 是 | — |
|---|
请求体
application/json · 必填:是
proxyPluginUIRequest 请求体| 名称 | 类型 | 必填 | 说明 |
|---|
method | any | 是 | — |
|---|
path | string | 是 | — |
|---|
query | string | 否 | — |
|---|
body | any | 否 | JSON body (not with GET) |
|---|
page_id | string | 是 | — |
|---|
site_id | string(uuid) | 否 | — |
|---|
响应
proxyPluginUIRequest 响应| 状态码 | 说明 |
|---|
200 | The plugin backend answer (status and JSON body only). 字段:status: integer body: any |
|---|
400 | 请求体或参数不合法。 |
|---|
401 | 认证失败或会话已失效。 |
|---|
403 | 当前身份没有执行该操作的权限。 |
|---|
404 | 请求的资源不存在。 |
|---|
429 | plugin_ui_rate_limited |
|---|
502 | plugin_ui_backend_unavailable |
|---|
503 | A required dependency is unavailable. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。429 被限速:等待后再试,降低并发。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表