import requests
url = "https://platform.ankra.app/api/v1/org/applications/settings"
payload = {
"ci_runner_label": "<string>",
"auto_merge_setup_pull_requests": 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({ci_runner_label: '<string>', auto_merge_setup_pull_requests: true})
};
fetch('https://platform.ankra.app/api/v1/org/applications/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/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ci_runner_label": "<string>",
"auto_merge_setup_pull_requests": true
}
'{
"ci_runner_label": "<string>",
"is_default": true,
"updated_at": "<string>",
"auto_merge_setup_pull_requests": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Set the organisation's CI runner label
Set the organisation’s application CI settings. Organisation admins only. ci_runner_label is the GitHub Actions runner label generated pipelines run on, validated rather than accepted as free text: one label of at most 64 characters, starting and ending with a letter or digit, containing only letters, digits, ’-’, ’_’ and ’.’ (for example ubuntu-latest, depot-ubuntu-24.04, self-hosted). Anything else answers 400 - a label outside that grammar produces a workflow GitHub cannot parse or run, and the generators concatenate it into a YAML scalar. An explicit null clears the choice and puts every future generation back on the default. auto_merge_setup_pull_requests opts the organisation into the platform merging an application’s setup pull request itself once the PR’s checks pass (squash; branch protection is honoured, never forced). Each member only moves when named: an absent member leaves the stored value untouched, and a body naming neither answers 422. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication plus the X-Ankra-CSRF double-submit header).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/settings"
payload = {
"ci_runner_label": "<string>",
"auto_merge_setup_pull_requests": 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({ci_runner_label: '<string>', auto_merge_setup_pull_requests: true})
};
fetch('https://platform.ankra.app/api/v1/org/applications/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/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ci_runner_label": "<string>",
"auto_merge_setup_pull_requests": true
}
'{
"ci_runner_label": "<string>",
"is_default": true,
"updated_at": "<string>",
"auto_merge_setup_pull_requests": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
At least one member must be present; an absent member leaves the stored value untouched. An explicit null ci_runner_label clears the organisation's choice. auto_merge_setup_pull_requests is a plain boolean (an organisation admin's opt-in to auto-merging setup pull requests whose checks pass).
Response
Successful Response
The organisation's application CI settings. ci_runner_label is the runs-on value generated pipelines carry; is_default reports that the organisation has never chosen one, so the label is Ankra's default rather than a decision - a build that never starts reads very differently under the two. auto_merge_setup_pull_requests is the organisation's opt-in to letting the platform merge an application's setup pull request itself once the PR's checks pass (default false).