Rename a cluster stack
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}/rename-stack"
payload = { "new_name": "<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({new_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}/rename-stack', 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/imported/{cluster_id}/stacks/{stack_name}/rename-stack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"new_name": "<string>"
}
'{
"new_name": "<string>",
"commit_sha": "<string>",
"commit_url": "<string>",
"success": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Imported Clusters
Rename a cluster stack
Renames a stack on the cluster and commits the change to the cluster’s GitOps repository when one is connected. Answers 409 while the stack has unpublished drafts, when the new name is taken, or while a managed service that has not been retired owns the stack. Requires stacks.write on the cluster; a caller without it is refused with 403.
POST
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
stacks
/
{stack_name}
/
rename-stack
Rename a cluster stack
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}/rename-stack"
payload = { "new_name": "<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({new_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}/rename-stack', 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/imported/{cluster_id}/stacks/{stack_name}/rename-stack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"new_name": "<string>"
}
'{
"new_name": "<string>",
"commit_sha": "<string>",
"commit_url": "<string>",
"success": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"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