更新用户组接口
将 <BASE_URL> 替换为所在企业环境的 API 域名。
- Scope:
admin.v1.user-groups.manage - 权限项:用户组管理(
user-groups) - 权限类型:管理
- 接口:PATCH
/api/openapi/v1/user-groups/{groupId}
认证与请求头
使用应用 API Key 调用。当前接口只校验上方独立 Scope;读取、管理与执行权限互不隐含。
| 名称 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | header | string | 是 | 应用 API Key,使用 Bearer 方式传递。 | Bearer qwk_*** |
X-Request-Id | header | string | 否 | 可选的调用追踪标识;未传入时由服务端生成。 | req-20260831-001 |
请求参数
| 名称 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
groupId | path | string · uuid | 必填 | - | "<uuid>" |
description | body | string | 否 | - | "<string>" |
members | body | array | null | 必填 | - | [{"include_descendants":false,"subject_id":"<string>","subject_type":"user"}] |
name | body | string | 必填 | - | "<string>" |
请求示例
cURL
curl --request PATCH \
--url '<BASE_URL>/api/openapi/v1/user-groups/<groupId>' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"description": "<string>",
"members": [
{
"include_descendants": false,
"subject_id": "<string>",
"subject_type": "user"
}
],
"name": "<string>"
}'响应
200 OK
| 名称 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
created_at | string · date-time | 是 | - | "2026-08-27T10:00:00Z" |
description | string | 是 | - | "<string>" |
id | string | 是 | - | "<string>" |
members | array | null | 是 | - | [{"include_descendants":false,"subject_id":"<string>","subject_type":"user"}] |
name | string | 是 | - | "<string>" |
updated_at | string · date-time | 是 | - | "2026-08-27T10:00:00Z" |
响应示例
{
"created_at": "2026-08-27T10:00:00Z",
"description": "<string>",
"id": "<string>",
"members": [
{
"include_descendants": false,
"subject_id": "<string>",
"subject_type": "user"
}
],
"name": "<string>",
"updated_at": "2026-08-27T10:00:00Z"
}default Flat business error
| 名称 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
code | string | 否 | Stable business error code | "<string>" |
detail | string | 是 | Human-readable error description | "<string>" |
details | OpenapiErrorDetails | 否 | - | {"field":"<string>","reason":"<string>","suggestion":"<string>"} |
details.field | string | 否 | Request field that failed validation | "<string>" |
details.reason | string | 否 | Stable validation failure reason | "<string>" |
details.suggestion | string | 否 | Suggested normalized value | "<string>" |
error | string | 是 | Stable HTTP error type | "<string>" |
响应示例
{
"code": "<string>",
"detail": "<string>",
"details": {
"field": "<string>",
"reason": "<string>",
"suggestion": "<string>"
},
"error": "<string>"
}