Get an application run's test environments
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/test-environments"
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/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/test-environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/test-environments \
--header 'Authorization: Bearer <token>'{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"axes": [
"<string>"
],
"summary": {
"total": 1,
"passed": 1,
"failed": 1,
"errored": 1,
"cancelled": 1,
"timed_out": 1,
"running": 1,
"queued": 1,
"torn_down": 1,
"verdict": "passed"
},
"environments": [
{
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_key": "<string>",
"stage": "<string>",
"attempt": 123,
"matrix": {},
"kubernetes_version": "<string>",
"postgres_version": "<string>",
"provider": "<string>",
"plan": "<string>",
"status": "queued",
"result": "passed",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"test_log_tail": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"concluded_at": "2023-11-07T05:31:56Z",
"destroyed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"duration_seconds": 123
}
]
}Pipelines
Get an application run's test environments
The same test environment grid addressed by application. The Kubernetes x PostgreSQL grid of a run’s kind: environment stages: one entry per matrix leg at its newest attempt, with the ephemeral cluster Ankra built for it, its lifecycle status (queued, provisioning, deploying, testing, held, tearing_down, destroyed), its result once it has one, and a summary with the run’s verdict. A leg Ankra has not begun yet (the organisation is at its cap of live test environments) reads queued with a null result. Requires pipelines.read. Read-only.
GET
/
api
/
v1
/
org
/
applications
/
{application_id}
/
pipeline-runs
/
{run_id}
/
test-environments
Get an application run's test environments
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/test-environments"
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/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/test-environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/test-environments \
--header 'Authorization: Bearer <token>'{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"axes": [
"<string>"
],
"summary": {
"total": 1,
"passed": 1,
"failed": 1,
"errored": 1,
"cancelled": 1,
"timed_out": 1,
"running": 1,
"queued": 1,
"torn_down": 1,
"verdict": "passed"
},
"environments": [
{
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_key": "<string>",
"stage": "<string>",
"attempt": 123,
"matrix": {},
"kubernetes_version": "<string>",
"postgres_version": "<string>",
"provider": "<string>",
"plan": "<string>",
"status": "queued",
"result": "passed",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"test_log_tail": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"concluded_at": "2023-11-07T05:31:56Z",
"destroyed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"duration_seconds": 123
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The run's test environment legs.