action bitbucket_get_repositories_workspace_repo_slug_filehistory_commit_path { label: "List commits that modified a file" description: "Returns a paginated list of commits that modified the specified file.\n\nCommits are returned in reverse chronological order. This is roughly\nequivalent to the following commands:\n\n $ git log --follow --date-order \n\nBy default, Bitbucket will follow renames and the path name in the\nreturned entries reflects that. This can be turned off using the\n`?renames=false` query parameter.\n\nResults are returned in descending chronological order by default, and\nlike most endpoints you can\n[filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to\nonly provide exactly the data you want.\n\nFor example, if you wanted to find commits made before 2011-05-18\nagainst a file named `README.rst`, but you only wanted the path and\ndate, your query would look like this:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\\\n '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'\n{\n \"values\": [\n {\n \"commit\": {\n \"date\": \"2011-05-17T07:32:09+00:00\"\n },\n \"path\": \"README.rst\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:33:28+00:00\"\n },\n \"path\": \"README.txt\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:15:39+00:00\"\n },\n \"path\": \"README.txt\"\n }\n ]\n}\n```\n\nIn the response you can see that the file was renamed to `README.rst`\nby the commit made on 2011-05-16, and was previously named `README.txt`." provider: bitbucket method: GET path: "/repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}" encoding: json input: { type: "object" properties: { q: { type: "string" } renames: { type: "string" } sort: { type: "string" } } additionalProperties: false } output: { type: "object" description: "A paginated list of commit_file objects." properties: { next: { type: "string" format: "uri" description: "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." } page: { type: "integer" description: "Page number of the current results. This is an optional element that is not provided in all responses." } pagelen: { type: "integer" description: "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." } previous: { type: "string" format: "uri" description: "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." } size: { type: "integer" description: "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." } values: { type: "array" items: { type: "object" description: "A file object, representing a file at a commit in a repository" required: ["type"] properties: { attributes: { type: "string" enum: ["link", "executable", "subrepository", "binary", "lfs"] } commit: { type: "object" } escaped_path: { type: "string" description: "The escaped version of the path as it appears in a diff. If the path does not require escaping this will be the same as path." } path: { type: "string" description: "The path in the repository" } type: { type: "string" } } } } } additionalProperties: false } }