Resolve a preserved GitOps path
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"
}Clusters
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.
POST
/
api
/
v1
/
org
/
clusters
/
{cluster_id}
/
gitops
/
preserved-paths
/
resolve
Resolve a preserved GitOps path
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
Body
application/json
Response
The decision was recorded, or withdrawn for none.