Querying User Permissions in a Project
Function
This API is used to query permissions of a user for a project.
Calling Method
For details, see Calling APIs.
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 |
|---|---|---|---|---|---|
|
codeartsartifact:repository:list |
List |
- |
- |
- |
- |
URI
GET /cloudartifact/v3/user/{project_id}/privileges
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID, which can be obtained by calling an API or from the console. For details about how to obtain the project ID, see Obtaining a Project ID (CloudArtifact_api_0015.xml). Constraints The value contains 32 characters. Only letters and digits are supported. Range N/A. Default value None |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Definition Request status. Range success: The request is successful. error: The request fails. |
|
traceId |
String |
Definition Request ID, which uniquely identifies the current request. Range A string of digits and hyphens (-). |
|
result |
result object |
Definition Response of the request. The return value varies according to the API. Range The value range varies according to the API. |
|
Parameter |
Type |
Description |
|---|---|---|
|
operations |
String |
Definition Operation list. Range Strings separated by commas (,). |
|
operationsIndex |
Array of integers |
Definition Operation sequence number. Range Number. |
|
role_id |
String |
Definition Role ID. Range Max. 32 characters, including letters and digits. |
|
role_name |
String |
Definition Role name (EN). Range Project manager, Product manager, Test manager, Operation manager, System engineer, Committer, Developer, Tester, Participant, Viewer, and custom roles. |
|
role_chinese_name |
String |
Definition Role name (CN) Range Project manager, Product manager, Test manager, Operation manager, System engineer, Committer, Developer, Tester, Participant, Viewer, and custom roles. |
|
project_id |
String |
Project ID. Range Max. 32 characters, including letters and digits. |
|
area_service_id |
String |
Definition Area service ID. Range Max. 32 characters, including letters and digits. |
|
granted_object_path |
String |
Definition Authorization object path. Range The value can contain letters, digits, slashes (/), and asterisks (*). |
|
granted_object_type_id |
String |
Definition Authorization object type ID. Range Max. 32 characters, including letters and digits. |
Example Requests
https://{endpoint}/cloudartifact/v3/user/6666669620d743eca6a57881a0f006fd/privileges
Example Responses
Status code: 200
OK
{
"status" : "success",
"traceId" : "143006-1700618253925-55",
"result" : {
"operations" : "editRepository,restore,physicdelete,clearall",
"operationsIndex" : [ 2, 4, 5, 7 ],
"role_id" : "ca9615b14a794146ad1ff3ad9ba79666,",
"role_name" : "Developer,",
"role_chinese_name" : "Developer",
"project_id" : "bef3419620d743eca6a57881a0f00666,",
"area_service_id" : "c0ec24a435a640728b07785d882cf666,",
"granted_object_path" : "/xxxx/aaa/bbb/*,",
"granted_object_type_id" : "f9fa2e8207254e14a7a0b1fa99ce9666"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
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