Obtaining the List of Members That Can Be Added to a Repository Group
Function
This API is used to obtain the list of members that can be added to a repository group.
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:group:getMembers |
Read |
- |
- |
- |
- |
URI
GET https://{hostURL}/v4/groups/{group_id}/members/list
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
group_id |
Yes |
Integer |
Definition Repository group ID, which is the numeric ID next to Group ID on the repository group homepage. Default Value N/A Value range: 1~2147483647 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition You can obtain the unique project identifier, 32-character UUID, by calling the API used to query the project list. Range String length: 32 characters. |
|
query |
No |
String |
Definition Member search string. |
|
join_way |
No |
String |
Definition Member adding mode. domain: tenant. normal: common, inherit: inherited. Enumeration values:
|
|
access_level |
No |
Integer |
Definition Access level of members to be filtered. 10: to be reviewed; 20: viewer; 30: developer; 40: administrator; 50: owner Value range: 1~2147483647 |
|
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. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token. Constraints N/A Range 1–100,000 characters. Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
[items] |
Array of GroupMemberDetailDto objects |
Definition: Member list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Integer |
Definition Unique ID. Value range: 1~2147483647 |
|
source_id |
Integer |
Definition Resource ID. Value range: 1~2147483647 |
|
user_id |
Integer |
Definition User ID. Value range: 1~2147483647 |
|
user_from |
String |
Definition User source. Range 1–1,000 characters. |
|
role_id |
String |
Definition Role ID. Range 1–1,000 characters. |
|
role_name |
String |
Definition Role name. Range 1–1,000 characters. |
|
cn_role_name |
String |
Definition Role name in Chinese. Range 1–1,000 characters. |
|
req_role_id |
String |
Definition Project role ID. Range 1–1,000 characters. |
|
req_role_name |
String |
Definition Project role name. Range 1–1,000 characters. |
|
user_group_id |
String |
Definition Member group ID. Range 1–1,000 characters. |
|
group_name |
String |
Definition Repository group name. Range 1–1,000 characters. |
|
user_name |
String |
Definition Username. Range 1–1,000 characters. |
|
domain_id |
String |
Definition Tenant ID. Range 1–1,000 characters. |
|
domain_name |
String |
Definition Tenant name. Range 1–1,000 characters. |
|
nick_name |
String |
Definition User alias. Range 1–1,000 characters. |
|
is_group_creator |
Boolean |
Definition Whether the user is the creator of a repository group. |
|
is_project_admin |
Boolean |
Definition Whether the user is a project administrator. |
|
path |
String |
Definition Path. Range 1–1,000 characters. |
|
role_chinese_name |
String |
Definition Role name in Chinese. Range 1–1,000 characters. |
|
can_remove |
Boolean |
Definition Removable or not. |
|
access_level |
Integer |
Definition Role. Value range: 1~2147483647 |
|
service_license_status |
Integer |
Definition Service license status. Value range: 1~2147483647 |
|
iam_id |
String |
Definition IAM ID of the user. Range 1–1,000 characters. |
|
current_group_member |
Boolean |
Definition Whether the user is a member of the current repository group. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error message. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error message. |
Example Requests
GET https://{endpoint}/v4/groups/{group_id}/members/list
Example Responses
Status code: 200
Obtain the list of members that can be added to a repository group.
[ {
"id" : 1067730,
"source_id" : 2111919928,
"user_id" : 9091,
"user_from" : "Project members",
"role_id" : "42501d8587994fb1ace57dc2bd80a51f",
"role_name" : "Project manager",
"cn_role_name" : "Project manager",
"req_role_id" : "42501d8587994fb1ace57dc2bd80a51f",
"req_role_name" : "Project manager",
"user_group_id" : null,
"group_name" : "p_group3",
"user_name" : "03e2dc950c7441df8d26972e33cadb15",
"domain_id" : "159b65b41ead484d8ddff250a4731781",
"domain_name" : "devcloud_codehub_l00314597_01",
"nick_name" : null,
"is_group_creator" : false,
"is_project_admin" : false,
"path" : null,
"role_chinese_name" : null,
"can_remove" : true,
"access_level" : 40,
"service_license_status" : 1,
"iam_id" : "03e2dc950c7441df8d26972e33cadb15",
"current_group_member" : true
} ]
Status code: 401
Unauthorized
{
"error_code" : "DEV.00000003",
"error_msg" : "Authentication information expired."
}
Status code: 403
Bad Request
{
"error_code" : "CH.004403",
"error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Obtain the list of members that can be added to a repository group. |
|
401 |
Unauthorized |
|
403 |
Bad Request |
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