import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demos/fix-build"
payload = { "branch": "<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({branch: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/demos/fix-build', 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}/demos/fix-build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>"
}
'{
"actions_taken": [
"<string>"
],
"agent_task": {
"id": "<string>",
"url": "<string>"
},
"building": true,
"resolved": true,
"summary": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Fix a branch's demo build
Fix a branch whose demo build is missing: apply the deterministic Ankra-side fixes first (publish-readiness auto-fix, failed-run rerun, failed-setup retry) and, when those cannot produce an image, dispatch a one-shot mission agent that investigates the repository and opens a pull request with the fix. The answer points at the dispatched mission rather than carrying its result, so an unattended caller polls the agent run. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication plus the X-Ankra-CSRF double-submit header).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demos/fix-build"
payload = { "branch": "<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({branch: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/demos/fix-build', 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}/demos/fix-build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>"
}
'{
"actions_taken": [
"<string>"
],
"agent_task": {
"id": "<string>",
"url": "<string>"
},
"building": true,
"resolved": true,
"summary": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
The branch whose demo build is missing; required (an empty branch is a 400).
Response
Successful Response
The fix-build answer: the deterministic actions taken, whether the build is already resolved or building, and the dispatched mission agent when one was needed.
Points the caller at the dispatched mission agent task; the run and transcript appear on the agent detail page once the scheduler picks the task up.
Show child attributes
Show child attributes