获取当前账号的管理员 Identity;如果尚未存在,则创建并返回。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
获取当前账号的管理员 Identity;如果尚未存在,则创建并返回。
POST /api/v1/forward/identities/admin/ensure
该接口不需要请求体,重复调用返回同一个管理员 Identity。
| Header | 是否必填 | 说明 |
|---|---|---|
| Authorization | 是 | Bearer <PAT 或 SAT> |
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/identities/admin/ensure' \
-H "Authorization: Bearer $QODER_ACCESS_TOKEN"
{
"id": "idn_admin",
"external_id": "__qca_admin_identity__",
"name": "QCA Console Admin",
"identity_type": "admin",
"enabled": true,
"metadata": {},
"created_at": "2026-07-14T10:00:00Z",
"updated_at": "2026-07-14T10:00:00Z"
}
| HTTP | Type | Code | 触发条件 |
|---|---|---|---|
| 401 | authentication_error | - | PAT 或 SAT 无效、已过期或缺失。 |
| 500 | api_error | - | Identity 创建或查询失败。 |