v2
Swagger 2.02026-08-01331211921.0 KBList commits that modified a file
Returns a paginated list of commits that modified the specified file.
Commits are returned in reverse chronological order. This is roughly equivalent to the following commands:
$ git log --follow --date-order <sha> <path>
By default, Bitbucket will follow renames and the path name in the returned entries reflects that. This can be turned off using the ?renames=false query parameter.
Results are returned in descending chronological order by default, and like most endpoints you can filter and sort the response to only provide exactly the data you want.
The example response returns commits made before 2011-05-18 against a file named README.rst. The results are filtered to only return the path and date. This request can be made using:
$ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\
'?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'
In the response you can see that the file was renamed to README.rst by the commit made on 2011-05-16, and was previously named README.txt.
Query parameters
When true, Bitbucket will follow the history of the file across renames (this is the default behavior). This can be turned off by specifying false.
Query string to narrow down the response as per filtering and sorting.
Name of a response property sort the result by as per filtering and sorting.
Response
A paginated list of commits that modified the specified file