Skip to main content
PATCH
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
stacks
/
{stack_name}
Update Cluster Stack Partial Endpoint
import requests

url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}"

payload = { "spec": {
        "git_repository": {
            "credential_name": "<string>",
            "branch": "<string>",
            "repository": "<string>",
            "provider": "github"
        },
        "prometheus_metrics": {
            "endpoint": "<string>",
            "credential_name": "<string>"
        },
        "prometheus_credential": {
            "name": "<string>",
            "username": "<string>",
            "password": "<string>",
            "token": "<string>"
        },
        "stacks": [],
        "kubernetes": { "version": "0.0.0" },
        "provider": "imported",
        "argo_cd": {
            "namespace": "<string>",
            "version": "<string>"
        }
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "stack_name": "<string>",
  "errors": [],
  "commit_sha": "<string>",
  "commit_url": "<string>",
  "operation_id": "<string>",
  "job_count": 0,
  "settings_only_count": 0,
  "noop_count": 0
}

Documentation Index

Fetch the complete documentation index at: https://docs.ankra.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Path Parameters

cluster_id
string<uuid4>
required
stack_name
string
required

Body

application/json
spec
ResourceSpecification · object
required
resource_version
string | null
partial_stack
boolean
default:false
draft_id
string<uuid4> | null

Response

Successful Response

stack_name
string
required
errors
ResourceError · object[]
commit_sha
string | null
commit_url
string | null
operation_id
string<uuid4> | null
job_count
integer
default:0
settings_only_count
integer
default:0
noop_count
integer
default:0