Querying the Instance-Level/Project-Level Permission Matrix of an Application
Function
This API is used to query the instance-level or project-level permission matrix of an application. If app_id is transferred, the instance-level permission matrix is queried. If project_id is transferred while app_id is not transferred, the project-level permission matrix is queried.
Calling Method
For details, see Calling APIs.
URI
GET /v3/applications/permissions
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| app_id | No | String | Application ID |
| project_id | No | String | Project ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| result | Array of ApplicationPermissionVO objects | Role application permission |
| status | String | Request success or failure status |
| Parameter | Type | Description |
|---|---|---|
| can_modify | Boolean | Whether you have the edit permission |
| can_delete | Boolean | Whether you have the delete permission |
| can_view | Boolean | Whether you have the view permission |
| can_execute | Boolean | Whether you have the execute permission |
| can_copy | Boolean | Whether you have the clone permission |
| can_manage | Boolean | Whether you have the manage permission, including adding, deleting, modifying, querying, executing, and modifying permissions. |
| can_create_env | Boolean | Whether you have the permission to create environments |
| can_disable | Boolean | Whether you have the disable permission |
| name | String | Role name |
| region | String | Region information |
| role_id | String | Role ID |
| role_type | String | Role type. app-creator: Application creator. project: Project administrator. template-customized-inst: System roles. template-project-customized and project-customized: Custom roles. |
Example Requests
-
This API is used to query the project-level permission matrix of an application.
https://{endpoint}/v3/applications/permissions?project_id=0a38ce9ba3c740c199a0f872b6163661 -
This API is used to query the instance-level permission matrix of an application.
https://{endpoint}/v3/applications/permissions?app_id=0a38ce9ba3c740c199a0f872b6163661
Example Responses
Status code: 200
OK: The request is successful.
{
"result" : [ {
"can_copy" : true,
"can_create_env" : true,
"can_delete" : true,
"can_disable" : true,
"can_execute" : true,
"can_manage" : true,
"can_modify" : true,
"can_view" : true,
"name" : "App creator",
"region" : "example",
"role_id" : "0",
"role_type" : "app-creator"
}, {
"can_copy" : true,
"can_create_env" : true,
"can_delete" : true,
"can_disable" : true,
"can_execute" : true,
"can_manage" : true,
"can_modify" : true,
"can_view" : true,
"name" : "Project Admin",
"region" : "example",
"role_id" : "2e510051361942a8b7ecea00144172b3",
"role_type" : "project"
} ],
"status" : "success"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK: The request is successful. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.