import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/deploy"
payload = { "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({cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/deploy', 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}/deploy \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"installation_id": "<string>",
"operation_id": "<string>",
"status": "<string>",
"message": "<string>",
"warnings": [
"<string>"
],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"image_branch": "<string>",
"rule_has_no_build": true
}{
"detail": "<string>",
"error_code": "environment_name_invalid"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Deploy an application (browser session)
Preserves omitted installation options. reset_inputs deliberately removes named overrides so repository defaults apply. Returns a durable operation identity.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/deploy"
payload = { "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({cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/deploy', 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}/deploy \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"installation_id": "<string>",
"operation_id": "<string>",
"status": "<string>",
"message": "<string>",
"warnings": [
"<string>"
],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"image_branch": "<string>",
"rule_has_no_build": true
}{
"detail": "<string>",
"error_code": "environment_name_invalid"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Body
Name the environment of this deployment. Trimmed; 1 to 100 characters with no control characters. When the deployment in this cluster and namespace already belongs to an environment of that name (ignoring case), the deploy updates it and creates nothing; a follow_branches it carries must then be the environment's own rule, or 422. Otherwise it names a new environment, accepted only on a cluster where the application has no deployment in any namespace and no cluster-scoped secrets, and only when no other environment of the application has the same name ignoring case; otherwise 409 with an error_code. Omitted or null deploys exactly as before, creating no environment.
1 - 100Consent that the deploy sets up the CloudNativePG operator the application's database needs when the cluster has none: Ankra installs its cloudnative-pg platform profile on the cluster before the deploy is queued, and the deploy waits for it. Requires stacks.write on the cluster. Without it the operator is set up only where the environment's autonomy is Ankra runs it; otherwise such a deploy is refused with the set_up_database remedy.
Response
Successful Response
Things the deploy went ahead with anyway that the caller needs to know - today, an application that deploys a database whose backup default could not be armed. Absent when there are none, so a deploy with nothing to say answers exactly what it always did; never a reason the deploy did not start.