import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/clone"
payload = { "target_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({target_cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/clone \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"target_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"copied_secrets": [
"<string>"
],
"inherited_secrets": [
"<string>"
],
"installation_id": "<string>",
"message": "<string>",
"operation_id": "<string>",
"source_cluster_id": "<string>",
"status": "<string>",
"suppressed_secrets": [
"<string>"
],
"environment_id": "<string>",
"warnings": [
"<string>"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}Clone an application environment onto another cluster (browser session)
Clones one environment of the application onto another cluster: the same image, deploy mode and accepted deploy options (replicas, resources, ports, every option but the addresses), queued as a deploy. Hostnames are claimed organisation-wide, so the copy keeps the target’s own address or derives a fresh one. A cluster the application already runs on is overwritten in place. With include_secrets the source’s own secret overrides are re-written under the target’s Vault path, its suppressions are copied, and the target’s other overrides return to the shared value; only key names are returned and each one is audited. environment_id is a stored environment id or the cluster id an unnamed environment is known by. Held to the applications.deploy permission, and applications.write as well when secrets are included.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/clone"
payload = { "target_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({target_cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/clone \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"target_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"copied_secrets": [
"<string>"
],
"inherited_secrets": [
"<string>"
],
"installation_id": "<string>",
"message": "<string>",
"operation_id": "<string>",
"source_cluster_id": "<string>",
"status": "<string>",
"suppressed_secrets": [
"<string>"
],
"environment_id": "<string>",
"warnings": [
"<string>"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Body
Response
The deploy the clone queued and the secret keys it wrote.
Override keys written to the target.
Target override keys returned to the shared value.
Keys suppressed on the target, as on the source.