Adopt Stack Profile Endpoint
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 Stack Profile Endpoint
POST
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
stacks
/
adopt-profile
Adopt Stack Profile Endpoint
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Name of the stack already deployed on this cluster.
Non-secret parameter bindings recorded on the deployment and carried forward by a later rollout.
Show child attributes
Show child attributes
Published version the stack is recorded at. Defaults to the profile's current version.
Response
Successful Response
Show child attributes
Show child attributes
True when the stack was already a deployment of this profile and the adoption only moved the recorded version.