Read a repository's recorded train journeys
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/journeys"
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}/merge-train/journeys', 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}/merge-train/journeys \
--header 'Authorization: Bearer <token>'{
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batches": [
{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_number": 123,
"status": "<string>",
"outcome": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"members": [
{
"entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pull_request_number": 123,
"is_rider": true
}
]
}
],
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pull_request_number": 123,
"pull_request_head_sha": "<string>",
"pull_request_title": "<string>",
"base_branch": "<string>",
"status": "queued",
"position": 123,
"attempt": 123,
"requested_by": "<string>",
"requested_via": "api",
"enqueued_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pull_request_author_login": "<string>",
"pull_request_head_branch": "<string>",
"parent_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_pull_request_number": 123,
"car_branch": "<string>",
"car_base_sha": "<string>",
"car_commit_sha": "<string>",
"car_tree_sha": "<string>",
"predecessor_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pipeline_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tested_by_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tested_by_pull_request_number": 123,
"tested_by_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merge_commit_sha": "<string>",
"merge_tree_matches": true,
"reason": "<string>",
"reason_text": "<string>",
"detail": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
],
"matches": [
{
"kind": "pr_head",
"entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pull_request_number": 123,
"verified_head_sha": "<string>"
}
],
"partial": true,
"source_status": "not_requested"
}Pipelines
Read a repository's recorded train journeys
Read up to 20 recorded batches with their persisted membership. The default listing contains concluded batches. An exact commit or PR lookup also returns active batches and related train entries. The response flags partial history or incomplete source-host coverage. Requires the organisation’s Trains feature and pipelines.read.
GET
/
api
/
v1
/
org
/
pipeline-repositories
/
{repository_id}
/
merge-train
/
journeys
Read a repository's recorded train journeys
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/journeys"
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}/merge-train/journeys', 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}/merge-train/journeys \
--header 'Authorization: Bearer <token>'{
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batches": [
{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_number": 123,
"status": "<string>",
"outcome": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"members": [
{
"entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pull_request_number": 123,
"is_rider": true
}
]
}
],
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pull_request_number": 123,
"pull_request_head_sha": "<string>",
"pull_request_title": "<string>",
"base_branch": "<string>",
"status": "queued",
"position": 123,
"attempt": 123,
"requested_by": "<string>",
"requested_via": "api",
"enqueued_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pull_request_author_login": "<string>",
"pull_request_head_branch": "<string>",
"parent_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_pull_request_number": 123,
"car_branch": "<string>",
"car_base_sha": "<string>",
"car_commit_sha": "<string>",
"car_tree_sha": "<string>",
"predecessor_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pipeline_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tested_by_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tested_by_pull_request_number": 123,
"tested_by_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merge_commit_sha": "<string>",
"merge_tree_matches": true,
"reason": "<string>",
"reason_text": "<string>",
"detail": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
],
"matches": [
{
"kind": "pr_head",
"entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pull_request_number": 123,
"verified_head_sha": "<string>"
}
],
"partial": true,
"source_status": "not_requested"
}Authorizations
Query Parameters
Response
Recorded batch membership and scoped evidence.