Update Project Member Roles
PUT/api/v5/repos/:owner/:repo/members/:username
Request
Path Parameters
owner stringrequired
Repository space address (address path of the enterprise, organization, or individual)
repo stringrequired
Repository path (path)
username stringrequired
Project member username
Query Parameters
access_token stringrequired
User authorization code
- application/json
Body
permissionstring
Member Permissions: Participant (pull), Developer (push), Maintainer (admin). Default: push, customized (custom role)
role_idstring
Role ID, if "permission" is set to "customized", the role ID must be provided.
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
followers_urlstring
html_urlstring
idstring
loginstring
namestring
typestring
urlstring
permissions object
admininteger
pushinteger
customizedinteger
pullinteger
{
"followers_url": "string",
"html_url": "string",
"id": "string",
"login": "string",
"name": "string",
"type": "string",
"url": "string",
"permissions": {
"admin": 0,
"push": 0,
"customized": 0,
"pull": 0
}
}
{
"followers_url": "https://api-test.gitcode.com/api/v5/users/xiaogang2/followers",
"html_url": "https://test.gitcode.net/xiaogang2",
"id": "65ffca965079ba0d1c00f6f2",
"login": "xiaogang2",
"name": "Xiao Gang 2",
"type": "User",
"url": "https://api-test.gitcode.com/api/v5/xiaogang2",
"permissions": {
"admin": false,
"push": false,
"customized": true,
"pull": false
}
}