Operation details
GET /v1/l2-conds
查询 L2 匹配条件列表
- operationId
listL2Conditions- Auth
- API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
- Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
- Required permissions
All of:node_scheduling.read
Description (from the contract)
返回当前作用域未删除的全部匹配条件,按 display_id 排序,不分页。
Parameters
listL2Conditions Parameters| Name | In | Type | Required | Description |
|---|
target_scope_id | query | string(uuid) | No | Tenant credentials may omit this value or repeat their own scope. Platform Bearer credentials omit it to target the platform scope; an explicit tenant scope is allowed only on read or decision operations. |
|---|
Responses
listL2Conditions Responses| Status | Description |
|---|
200 | L2 匹配条件列表;无数据时 items 为空数组。 Fields:items: array<L2Condition> |
|---|
400 | Stable error envelope; messages are not localization keys. |
|---|
401 | Stable error envelope; messages are not localization keys. |
|---|
403 | Stable error envelope; messages are not localization keys. |
|---|
503 | Stable error envelope; messages are not localization keys. |
|---|
What to do on failure
400 Fix the parameters or body per the field list; do not retry unchanged.401 Check the credential format and whether it expired or was rotated.403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.503 A dependency is unavailable: retry later with the original Idempotency-Key.
↑ Back to list
POST /v1/l2-conds
创建 L2 匹配条件
- operationId
createL2Condition- Auth
- API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
- Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
- Required permissions
All of:node_scheduling.manage
Description (from the contract)
写入自身作用域,平台会话不能写入其他租户作用域;相同幂等键与规范化请求重放原结果。请求体限 128 KiB,拒绝非 JSON、无效 UTF-8、未知字段及额外 JSON 值。
Parameters
createL2Condition Parameters| Name | In | Type | Required | Description |
|---|
target_scope_id | query | string(uuid) | No | Tenant credentials may omit this value or repeat their own scope. Platform Bearer credentials omit it to target the platform scope; an explicit tenant scope is allowed only on read or decision operations. |
|---|
If-Match | header | string | Yes | Must be the single exact quoted value "0". |
|---|
Idempotency-Key | header | string | Yes | — |
|---|
X-Request-ID | header | string | Yes | — |
|---|
Request body
application/json · Required:Yes
createL2Condition Request body| Name | Type | Required | Description |
|---|
name | string | Yes | 名称;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。 |
|---|
remark | string | No | 备注;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。省略时为空字符串。 |
|---|
rules | array<L2Rule> | Yes | — |
|---|
Responses
createL2Condition Responses| Status | Description |
|---|
201 | 返回修订 1 的匹配条件对象;名称或幂等键冲突返回 409。 Fields:id: string(uuid) display_id: string tenant_scope_id: string(uuid) revision: integer(int64) name: string remark: string rules: array<L2Rule> created_at: string(date-time) updated_at: string(date-time) |
|---|
400 | Stable error envelope; messages are not localization keys. |
|---|
401 | Stable error envelope; messages are not localization keys. |
|---|
403 | Stable error envelope; messages are not localization keys. |
|---|
409 | Stable error envelope; messages are not localization keys. |
|---|
503 | Stable error envelope; messages are not localization keys. |
|---|
What to do on failure
400 Fix the parameters or body per the field list; do not retry unchanged.401 Check the credential format and whether it expired or was rotated.403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.503 A dependency is unavailable: retry later with the original Idempotency-Key.
↑ Back to list
PUT /v1/l2-conds/{id}
替换 L2 匹配条件
- operationId
updateL2Condition- Auth
- API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
- Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
- Required permissions
All of:node_scheduling.manage
Description (from the contract)
完整替换名称、备注和规则并递增修订;省略 remark 将清空备注。写入受自身作用域、实时管理权限、修订和幂等键约束。当前实现的已知限制:资源不存在与陈旧修订均返回 404/node_scheduling_not_found,不能区分;不同于节点更新及删除接口的 412 修订冲突。此单项路径不支持 GET。
Parameters
updateL2Condition Parameters| Name | In | Type | Required | Description |
|---|
id | path | string(uuid) | Yes | 非零 L2 匹配条件 UUID。 |
|---|
target_scope_id | query | string(uuid) | No | Tenant credentials may omit this value or repeat their own scope. Platform Bearer credentials omit it to target the platform scope; an explicit tenant scope is allowed only on read or decision operations. |
|---|
If-Match | header | string | Yes | Single quoted positive decimal current revision, for example "3". |
|---|
Idempotency-Key | header | string | Yes | — |
|---|
X-Request-ID | header | string | Yes | — |
|---|
Request body
application/json · Required:Yes
updateL2Condition Request body| Name | Type | Required | Description |
|---|
name | string | Yes | 名称;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。 |
|---|
remark | string | No | 备注;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。省略时为空字符串。 |
|---|
rules | array<L2Rule> | Yes | — |
|---|
Responses
updateL2Condition Responses| Status | Description |
|---|
200 | 返回更新后的匹配条件对象或已完成请求的原结果。 Fields:id: string(uuid) display_id: string tenant_scope_id: string(uuid) revision: integer(int64) name: string remark: string rules: array<L2Rule> created_at: string(date-time) updated_at: string(date-time) |
|---|
400 | Stable error envelope; messages are not localization keys. |
|---|
401 | Stable error envelope; messages are not localization keys. |
|---|
403 | Stable error envelope; messages are not localization keys. |
|---|
404 | Stable error envelope; messages are not localization keys. |
|---|
409 | Stable error envelope; messages are not localization keys. |
|---|
503 | Stable error envelope; messages are not localization keys. |
|---|
What to do on failure
400 Fix the parameters or body per the field list; do not retry unchanged.401 Check the credential format and whether it expired or was rotated.403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.404 The resource does not exist or belongs to another tenant.409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.503 A dependency is unavailable: retry later with the original Idempotency-Key.
↑ Back to list
DELETE /v1/l2-conds/{id}
删除 L2 匹配条件
- operationId
deleteL2Condition- Auth
- API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
- Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
- Required permissions
All of:node_scheduling.manage
Description (from the contract)
存在未删除的 L2 节点成员引用时返回 409,不级联删除。成功或幂等重放返回 204,无响应体;ETag 保留删除时修订。不存在返回 404,修订冲突返回 412。
Parameters
deleteL2Condition Parameters| Name | In | Type | Required | Description |
|---|
id | path | string(uuid) | Yes | 非零 L2 匹配条件 UUID。 |
|---|
target_scope_id | query | string(uuid) | No | Tenant credentials may omit this value or repeat their own scope. Platform Bearer credentials omit it to target the platform scope; an explicit tenant scope is allowed only on read or decision operations. |
|---|
If-Match | header | string | Yes | Single quoted positive decimal current revision, for example "3". |
|---|
Idempotency-Key | header | string | Yes | — |
|---|
X-Request-ID | header | string | Yes | — |
|---|
Responses
deleteL2Condition Responses| Status | Description |
|---|
204 | 软删除完成或已完成请求的结果被重放。 |
|---|
400 | Stable error envelope; messages are not localization keys. |
|---|
401 | Stable error envelope; messages are not localization keys. |
|---|
403 | Stable error envelope; messages are not localization keys. |
|---|
404 | Stable error envelope; messages are not localization keys. |
|---|
409 | Stable error envelope; messages are not localization keys. |
|---|
412 | Stable error envelope; messages are not localization keys. |
|---|
503 | Stable error envelope; messages are not localization keys. |
|---|
What to do on failure
400 Fix the parameters or body per the field list; do not retry unchanged.401 Check the credential format and whether it expired or was rotated.403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.404 The resource does not exist or belongs to another tenant.409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.412 The revision changed: read the latest ETag, decide again, then send the new If-Match.503 A dependency is unavailable: retry later with the original Idempotency-Key.
↑ Back to list