Set an application's setup pull request auto-merge setting
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/auto-merge-setup-pull-requests"
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}/auto-merge-setup-pull-requests', 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}/auto-merge-setup-pull-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"organisation_enabled": true,
"effective": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Applications
Set an application's setup pull request auto-merge setting
Set whether Ankra may merge this application’s setup pull requests on its own: true or false is the application’s own answer and wins over its organisation’s setting either way, and null clears it so the application follows its organisation again. Read fresh on every merge decision, so it needs no redeploy. Organisation administrators only. 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).
PUT
/
api
/
v1
/
org
/
applications
/
{application_id}
/
auto-merge-setup-pull-requests
Set an application's setup pull request auto-merge setting
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/auto-merge-setup-pull-requests"
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}/auto-merge-setup-pull-requests', 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}/auto-merge-setup-pull-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"organisation_enabled": true,
"effective": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Response
Successful Response
An application's setup pull request auto-merge setting: its own answer, its organisation's, and the effective one the merge acts on.