Querying the Repository Permission Matrix Configuration
Function
This API is used to query the repository permission matrix configuration.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
| Action | Access Level | Resource Type (*: required) | Condition Key | Alias | Dependencies |
|---|---|---|---|---|---|
| codeartsrepo:repository:getRepository | Read | - | - | - | - |
URI
GET https://{hostURL}/v4/repository/{repository_id}/permissions/{resource_name}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| repository_id | Yes | Integer | Definition You can call the API used to query all repositories of the user to query the project list to obtain the repository ID. Constraints N/A Default Value N/A Value range: 1~2147483647 |
| resource_name | Yes | String | Definition: Resource name Constraints: N/A Value range: Default value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Definition Offset, which starts from 0. Value range: 0~2147483647 Default value: 0 |
| limit | No | Integer | Definition Number of returned records. Value range: 1~100 Default value: 20 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. You can obtain the token by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range A string that can contain 1 to 100,000 characters. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of ResponsePermissionInfo objects | Repository permission matrix configuration list |
| Parameter | Type | Description |
|---|---|---|
| role_id | String | Definition: Role ID Value range: N/A |
| role_name | String | Definition: Role name Value range: N/A |
| role_name_cn | String | Definition: Role name (CN) Value range: N/A |
| resource_permissions | AnyType | Definition: Resource permission details Value range: N/A |
Example Requests
None
Example Responses
Status code: 200
Query repository permission matrix configuration
[ {
"role_id" : "d0457f74cc5b43d989ded7248f71b4e5",
"role_name" : "Developer",
"role_name_cn" : "Developer",
"resource_permissions" : {
"fork" : {
"permission_id" : "2",
"action" : "fork",
"display_name" : "fork",
"display_name_cn" : "fork",
"enabled" : "true",
"editable" : "true"
},
"delete" : {
"permission_id" : "3",
"action" : "delete",
"display_name" : "delete",
"display_name_cn" : "Delete",
"enabled" : "true",
"editable" : "true"
}
}
} ] Status Codes
| Status Code | Description |
|---|---|
| 200 | Query repository permission matrix configuration |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot