import requests
url = "https://platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id}"
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/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://platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id} \
--header 'Authorization: Bearer <token>'{
"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
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://platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id}"
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/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://platform.ankra.app/org/applications/{application_id}/builds/requests/{request_id} \
--header 'Authorization: Bearer <token>'{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.