import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id}"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id} \
--cookie ankra_session={
"request_id": "<string>",
"component": "<string>",
"head_sha": "<string>",
"ref": "<string>",
"reason": "<string>",
"status": "<string>",
"build_id": "<string>",
"claimed_at": "<string>",
"created_at": "<string>"
}{
"detail": "<string>"
}Read a platform build request (browser session)
Read one queued build request. Queueing a build answers with a request id before there is a build to read - the build row is created when the scheduler claims the request - so this is how a caller follows that gap: status is pending until the claim, and build_id names the build from then on. Answers 404 for every organisation without the platform_builds flag. Browser session authentication.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id}"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id} \
--cookie ankra_session={
"request_id": "<string>",
"component": "<string>",
"head_sha": "<string>",
"ref": "<string>",
"reason": "<string>",
"status": "<string>",
"build_id": "<string>",
"claimed_at": "<string>",
"created_at": "<string>"
}{
"detail": "<string>"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Response
Successful Response
Why the build was asked for: first_onboard, push, retry or demo.
pending until the scheduler claims the request, then claimed, then done; cancelled if it was withdrawn before a builder took it.
The build this request was claimed into; null while the request is still pending. Read it at /org/applications/{application_id}/builds/{build_id}.
When a builder claimed the request; null while it is still pending.