AddGroupMember
Adds members to a code group.
Try it now
Test
RAM authorization
Request syntax
POST /repository/groups/{groupId}/members/create HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| groupId |
integer |
Yes |
The primary key ID of the code group. |
22901 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The enterprise ID. It is a string value that you can obtain from the access URL of Yunxiao, such as https://devops.aliyun.com/organization/[OrganizationId]. |
60de7a6852743a5162b5f957 |
| accessToken |
string |
No |
The personal access token. This parameter is not required if you use an Alibaba Cloud AccessKey pair or Security Token Service (STS) for temporary authorization. |
f0b1e61db5961df5975a93f9129d2513 |
| body |
object |
Yes |
The request body. |
|
| aliyunPks |
string |
Yes |
The Alibaba Cloud account IDs of the group members. You can specify multiple IDs separated by commas (,). |
18745637472884 |
| accessLevel |
integer |
Yes |
The permissions of the member. Valid values:
|
30 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorMessage |
string |
The error message. |
"" |
| errorCode |
string |
The error code. |
Openapi.RequestError |
| success |
boolean |
Indicates whether the call was successful. |
true |
| result |
array<object> |
The list of returned results. Multiple members may be added. |
|
|
object |
The returned result. |
||
| id |
integer |
The Codeup user ID. |
123456 |
| name |
string |
The name of the user. |
codeup |
| username |
string |
The nickname of the user. |
test-codeup |
| state |
string |
The state. Valid values: active and blocked. |
active |
| avatarUrl |
string |
The URL of the avatar. |
https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100 |
|
string |
The email address of the user. |
username@example.com |
|
| accessLevel |
integer |
The permissions of the member. Valid values:
|
30 |
| sourceId |
integer |
The source ID, which refers to the ID of the code repository or code group. |
223241 |
Examples
Success response
JSON format
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorMessage": "\"\"",
"errorCode": "Openapi.RequestError",
"success": true,
"result": [
{
"id": 123456,
"name": "codeup",
"username": "test-codeup",
"state": "active",
"avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
"email": "username@example.com",
"accessLevel": 30,
"sourceId": 223241
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.