robotsnoindex

Bitbucket Cloud v1 APIs are deprecated

Bitbucket Cloud REST API version 1 is deprecated effective 30 June 2018, and were removed from the REST API permanently on 29 April 2019. Read the deprecation notice. Or you can jump right to the version 2.0 REST API documentation.

Temporary support for limited 1.0 API resources

The 2.0 REST API will rely on the Atlassian Cloud Admin API for user and group management, but those API endpoints are not yet available. Until the Atlassian platform services are fully available in Bitbucket we will continue to support these 1.0 REST endpoints:

1.0 Response Formats

To use the Bitbucket Cloud Version 1 REST API, your application makes an HTTP request and parses the response. By default, the response format is JSON. If you wish, you can use the '?format=' query string parameter to override this behavior and receive XML or YAML instead. For example, use following query string to receive output in YAML:

?format=yaml

You can also use the '?callback=' query string parameter with the name of a function to receive a response via JSONP. For example:

?callback=myJSfunc

A Bitbucket Cloud response always includes a response header containing one of the following response codes:

CodeDescription
200 OKReturned on success. For a GET method, the response contains an entity corresponding to the requested resource. For a POST method, the response contains the entity created.
201 CREATEDReturned when a new resource instance is successfully created.
204 NO CONTENTReturned on successful deletion of a resource instance.
400 BAD REQUESTReturned if the caller submits a badly formed request. For example, the caller can receive this return if you forget a required parameter.
401 UNAUTHORIZEDReturned if the call requires authentication and either the credentials provided failed or no credentials were provided.
403 FORBIDDEN

Returned if the caller attempts to make a call or modify a resource for which the caller is not authorized. The request was a valid request, the caller's authentication credentials succeeded but those credentials do not grant the caller permission to access the resource.

404 NOT FOUNDReturned if the specified resource does not exist.

Depending on the call, a response may or may not include a body. Where a body is returned, the individual method documentation shows the expected structure of the returned data in JSON format.

Time zones

Any timestamp returned whose key contains "utc" is in Coordinated Universal Time. All other timestamps are in the local time of Amsterdam. Amsterdam timestamps are now deprecated. If you're using them in your application, please switch to the UTC equivalents.