List branches and tags
Changed onReturns the branches and tags in the repository.
By default, results will be in the order the underlying source control system returns them and identical to the ordering one sees when running "$ git show-ref". Note that this follows simple lexical ordering of the ref names.
This can be undesirable as it does apply any natural sorting semantics, meaning for instance that refs are sorted ["branch1", "branch10", "branch2", "v10", "v11", "v9"] instead of ["branch1", "branch2", "branch10", "v9", "v10", "v11"].
Sorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name, Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.
Request
- Base URLhttps://api.bitbucket.org/2.0
- URLhttps://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs
- Auth
- OAuth 2Authorization code: https://bitbucket.org/site/oauth2/authorizeToken URL: https://bitbucket.org/site/oauth2/access_token scopes: repository
- or HTTP basic
- or API key in header Authorization
Query parameters
Query string to narrow down the response as per filtering and sorting.
Field by which the results should be sorted as per filtering and sorting. The name field is handled specially for refs in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2'].
Response
A paginated list of refs matching any filter criteria that were provided.
Changes
- warning
removed the optional property
////////////from the response with the status - warning
removed the optional property
/////////from the response with the status - info
added the optional property
////////to the response with the status
- warning