Updates the permission of a code group member.
Service endpoints and authorization
- Get a service endpoint: Replace {domain} in the API request syntax.
- Get a personal access token.
|
Product |
Resource |
Required permission |
|
Codeup |
member |
Read/Write |
Request syntax
Region edition
PUT https://{domain}/oapi/v1/codeup/groups/{groupId}/members/{userId}
Request headers
|
Header |
Type |
Required |
Description |
Example |
|
x-yunxiao-token |
string |
Yes |
Your personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example |
|
groupId |
string |
path |
Yes |
The code group ID or the URL-encoded full path of the code group. |
2813489 or 60de7a6852743a5162b5f957%2FDemoGroup |
|
userId |
string |
path |
Yes |
The Alibaba Cloud DevOps user ID. |
62c795xxxb468af8 |
|
accessLevel |
integer |
query |
Yes |
The access level. Valid values: 20 (Viewer), 30 (Developer), and 40 (Repository administrator). |
30 |
|
expiresAt |
string |
query |
No |
The expiration date in yyyy-MM-dd format. |
2024-10-05 |
Request examples
Region edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/codeup/groups/2813489/members/62c795xxxb468af8?accessLevel=30&expiresAt=2024-10-05' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example |
| - |
object |
The response object. |
|
| accessLevel |
integer |
The access level of the member. Valid values: 20 (Viewer), 30 (Developer), and 40 (Administrator). |
30 |
| avatarUrl |
string |
The URL of the user's avatar. |
https://example/example/w/100/h/100 |
| expiresAt |
string |
The expiration timestamp. |
2024-10-05T15:30:45Z |
| id |
integer |
The internal ID of the member entry. |
2813489 |
| inheritedGroup |
object |
The code group from which the permission is inherited. Null if the member was added directly to the current group. |
|
| avatarUrl |
string |
The URL of the group's avatar. |
https://example/example/w/100/h/100 |
| fullPath |
string |
The full path of the group. |
60de7a6852743a5162b5f957/parent-group |
| id |
integer |
The ID of the group. |
1 |
| kind |
string |
The resource type. Typically |
group |
| name |
string |
The name of the group. |
ParentGroup |
| nameWithNamespace |
string |
The name of the group, including its namespace path. |
60de7a6852743a5162b5f957 / ParentGroup |
| parentId |
integer |
The ID of the parent group. |
2 |
| path |
string |
The path of the group. |
parent-group |
| pathWithNamespace |
string |
The full path of the group. |
60de7a6852743a5162b5f957/parent-group |
| visibility |
string |
The visibility level. Valid values: |
private |
| webUrl |
string |
The web URL of the group. |
https://example.com/60de7a6852743a5162b5f957/parent-group |
| memberType |
string |
The member type. |
USERS |
| name |
string |
The name of the member. |
codeup-demo |
| state |
string |
The member state. |
active |
| teamId |
string |
The team ID. Populated when membership is granted through a team; |
70d8ddd4-xxxx-xxxx-xxxx-46100efe985e |
| userId |
string |
The Alibaba Cloud DevOps user ID, used for all user-related Codeup API operations. |
62c795xxxb468af8 |
| username |
string |
The username. |
codeup-username |
| webUrl |
string |
The URL of the user's profile page. |
https://example.com/users/codeup-username |
Response example
{
"accessLevel": 30,
"avatarUrl": "https://example/example/w/100/h/100",
"expiresAt": "2024-10-05T15:30:45Z",
"id": 2813489,
"inheritedGroup": {
"avatarUrl": "https://example/example/w/100/h/100",
"fullPath": "60de7a6852743a5162b5f957/parent-group",
"id": 1,
"kind": "group",
"name": "ParentGroup",
"nameWithNamespace": "60de7a6852743a5162b5f957 / ParentGroup",
"parentId": 2,
"path": "parent-group",
"pathWithNamespace": "60de7a6852743a5162b5f957/parent-group",
"visibility": "private",
"webUrl": "https://example.com/60de7a6852743a5162b5f957/parent-group"
},
"memberType": "USERS",
"name": "codeup-demo",
"state": "active",
"teamId": "70d8ddd4-xxxx-xxxx-xxxx-46100efe985e",
"userId": "62c795xxxb468af8",
"username": "codeup-username",
"webUrl": "https://example.com/users/codeup-username"
}
Error codes
See the Error Code Center for a list of API error codes.