Get a repository's pipeline run outcomes over time
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/pipeline-outcomes"
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-outcomes', 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-outcomes \
--header 'Authorization: Bearer <token>'{
"window": "24h",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"bucket_seconds": 123,
"totals": {
"runs": 1,
"succeeded": 1,
"failed": 1,
"infra_error": 1,
"timed_out": 1,
"cancelled": 1,
"skipped": 1
},
"buckets": [
{
"runs": 1,
"succeeded": 1,
"failed": 1,
"infra_error": 1,
"timed_out": 1,
"cancelled": 1,
"skipped": 1,
"start": "2023-11-07T05:31:56Z"
}
],
"repositories": [
{
"runs": 1,
"succeeded": 1,
"failed": 1,
"infra_error": 1,
"timed_out": 1,
"cancelled": 1,
"skipped": 1,
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "<string>",
"p95_queue_seconds": 123,
"p95_duration_seconds": 123
}
]
}Pipelines
Get a repository's pipeline run outcomes over time
How one repository’s pipeline runs concluded over the last 24 hours, 7 days or 30 days: per bucket (30 minutes, 3 hours or 12 hours, the same buckets as the CI usage history) and in total, succeeded, failed, infra_error (Ankra failed to run the pipeline, not the pipeline’s own failure), timed_out, cancelled and skipped, with the 95th percentile of how long its runs waited to start and ran. A run counts in the bucket it finished in. The body is PipelineOutcomeHistory with this repository as its only repositories entry, or none when no run concluded in the window. Requires pipelines.read. Read-only.
GET
/
api
/
v1
/
org
/
pipeline-repositories
/
{repository_id}
/
pipeline-outcomes
Get a repository's pipeline run outcomes over time
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/pipeline-outcomes"
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-outcomes', 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-outcomes \
--header 'Authorization: Bearer <token>'{
"window": "24h",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"bucket_seconds": 123,
"totals": {
"runs": 1,
"succeeded": 1,
"failed": 1,
"infra_error": 1,
"timed_out": 1,
"cancelled": 1,
"skipped": 1
},
"buckets": [
{
"runs": 1,
"succeeded": 1,
"failed": 1,
"infra_error": 1,
"timed_out": 1,
"cancelled": 1,
"skipped": 1,
"start": "2023-11-07T05:31:56Z"
}
],
"repositories": [
{
"runs": 1,
"succeeded": 1,
"failed": 1,
"infra_error": 1,
"timed_out": 1,
"cancelled": 1,
"skipped": 1,
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "<string>",
"p95_queue_seconds": 123,
"p95_duration_seconds": 123
}
]
}Authorizations
Query Parameters
Response
The outcomes over the window.
The concluded pipeline runs of every repository the caller may see over a window.