List an application's repository branches
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/branches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/branches \
--header 'Authorization: Bearer <token>'{
"branches": [
{
"name": "<string>",
"head_sha": "<string>",
"is_default": true,
"is_configured": true
}
],
"configured_branch": "<string>",
"default_branch": "<string>",
"error": "<string>"
}Applications
List an application's repository branches
The branches of the application’s repository, marking the default branch and the one the application is configured to build. A repository the platform cannot read answers 200 with error set.
GET
/
api
/
v1
/
org
/
applications
/
{application_id}
/
branches
List an application's repository branches
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/branches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/branches \
--header 'Authorization: Bearer <token>'{
"branches": [
{
"name": "<string>",
"head_sha": "<string>",
"is_default": true,
"is_configured": true
}
],
"configured_branch": "<string>",
"default_branch": "<string>",
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The application's id.