Set an application's merge train settings
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train/settings"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"max_cars": 4
}Pipelines
Set an application's merge train settings
Switches the repository’s merge train on or off and sets how many pull requests it tests at once. Switching it off empties the train: every pull request in it leaves, and its car’s run stops. Addressed by application: the merge train of the pipeline repository the application is connected to. GitHub repositories only. Requires pipelines.manage.
PUT
/
api
/
v1
/
org
/
applications
/
{application_id}
/
merge-train
/
settings
Set an application's merge train settings
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train/settings"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/merge-train/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"max_cars": 4
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json