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

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spec: {
argo_cd: {namespace: '<string>', version: '<string>'},
git_repository: {
branch: '<string>',
credential_name: '<string>',
repository: '<string>',
provider: 'github'
},
kubernetes: {version: '0.0.0'},
prometheus_credential: {
name: '<string>',
password: '<string>',
token: '<string>',
username: '<string>'
},
prometheus_metrics: {endpoint: '<string>', credential_name: '<string>', flavor: '<string>'},
provider: 'imported',
stacks: []
}
})
};

fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spec": {
"argo_cd": {
"namespace": "<string>",
"version": "<string>"
},
"git_repository": {
"branch": "<string>",
"credential_name": "<string>",
"repository": "<string>",
"provider": "github"
},
"kubernetes": {
"version": "0.0.0"
},
"prometheus_credential": {
"name": "<string>",
"password": "<string>",
"token": "<string>",
"username": "<string>"
},
"prometheus_metrics": {
"endpoint": "<string>",
"credential_name": "<string>",
"flavor": "<string>"
},
"provider": "imported",
"stacks": []
}
}
'
{
  "stack_name": "<string>",
  "commit_sha": "<string>",
  "commit_url": "<string>",
  "errors": [],
  "job_count": 0,
  "noop_count": 0,
  "operation_id": "<string>",
  "settings_only_count": 0
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

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
draft_id
string<uuid4> | null
partial_stack
boolean
default:false
resource_version
string | null

Response

Successful Response

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