Get the recorded test timings of a repository's stage
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/pipeline-tests/timings"
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/pipeline-repositories/{repository_id}/pipeline-tests/timings', 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/pipeline-repositories/{repository_id}/pipeline-tests/timings \
--header 'Authorization: Bearer <token>'{
"stage": "<string>",
"branch": "<string>",
"group_by": "file",
"runs_sampled": 1,
"is_partial": true,
"entries": [
{
"file": "<string>",
"suite": "<string>",
"name": "<string>",
"test_key": "<string>",
"duration_ms": 1,
"samples": 2
}
]
}Pipelines
Get the recorded test timings of a repository's stage
The mean recorded duration of each file or test of one stage across the newest runs of a branch, for a sharding script to balance by. Requires pipelines.read. Read-only.
GET
/
api
/
v1
/
org
/
pipeline-repositories
/
{repository_id}
/
pipeline-tests
/
timings
Get the recorded test timings of a repository's stage
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/pipeline-tests/timings"
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/pipeline-repositories/{repository_id}/pipeline-tests/timings', 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/pipeline-repositories/{repository_id}/pipeline-tests/timings \
--header 'Authorization: Bearer <token>'{
"stage": "<string>",
"branch": "<string>",
"group_by": "file",
"runs_sampled": 1,
"is_partial": true,
"entries": [
{
"file": "<string>",
"suite": "<string>",
"name": "<string>",
"test_key": "<string>",
"duration_ms": 1,
"samples": 2
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
The stage whose tests to read.
Group by file or by test.
Available options:
file, test 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 stage's test timings.
Available options:
file, test 0 means no recorded data yet: fall back to an even split rather than reading every test as instant.
Required range:
x >= 0Show child attributes
Show child attributes