Queue a platform build
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/builds"
payload = { "head_sha": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({head_sha: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/builds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/builds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"head_sha": "<string>"
}
'{
"request_id": "<string>",
"build_id": "<string>",
"already_requested": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}applications
Queue a platform build
Ask Ankra to build the application's image on platform infrastructure (the M2 build lane). Idempotent on (component, head_sha) while a request is live: a redelivery, a retry press and a demo request for the same commit converge on one build, and already_requested reports the join. Answers 404 for every organisation without the platform_builds flag - the surface stays invisible during the dark rollout. Browser session authentication with the X-Ankra-CSRF double-submit header; the bearer twin of this route is POST /api/v1/org/applications/{application_id}/builds. Bearer PAT authentication (Authorization: Bearer <token>), with the organisation selected by the token or the X-Ankra-Organisation-Id override. No CSRF header: the double-submit gate belongs to the cookie surface only.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
builds
Queue a platform build
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/builds"
payload = { "head_sha": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({head_sha: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/builds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/builds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"head_sha": "<string>"
}
'{
"request_id": "<string>",
"build_id": "<string>",
"already_requested": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
The commit to build. The queue deduplicates on it, so a request without one has no identity.
The branch or tag the commit came from, as a label - the build is of the commit.
The monorepo component to build; empty for the repository's single application.
Why the platform wants this image: first_onboard, push, retry (the default), or demo.
Response
Successful Response