Associating a Repository Group with a Member Group
Function
Associate a repository group with a member group.
URI
POST /v4/{project_id}/groups/{group_id}/user-group/{user_group_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
group_id |
Yes |
Integer |
Repository group ID. |
|
user_group_id |
Yes |
String |
Member group ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained 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. |
Response Parameters
Status code: 201
|
Parameter |
Type |
Description |
|---|---|---|
|
success |
Array MemberBaseDto |
Associated members. |
|
failure |
Array FailureForBatchCreateGroupMembersDto |
Members that fail to be associated. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
User ID. |
|
name |
String |
Member name. |
|
iam_id |
String |
iam_id |
|
Parameter |
Type |
Description |
|---|---|---|
|
iam_id |
String |
User ID. |
|
message |
Array String |
Failure cause. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Response status code. |
|
error_msg |
String |
Response error information. |
Example Requests
POST https://{endpoint}/v4/{project_id}/groups/{group_id}/user-group/{user_group_id}
Example Responses
Status code: 201
{
"success":[
{"id": 10091
"name": paas_codeartsrepo_f30041672_01
"iam_id": 4a7049ad346d43419328a37b93b38ad4
},{"id": 9443
"name": CodeHub_fudehua_gray
"iam_id": "4a7049ad346d43419328a37b93b38ad4"
}]
failure: []
}
Status code: 401
{
"error_code": "DEV.00000003"
"error_msg": "Authentication information expired"
}
Status Code
|
Status Code |
Description |
|---|---|
|
201 |
OK |
|
401 |
Unauthorized |
Error code.
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.