Export a stack profile version as IaC
import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/versions/{version}/iac-export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/versions/{version}/iac-export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/versions/{version}/iac-export \
--header 'Authorization: Bearer <token>'{
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"content_base64": "<string>",
"parameters": [
{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"type": "string",
"required": false,
"default": "<string>",
"enum_values": [
"<string>"
],
"pattern": "<string>",
"group": "<string>",
"resource_kind": "<string>",
"resource_name": "<string>",
"path": "<string>",
"options": [
{
"value": "<string>",
"title": "<string>",
"description": "<string>",
"sets": {}
}
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Stack Profiles
Export a stack profile version as IaC
Renders one version as a base64 ClusterInfrastructureAsCode YAML document plus its parameters, ready for the import routes or a GitOps repository.
GET
/
api
/
v1
/
org
/
stack-profiles
/
{profile_id}
/
versions
/
{version}
/
iac-export
Export a stack profile version as IaC
import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/versions/{version}/iac-export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/versions/{version}/iac-export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/versions/{version}/iac-export \
--header 'Authorization: Bearer <token>'{
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"content_base64": "<string>",
"parameters": [
{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"type": "string",
"required": false,
"default": "<string>",
"enum_values": [
"<string>"
],
"pattern": "<string>",
"group": "<string>",
"resource_kind": "<string>",
"resource_name": "<string>",
"path": "<string>",
"options": [
{
"value": "<string>",
"title": "<string>",
"description": "<string>",
"sets": {}
}
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.