import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"cleared_count": 123,
"sync_triggered": true,
"message": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Resolve all GitOps conflicts
Records one resolution for every open GitOps conflict on the cluster (ankra cluster gitops conflicts resolve --all). git keeps the repository’s version and overwrites the platform’s; cluster keeps the platform’s version and pushes it back to the repository. The call triggers a sync, which applies the choice and clears the conflicts. Without resolution the conflicts are cleared undecided and the sync re-evaluates them, recording again any that still conflict. Requires clusters.write on the cluster.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"cleared_count": 123,
"sync_triggered": true,
"message": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Body
git keeps the repository's version; cluster keeps the platform's version and pushes it to the repository. Omitted or null clears the conflicts undecided.
git, cluster Response
The resolution was recorded (or, without resolution, the conflicts were cleared).