Get an application's merge train
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train"
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}/merge-train', 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}/merge-train \
--header 'Authorization: Bearer <token>'{
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {
"enabled": true,
"max_cars": 4
},
"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",
"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",
"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"
}
],
"recent": [
{
"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",
"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",
"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"
}
]
}Pipelines
Get an application's merge train
The repository’s Ankra merge train: whether it is enabled and how many cars it tests at once, the pull requests in it in order with each car’s base, tree and pipeline run, and the most recently settled entries. Addressed by application: the merge train of the pipeline repository the application is connected to. Requires pipelines.read. Read-only.
GET
/
api
/
v1
/
org
/
applications
/
{application_id}
/
merge-train
Get an application's merge train
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train"
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}/merge-train', 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}/merge-train \
--header 'Authorization: Bearer <token>'{
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {
"enabled": true,
"max_cars": 4
},
"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",
"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",
"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"
}
],
"recent": [
{
"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",
"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",
"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"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.