接口
认证
需要管理员角色。发送从登录获取的会话 Cookie,或携带Authorization: Bearer <api-key>。
响应
array
用户对象数组。
string
用户的唯一标识符。
string
账户的用户名。
string | null
若已设置则为邮箱,否则为 null。
string
用户角色,例如
"user" 或 "admin"。boolean
账户当前是否被禁用。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl https://router.example.com:8080/v1/router/users \
-H "Authorization: Bearer <admin-api-key>"
{
"items": [
{
"id": "user-abc123",
"username": "alice",
"email": "[email protected]",
"role": "user",
"disabled": false
},
{
"id": "user-def456",
"username": "bob",
"email": null,
"role": "admin",
"disabled": false
}
]
}
GET /v1/router/users 返回翻页的用户账户列表。此仅限管理员的接口用于咏唱引擎 ROUTER 的用户管理。
curl https://router.example.com:8080/v1/router/users \
-H "Authorization: Bearer <admin-api-key>"
{
"items": [
{
"id": "user-abc123",
"username": "alice",
"email": "[email protected]",
"role": "user",
"disabled": false
},
{
"id": "user-def456",
"username": "bob",
"email": null,
"role": "admin",
"disabled": false
}
]
}
GET /v1/router/users
Authorization: Bearer <api-key>。
"user" 或 "admin"。curl https://router.example.com:8080/v1/router/users \
-H "Authorization: Bearer <admin-api-key>"
{
"items": [
{
"id": "user-abc123",
"username": "alice",
"email": "[email protected]",
"role": "user",
"disabled": false
},
{
"id": "user-def456",
"username": "bob",
"email": null,
"role": "admin",
"disabled": false
}
]
}
Was this page helpful?