import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve-resource"
payload = { "resource_key": "<string>" }
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({resource_key: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve-resource', 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-resource \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_key": "<string>"
}
'{
"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 a GitOps conflict
Records the resolution of one open GitOps conflict, named by its resource_key (ankra cluster gitops conflicts resolve <key>). 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 conflict. Without resolution the conflict is cleared undecided and the sync re-evaluates it. Requires clusters.write on the cluster.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve-resource"
payload = { "resource_key": "<string>" }
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({resource_key: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/conflicts/resolve-resource', 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-resource \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_key": "<string>"
}
'{
"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
The resource_key of an open conflict, as the list route returns it.
git keeps the repository's version; cluster keeps the platform's version and pushes it to the repository. Omitted or null clears the conflict undecided.
git, cluster Response
The resolution was recorded (or, without resolution, the conflicts were cleared).