Get a test's history on an application branch
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-tests/history"
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-tests/history', 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-tests/history \
--header 'Authorization: Bearer <token>'{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"branch": "<string>",
"observed": 1,
"flaky": 1,
"failed": 1,
"flaky_rate": 0.5,
"failure_rate": 0.5,
"entries": [
{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_number": 123,
"head_sha": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"recorded_at": "2023-11-07T05:31:56Z"
}
]
}Pipelines
Get a test's history on an application branch
One test’s outcome in the newest runs of a branch that recorded it, and its flaky and failure rates over them. Requires pipelines.read. Read-only.
GET
/
api
/
v1
/
org
/
applications
/
{application_id}
/
pipeline-tests
/
history
Get a test's history on an application branch
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-tests/history"
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-tests/history', 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-tests/history \
--header 'Authorization: Bearer <token>'{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"branch": "<string>",
"observed": 1,
"flaky": 1,
"failed": 1,
"flaky_rate": 0.5,
"failure_rate": 0.5,
"entries": [
{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_number": 123,
"head_sha": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"recorded_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
The test_key a run's test results name.
Pattern:
^[0-9a-fA-F]{64}$The branch to read; the repository's default branch when omitted.
Maximum string length:
255How many of the branch's newest runs to read.
Required range:
1 <= x <= 100Response
The test's history.
Runs in which the test ran (every entry but a skip).
Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0flaky / observed; null when the test ran in none of the runs read.
Required range:
0 <= x <= 1failed / observed; null when the test ran in none of the runs read.
Required range:
0 <= x <= 1Show child attributes
Show child attributes