import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths \
--header 'Authorization: Bearer <token>'{
"preserved_paths": [
{
"path": "<string>",
"head_content": "<string>",
"head_content_hash": "<string>",
"render_content": "<string>",
"render_content_hash": "<string>",
"content_redacted": false,
"content_redacted_reason": "sops_encrypted",
"content_omitted": false,
"head_commit_sha": "<string>",
"detected_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"resolution_choice": "git",
"resolved_at": "2023-11-07T05:31:56Z",
"import_refused_reason": "<string>",
"import_refused_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"truncated": false
}{
"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"
}List preserved GitOps paths
Lists the files Git and the platform are divided on: each was edited in Git, so Ankra keeps Git’s bytes there instead of overwriting them, and the platform’s later changes to it do not reach Git. Every entry carries both sides - withheld, with the reason, for a file that may carry a secret - and any decision already recorded, in path order and capped at 100 entries and a content budget (truncated says when either cap applied). Unlike a GitOps merge conflict a preserved file pauses nothing. 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"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/gitops/preserved-paths \
--header 'Authorization: Bearer <token>'{
"preserved_paths": [
{
"path": "<string>",
"head_content": "<string>",
"head_content_hash": "<string>",
"render_content": "<string>",
"render_content_hash": "<string>",
"content_redacted": false,
"content_redacted_reason": "sops_encrypted",
"content_omitted": false,
"head_commit_sha": "<string>",
"detected_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"resolution_choice": "git",
"resolved_at": "2023-11-07T05:31:56Z",
"import_refused_reason": "<string>",
"import_refused_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"truncated": false
}{
"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
Response
Successful response
The preserved files in path order, at most 100.
Show child attributes
Show child attributes
The number of preserved files on the cluster, including any past the listing's cap.
True when the listing left something out: files past the 100-entry cap (total says how many), or content past the listing's content budget (those entries carry content_omitted).