获取策略列表
测试中
GET
/api/v2/policies/list
请求参数
Query 参数
page
string
页数
示例值:
1
limit
string
每页显示条数
示例值:
10
namespace
string
权限分组 Code
示例值:
namespace-code
Header 参数
Authorization
string
必需
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
61cc2c7bb686e2767125230d
示例代码
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/list' \
--header 'Authorization: Bearer token ' \
--header 'x-authing-userpool-id: 61cc2c7bb686e2767125230d'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
totalCount
integer
必需
list
array [object {13}]
必需
示例
{
"code": 200,
"message": "获取成功",
"data": {
"totalCount": 1,
"list": [
{
"id": "61cd6d6b9a278754df55e1e3",
"createdAt": "2021-12-30T08:27:23.835Z",
"updatedAt": "2021-12-30T08:27:23.835Z",
"userPoolId": "59f86b4832eb28071bdd9214",
"isDefault": false,
"isAuto": false,
"hidden": false,
"code": "rtbrnrt",
"description": "rtbrnrt",
"statements": [
{
"resource": "book:*",
"actions": [
"*"
],
"effect": "ALLOW",
"condition": [
{
"operator": "StringNotEquals",
"param": "AppId",
"value": "eerveb"
}
],
"resourceType": "DATA"
}
],
"namespaceId": 2,
"assignmentsCount": 0,
"namespace": "default"
}
]
}
}
修改于 2022-02-14 14:15:05