Operation details
GET /v1/l2-configs
查询 L2 配置列表
- operationId
listL2Configs- 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
listL2Configs 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
listL2Configs Responses| Status | Description |
|---|
200 | L2 配置列表;无数据时 items 为空数组。 Fields:items: array<L2Config> |
|---|
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-configs
创建 L2 配置
- operationId
createL2Config- 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,须为单个 UTF-8 JSON 对象,拒绝未知字段。
Parameters
createL2Config 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
createL2Config Request body| Name | Type | Required | Description |
|---|
name | string | Yes | 名称;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。 |
|---|
region | string | Yes | 必填区域名称;显式空字符串表示默认区域,与线路组默认区域相同,不是区域 UUID。仅含空白的非空字符串非法;其余名称写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。已有非空名称(包括“默认”)保持原值,不等同于空字符串。 |
|---|
remark | string | No | 备注;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。省略时为空字符串。 |
|---|
mode | string: cache / global | Yes | — |
|---|
load_method | string: rr / url_hash | Yes | — |
|---|
Responses
createL2Config Responses| Status | Description |
|---|
201 | 返回修订 1 的配置对象;名称或幂等键冲突返回 409。 Fields:id: string(uuid) display_id: string tenant_scope_id: string(uuid) revision: integer(int64) name: string region: string remark: string mode: string: cache / global load_method: string: rr / url_hash 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
GET /v1/l2-configs/{id}
查询 L2 配置
- operationId
getL2Config- 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
Parameters
getL2Config 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. |
|---|
Responses
getL2Config Responses| Status | Description |
|---|
200 | 返回当前配置对象及其修订。 Fields:id: string(uuid) display_id: string tenant_scope_id: string(uuid) revision: integer(int64) name: string region: string remark: string mode: string: cache / global load_method: string: rr / url_hash 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. |
|---|
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.503 A dependency is unavailable: retry later with the original Idempotency-Key.
↑ Back to list
PUT /v1/l2-configs/{id}
替换 L2 配置
- operationId
updateL2Config- 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 修订冲突。
Parameters
updateL2Config 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
updateL2Config Request body| Name | Type | Required | Description |
|---|
name | string | Yes | 名称;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。 |
|---|
region | string | Yes | 必填区域名称;显式空字符串表示默认区域,与线路组默认区域相同,不是区域 UUID。仅含空白的非空字符串非法;其余名称写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。已有非空名称(包括“默认”)保持原值,不等同于空字符串。 |
|---|
remark | string | No | 备注;写入时去除首尾空白后按 Unicode 字符数校验,禁止控制字符。省略时为空字符串。 |
|---|
mode | string: cache / global | Yes | — |
|---|
load_method | string: rr / url_hash | Yes | — |
|---|
Responses
updateL2Config Responses| Status | Description |
|---|
200 | 返回更新后的配置对象或已完成请求的原结果。 Fields:id: string(uuid) display_id: string tenant_scope_id: string(uuid) revision: integer(int64) name: string region: string remark: string mode: string: cache / global load_method: string: rr / url_hash 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-configs/{id}
删除 L2 配置
- operationId
deleteL2Config- 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
deleteL2Config 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
deleteL2Config 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