查询拥有目标数据源权限的角色
指定一个数据源,查看拥有该数据源权限的所有角色。
请求地址:/openapi/v1/role/datasource/list
请求方法:GET
请求参数
参数 | 类型 | 是否必选 | 说明 | 示例 |
---|---|---|---|---|
datasourceId | String | 是 | 数据源 ID。 | ds-abc123 |
action | String | 是 | 权限名称。可选值:
| Readonly |
current | Integer | 否 | 当前页码。 | 1 |
pageSize | Integer | 否 | 每页大小。 | 10 |
返回参数
参数 | 类型 | 说明 | 示例 |
---|---|---|---|
success | Boolean | 请求是否成功。 | true |
requestId | String | 请求 ID。 | Mi6y0FCN-BHEEaHAnCFFp9DFdAAk0OUZ |
data | Array | 角色列表,包含如下字段:
| { "roleId": "16", "name": "系统管理员", "type": "system" }, { "roleId": "40", "name": "生产环境管理员", "type": "custom" } |
current | Integer | 当前页码。 | 1 |
pageSize | Integer | 每页大小。 | 10 |
total | Integer | 总记录数。 | 2 |
调用成功示例
{
"success": true,
"requestId": "Fg1p1HNO-cigfjUOnhfdn3ZOddjy1CAI",
"data": [{
"roleId": "16",
"name": "系统管理员",
"type": "system"
}, {
"roleId": "40",
"name": "生产环境管理员",
"type": "custom"
}],
"current": 1,
"pageSize": 10,
"total": 2
}