Updates the stakeholders of a merge request, including the creator, reviewers, and subscribers.
Endpoint and authorization information
- Get endpoint: replace {domain} in the API request syntax.
- Get personal access token.
|
Product |
Resource |
Required permission |
|
Code management |
Merge request |
Read and write |
Request syntax
Region edition
POST https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/changeRequests/{localId}/person/{type}
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
Personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
repositoryId |
string |
path |
Yes |
Repository ID or URL-encoded full path. |
2813489 or 60de7a6852743a5162b5f957%2FDemoRepo |
|
localId |
integer |
path |
Yes |
Local ID. |
1 |
|
type |
string |
path |
Yes |
The stakeholder type. Valid values: REVIEWER (reviewer) and SUBSCRIBER (subscriber). |
REVIEWER |
| - |
object |
body |
No |
|
|
| userIds |
array[string] |
body |
No |
List of stakeholder user IDs. |
["62c795xxxb468af8"] |
Request examples
Region edition
curl -X 'POST' \
'https://{domain}/oapi/v1/codeup/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/changeRequests/1/person/REVIEWER' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"userIds": ["62c795xxxb468af8"]
}'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
object |
|
|
| result |
boolean |
Whether the operation succeeded. |
true |
Response example
{
"result": true
}
Error codes
For more information about error codes, see Error Code Center.