You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.0 KiB

19 hours ago
meta {
name: 批量分配角色
type: http
seq: 5
tags: [
generated
]
}
post {
url: {{baseUrl}}/api/system/users/assign-roles-batch
body: formUrlEncoded
auth: inherit
}
body:form-urlencoded {
userIds: 2001,2002
roleIds: 3,4
}
docs {
# 批量分配角色
`POST /api/system/users/assign-roles-batch`
批量分配角色(多用户增量,不覆盖已有角色):只增不删不覆盖,与单用户全量替换的 assign-roles 互补。
## 请求参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
| --- | --- | --- | --- | --- |
| userIds | string | 是 | - | 用户 ID 串,逗号分隔 |
| roleIds | string | 是 | - | 角色 ID 串,逗号分隔 |
## 请求示例
请求头:Authorization: Bearer {{token}}
Content-Type: application/x-www-form-urlencoded
POST /api/system/users/assign-roles-batch
userIds=2001,2002&roleIds=3,4
## 响应 data 结构
null
## 响应示例
```json
{
"code": 0,
"success": true,
"message": "success",
"data": null
}
```
}