ListChangeRequestPatchSets - List patch set versions for a merge request
Lists patch set versions for a merge request.
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization information
- Obtain the endpoint: Replace {domain} in the API request syntax.
- Obtain a personal access token.
- Obtain the organizationId: Required only for the Central edition. Go to the Organization Management Console and find the organization ID on the Basic Information page.
|
Product |
Resource |
Required permission |
|
Code Management |
Merge request |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/changeRequests/{localId}/diffs/patches
Region edition
GET https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/changeRequests/{localId}/diffs/patches
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 |
|
organizationId |
string |
path |
|
Organization ID. |
60d54f3daccf2bbd6659f3ad |
|
repositoryId |
string |
path |
Yes |
Repository ID, or the URL-encoded full path. |
2813489 or 60de7a6852743a5162b5f957%2FDemoRepo |
|
localId |
integer |
path |
Yes |
Local ID of the merge request. |
1 |
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489%20or%2060de7a6852743a5162b5f957%2FDemoRepo/changeRequests/1/diffs/patches' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/repositories/2813489%20or%2060de7a6852743a5162b5f957%2FDemoRepo/changeRequests/1/diffs/patches' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
array |
|
|
| - |
object |
|
|
| commitId |
string |
Commit ID of the version. |
45ede4680536406d793e0e629bc771cb9fcaa153 |
| createTime |
string |
Time when the version was created. |
2024-10-05T15:30:45Z |
| patchSetBizId |
string |
Unique ID of the version. |
bf117304dfe44d5d9b1132f348edf92e |
| patchSetName |
string |
Name of the version. |
Version 1 |
| ref |
string |
Ref information of the version. |
null |
| relatedMergeItemType |
string |
Related type. Valid values: MERGE_SOURCE (merge source) and MERGE_TARGET (merge target). |
MERGE_SOURCE |
| shortId |
string |
Short commit ID, typically eight characters. |
45ede468 |
| versionNo |
integer |
Version number. |
1 |
Response example
[
{
"commitId": "45ede4680536406d793e0e629bc771cb9fcaa153",
"createTime": "2024-10-05T15:30:45Z",
"patchSetBizId": "bf117304dfe44d5d9b1132f348edf92e",
"patchSetName": "Version 1",
"ref": "null",
"relatedMergeItemType": "MERGE_SOURCE",
"shortId": "45ede468",
"versionNo": 1
}
]
Error codes
For more information, see the error code center.