UpdateChangeRequest – Update basic information of a merge request
Updates the basic information of a merge request, such as its title and description.
|
Applicable editions |
Central edition, Region edition |
Endpoints and authorization information
- Obtain the endpoint. Replace {domain} in the API request syntax.
- Obtain a personal access token.
- Obtain the organization ID. Required only for the Central edition. Go to the Basic Information page in the Organization Management console to obtain the organization ID.
|
Product |
Resource |
Required permission |
|
Code Management |
Merge request |
Read and write |
Request syntax
Central edition
PUT https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/changeRequests/{localId}
Region edition
PUT https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/changeRequests/{localId}
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
The personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
organizationId |
string |
path |
|
The organization ID. |
60d54f3daccf2bbd6659f3ad |
|
repositoryId |
string |
path |
Yes |
The repository ID, or the URL-encoded full path of the repository. |
2813489 or 60de7a6852743a5162b5f957%2FDemoRepo |
|
localId |
integer |
path |
Yes |
The sequence number of the merge request in the repository. |
1 |
| - |
object |
body |
No |
|
|
| description |
string |
body |
No |
The description of the merge request. |
new mr description |
| title |
string |
body |
No |
The title of the merge request. |
new mr title |
Request examples
Central edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/changeRequests/1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"description": "new mr description",
"title": "new mr title"
}'
Region edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/codeup/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/changeRequests/1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"description": "new mr description",
"title": "new mr title"
}'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
object |
|
|
| result |
boolean |
Indicates whether the operation was successful. |
true |
Response example
{
"result": true
}
Error codes
For more information, see the error code center.