import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/fix-build"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/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}/pipeline-runs/{run_id}/fix-build \
--header 'Authorization: Bearer <token>'{
"agent_task": {
"id": "<string>",
"url": "<string>"
},
"outcome": "dispatched",
"summary": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Retry the fix-build mission for a failed pipeline run
Dispatch the fix-build mission for one failed Ankra Pipelines run of the application again: the same mission, evidence and checks the automatic fix loop uses (a setup pull request or pull request run commits the fix to its own branch, a tracked-branch run opens a pull request). Use it after a fix mission ended without the fix. While a fix-build mission for the run’s branch is still running nothing new is dispatched and the answer names that mission (outcome already_running). 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}/pipeline-runs/{run_id}/fix-build"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/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}/pipeline-runs/{run_id}/fix-build \
--header 'Authorization: Bearer <token>'{
"agent_task": {
"id": "<string>",
"url": "<string>"
},
"outcome": "dispatched",
"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.
Response
Successful Response
The fix-build retry answer: whether a new mission was dispatched or one was already running for the run's branch, the mission, and what the person reads.