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>"
}
]
}Imported Clusters
Update Cluster Stack Partial Endpoint
Surgical partial update of a stack’s addons/manifests.
Accepts the same body as the web UI endpoint. Callers must set partial_stack=true to merge-update (vs replace) the named stack.
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
⌘I