Obtaining the List of Changed Files
Function
Obtains the list of changed files.
URI
GET /v2/repositories/{repository_id}/merge-requests/{merge_request_iid}/changes-trees
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_id |
Yes |
String |
Explanation: Repository short ID. Constraints: Mandatory Range: 0-2147483647 Default value: None |
merge_request_iid |
No |
Integer |
Explanation: Short ID of the merge request. Constraints: Mandatory Range: 0-2147483647 Default value: None |
view |
No |
String |
Explanation: Short ID of the merge request. Constraints: None Range: simple Default value: None |
commit_id |
No |
String |
Explanation: Commit ID Constraints: None Range: None Default value: None |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token. Constraints: Mandatory Range: 1–100,000 characters. Default value: None |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Object Error |
Response error. |
result |
MergeChangesTreesDto object |
Explanation: Response result. |
status |
String |
Explanation: Response status of the API. Range:
|
Parameter |
Type |
Description |
---|---|---|
code |
String |
Explanation: Error code returned when the API fails to be called. Range:
|
message |
String |
Explanation: Error message returned when the API fails to be called. Range:
|
Parameter |
Type |
Description |
---|---|---|
tree |
MergeChangesTrees objects |
Explanation: File tree. |
Parameter |
Type |
Description |
---|---|---|
title |
String |
Explanation: Segment path. |
level |
Integer |
Explanation: Path level. |
file_path |
String |
Explanation: Full path of the current level. |
file_type |
String |
Explanation: File type |
Example Requests
GET https://{endpoint}/v2/repositories/{repository_id}/merge-requests/{merge_request_iid}/changes-trees
Example Response
Status code: 200
{ "result": { "tree": [{ "title": "qwdasasdfasd", "level": 1, "file_path": "qwdasasdfasd", "file_type": "file" }] }, "status": "success" }
Status code
Status Code |
Description |
---|---|
200 |
OK |
Error code.
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.