List commits for revision
These are the repository’s commits. They are paginated and returned
in reverse chronological order, similar to the output of git log.
Like these tools, the DAG can be filtered.
GET /repositories/{workspace}/{repo_slug}/commits/master
Returns all commits on ref master (similar to git log master).
GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master
Returns all commits on ref dev or foo, except those that are reachable on
master (similar to git log dev foo ^master).
An optional path parameter can be specified that will limit the
results to commits that affect that path. path can either be a file
or a directory. If a directory is specified, commits are returned that
have modified any file in the directory tree rooted by path. It is
important to note that if the path parameter is specified, the commits
returned by this endpoint may no longer be a DAG, parent commits that
do not modify the path will be omitted from the response.
GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master
Returns all commits that are on refs dev or foo or bar, but not on master
that changed the file README.md.
GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master
Returns all commits that are on refs dev or foo, but not on master
that changed to a file in any file in the directory src or its children.
Because the response could include a very large number of commits, it is paginated. Follow the ‘next’ link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links.
When the include and exclude parameters are more than can fit in a
query string, clients can use a x-www-form-urlencoded POST instead.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.
A commit SHA1 or ref name.
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.
Responses
Section titled “ Responses ”A paginated list of commits
A paginated list of commits.
object
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.
Page number of the current results. This is an optional element that is not provided in all responses.
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.
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.
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.
object
object
The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
Example
{ "values": [ { "summary": { "markup": "markdown" } } ]}If the specified revision does not exist.
Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.
object
object
Optional structured data that is endpoint-specific.
object
Example generated
{ "type": "example", "error": { "message": "example", "detail": "example", "data": {} }}