Adopt a stack into a stack profile
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile"
payload = {
"profile_id": "<string>",
"stack_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({profile_id: '<string>', stack_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile', 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/adopt-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"stack_name": "<string>"
}
'{
"current_version": 123,
"drift": {
"only_in_version": [
"<string>"
],
"only_on_cluster": [
"<string>"
]
},
"outdated": true,
"profile_version": 123,
"retracked": true,
"stack_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Imported Clusters
Adopt a stack into a stack profile
Records a stack the cluster already runs as a deployment of a stack profile version, so later profile rollouts can track it. Only the profile link is written: nothing is deployed or changed on the cluster. Requires stacks.write; the response lists the add-ons and manifests that differ between the live stack and the profile version.
POST
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
stacks
/
adopt-profile
Adopt a stack into a stack profile
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile"
payload = {
"profile_id": "<string>",
"stack_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({profile_id: '<string>', stack_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile', 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/adopt-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"stack_name": "<string>"
}
'{
"current_version": 123,
"drift": {
"only_in_version": [
"<string>"
],
"only_on_cluster": [
"<string>"
]
},
"outdated": true,
"profile_version": 123,
"retracked": true,
"stack_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Response
Successful Response