添加策略授权
测试中POST
/api/v2/policies/add-assignments请求参数
Header 参数
Authorization
string
必需
用户池管理员 Token
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
61cc2c7bb686e2767125230d
Body 参数application/json
policies
array[string]
策略唯一标识的列表
targetType
string
必需
目标主体类型:USER-用户,ROLE-角色,GROUP-分组,ORG-组织机构
targetIdentifiers
array[string]
必需
目标标识符列表:targetType 为 USER,对应标识符是用户 id 列表;targetType 为 ROLE,对应标识符是角色标识符列表;targetType 为GROUP,对应标识符是分组标识符列表;targetType 为 ORG,对应标识符是组织机构 ID 列表
inheritByChildren
boolean
可选
如果目标对象是组织机构,可以选择子节点是否继承
namespace
string
权限分组 Code
示例
{
"policies": [
"string"
],
"targetType": "string",
"targetIdentifiers": [
"string"
],
"inheritByChildren": true,
"namespace": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
示例
{
"code": 200,
"message": "授权成功"
}
最后修改时间: 3 年前