Resources Repository Query Commits
Query Commits
Query commits of specified project. Will return list of matching commit hashes
Http Method
GET
End Point
/~api/repositories/{projectId}/commits
Placeholder Description Example
{projectId} Project Id 1
Query Parameters
Parameter Description Required Example
query Syntax of this query is the same as in commits page No since tag(v4.0.0) until tag(v4.7.0)
count Number of commits to return Yes 100
field Fields to return. Unspecified fields will return as null in returned commit object No [ PARENTS , AUTHOR , COMMITTER , COMMIT_DATE , SUBJECT , BODY , FILE_CHANGES , LINE_CHANGES ]
Response
Operation Successful
Status Code
200
Response Body
Content Type
application/json
Example
[ {
"hash" : "string" ,
"subject" : "string" ,
"body" : "string" ,
"commitDate" : "2024-07-07T19:36:19.856+00:00" ,
"committer" : {
"name" : "string" ,
"emailAddress" : "string" ,
"when" : 1 ,
"tzOffset" : 1
}
,
"author" : {
"name" : "string" ,
"emailAddress" : "string" ,
"when" : 1 ,
"tzOffset" : 1
}
,
"parentHashes" : [ "string" ] ,
"fileChanges" : [ {
"oldPath" : "string" ,
"newPath" : "string" ,
"additions" : 1 ,
"deletions" : 1
}
]
}
]
Operation Failed
Status code
Status code other than 200 indicating the error type
Response Body
Error detail of content type "text/plain"
cURL Example
$ curl -u <login name>:<password or access token> -G https://git.codedune.app/~api/repositories/1/commits --data-urlencode 'query=since tag(v4.0.0) until tag(v4.7.0)' --data-urlencode count=100 --data-urlencode field=PARENTS --data-urlencode field=AUTHOR --data-urlencode field=COMMITTER --data-urlencode field=COMMIT_DATE --data-urlencode field=SUBJECT --data-urlencode field=BODY --data-urlencode field=FILE_CHANGES --data-urlencode field=LINE_CHANGES
Please wait...
Page is in error, reload to recover