curl --request GET \
--url https://api.example.com/api/projects/{projectId}/commits/{commitId}/diff \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"default": true,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"type": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"changes": [
{
"type": "added",
"file": "<unknown>",
"from": "<unknown>",
"to": "<unknown>"
}
],
"stats": {
"filesAdded": 123,
"filesDeleted": 123,
"filesModified": 123,
"totalChanges": 123,
"filesRenamed": 123
},
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"files": [
"<unknown>"
],
"previousCommit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"files": [
"<unknown>"
]
}
}Retrieves the diff (file changes) for a specific commit compared to its previous commit.
curl --request GET \
--url https://api.example.com/api/projects/{projectId}/commits/{commitId}/diff \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"default": true,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"type": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"changes": [
{
"type": "added",
"file": "<unknown>",
"from": "<unknown>",
"to": "<unknown>"
}
],
"stats": {
"filesAdded": 123,
"filesDeleted": 123,
"filesModified": 123,
"totalChanges": 123,
"filesRenamed": 123
},
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"files": [
"<unknown>"
],
"previousCommit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"files": [
"<unknown>"
]
}
}Personal access token is obtained through your profile
Whether to include file content in the response
true, false, True, False, TRUE, FALSE Commit diff with file changes and statistics
Commit diff with file changes and statistics
Commit ID
Commit message
Branch ID
Project ID
ID of user who created the commit
Creation timestamp
Branch the commit belongs to
Show child attributes
List of file changes
Show child attributes
Change statistics
Show child attributes
User who created the commit
Show child attributes
Commit files
Previous commit
Show child attributes
Was this page helpful?