Skip to content
GET /v1/repo/branches

Branches

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/bitbucket-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/bitbucket-api/v1/repo/branches" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bitbucket-api/v1/repo/branches", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bitbucket-api/v1/repo/branches");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/bitbucket-api/v1/repo/branches",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "next": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/refs/branches?pagelen=30&page=2",
        "page": 1,
        "size": 49,
        "values": [
            {
                "name": "3.1.x",
                "type": "branch",
                "links": {
                    "html": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/branch/3.1.x"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/refs/branches/3.1.x"
                    },
                    "commits": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commits/3.1.x"
                    },
                    "pullrequest_create": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/pull-requests/new?source=3.1.x&t=1"
                    }
                },
                "target": {
                    "date": "2024-10-08T09:47:34+00:00",
                    "hash": "8a22ad22211b98ff76223ca298c642230468cbd3",
                    "type": "commit",
                    "links": {
                        "diff": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/diff/8a22ad22211b98ff76223ca298c642230468cbd3"
                        },
                        "html": {
                            "href": "https://bitbucket.org/atlassian/atlassian-event/commits/8a22ad22211b98ff76223ca298c642230468cbd3"
                        },
                        "self": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commit/8a22ad22211b98ff76223ca298c642230468cbd3"
                        },
                        "patch": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/patch/8a22ad22211b98ff76223ca298c642230468cbd3"
                        },
                        "approve": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commit/8a22ad22211b98ff76223ca298c642230468cbd3/approve"
                        },
                        "comments": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commit/8a22ad22211b98ff76223ca298c642230468cbd3/comments"
                        },
                        "statuses": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commit/8a22ad22211b98ff76223ca298c642230468cbd3/statuses"
                        }
                    },
                    "author": {
                        "raw": "codeformatter <>",
                        "type": "author"
                    },
                    "message": "Update .editorconfig file\n",
              
…