获取策略详情
测试中
GET
/api/v2/policies/{code}/detail
请求参数
Path 参数
code
string
策略唯一标识
Query 参数
namespace
string
权限分组 Code
示例值:
namespace-code
Header 参数
Authorization
string
必需
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
61cc2c7bb686e2767125230d
Body 参数application/x-www-form-urlencoded
object {0}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://core.authing.cn/api/v2/policies//detail' \
--header 'Authorization: Bearer token ' \
--header 'x-authing-userpool-id: 61cc2c7bb686e2767125230d'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
createdAt
string
必需
updatedAt
string
必需
userPoolId
string
必需
isDefault
boolean
必需
isAuto
boolean
必需
hidden
boolean
必需
code
string
必需
description
string
必需
statements
array [object {5}]
必需
namespaceId
integer
必需
namespace
string
必需
示例
{
"code": 200,
"message": "获取成功",
"data": {
"id": "61dd49bb17b02396d1826b37",
"createdAt": "2022-01-11T09:11:23.478Z",
"updatedAt": "2022-01-11T09:11:23.478Z",
"userPoolId": "59f86b4832eb28071bdd9214",
"isDefault": false,
"isAuto": true,
"hidden": false,
"code": "bk7-aStpv",
"description": "Auto generate bk7-aStpv",
"statements": [
{
"resource": "*:*",
"actions": [
"*"
],
"effect": "ALLOW",
"condition": [],
"resourceType": null
},
{
"resource": "book:*",
"actions": [
"book:read"
],
"effect": "ALLOW",
"condition": [
{
"param": "CurrentTime",
"operator": "DateEquals",
"value": "2022-01-18T09:11:21.511Z"
}
],
"resourceType": "DATA"
}
],
"namespaceId": 2,
"namespace": "default"
}
}
修改于 2022-01-24 06:17:45