/v1/repo/branches
Branches
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
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_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo 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",
…