撤销业务资源
POST
/api/v2/acl/revoke-resources
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
59f86b4832eb28071bdd9214
Body 参数application/json
namespace
string
必需
opts
array [object {3}]
授权的对象列表
targetType
string
可选
targetIdentifiers
array[string]
可选
resources
array [object {3}]
必需
示例
{
"namespace": "default",
"opts": [
{
"targetType": "USER",
"targetIdentifiers": [
"61e7bd4e7e7984abf625b28c"
],
"resources": [
{
"code": "order",
"actions": [
"book:*"
],
"resourceType": "DATA"
}
]
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://core.authing.cn/api/v2/acl/revoke-resources' \
--header 'Authorization: Bearer token' \
--header 'x-authing-userpool-id: 59f86b4832eb28071bdd9214' \
--header 'Content-Type: application/json' \
--data-raw '{
"namespace": "default",
"opts": [
{
"targetType": "USER",
"targetIdentifiers": ["61e7bd4e7e7984abf625b28c"],
"resources": [
{
"code": "order",
"actions": ["book:*"],
"resourceType": "DATA"
}
]
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
示例
{
"code": 200,
"message": "取消资源授权成功"
}
修改于 2022-01-19 08:30:38