import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths/resolve"
payload = {
"path": "<string>",
"head_content_hash": "<string>",
"render_content_hash": "<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({
path: '<string>',
head_content_hash: '<string>',
render_content_hash: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths/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/preserved-paths/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"head_content_hash": "<string>",
"render_content_hash": "<string>"
}
'{
"path": "<string>",
"resolution": "git",
"sync_triggered": true,
"message": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Resolve a preserved GitOps path
Records a decision on one preserved file, over the two sides the caller listed: git imports Git’s content into the platform, cluster writes Ankra’s version into Git and makes the file Ankra’s again, none withdraws a decision that has not run yet. The next sync executes a decision; a git decision runs once every preserved file on the cluster has a decision, because the import reads Git at head, and an import the platform refuses (for example one that would lower an add-on’s chart version) records why on the file and clears the decision. Nothing is written to Git by this call. Requires clusters.write on the cluster. Bearer-PAT twin of the browser route of the same name under /org.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths/resolve"
payload = {
"path": "<string>",
"head_content_hash": "<string>",
"render_content_hash": "<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({
path: '<string>',
head_content_hash: '<string>',
render_content_hash: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths/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/preserved-paths/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"head_content_hash": "<string>",
"render_content_hash": "<string>"
}
'{
"path": "<string>",
"resolution": "git",
"sync_triggered": true,
"message": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Body
Full repository path of the preserved file, as the listing names it.
git imports Git's content into the platform; cluster writes Ankra's version into Git; none withdraws a decision that has not run yet, so the file awaits one again.
git, cluster, none The head_content_hash the listing returned. A file that changed in Git since is refused with 409. Not compared for none.
The render_content_hash the listing returned. A file whose Ankra version changed since is refused with 409. Not compared for none.
Response
The decision was recorded, or withdrawn for none.