Query Roles with Target Data Source Permissions
Specify a data source to view all roles that have permissions for that data source.
Request URL: /openapi/v1/role/datasource/list
Request Method: GET
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
datasourceId | String | Yes | Data source ID. | ds-abc123 |
action | String | Yes | Permission name. Options:
| Readonly |
current | Integer | No | Current page number. | 1 |
pageSize | Integer | No | Page size. | 10 |
Response Parameters
Parameter | Type | Description | Example |
---|---|---|---|
success | Boolean | Whether the request was successful. | true |
requestId | String | Request ID. | Mi6y0FCN-BHEEaHAnCFFp9DFdAAk0OUZ |
data | Array | Role list, including the following fields:
| { "roleId": "16", "name": "System Administrator", "type": "system" }, { "roleId": "40", "name": "Production Environment Administrator", "type": "custom" } |
current | Integer | Current page number. | 1 |
pageSize | Integer | Page size. | 10 |
total | Integer | Total number of records. | 2 |
Successful Invocation Example
{
"success": true,
"requestId": "Fg1p1HNO-cigfjUOnhfdn3ZOddjy1CAI",
"data": [{
"roleId": "16",
"name": "System Administrator",
"type": "system"
}, {
"roleId": "40",
"name": "Production Environment Administrator",
"type": "custom"
}],
"current": 1,
"pageSize": 10,
"total": 2
}