import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demo-config"
payload = {
"database": True,
"env": [
{
"name": "<string>",
"secret": True,
"value": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({database: true, env: [{name: '<string>', secret: true, value: '<string>'}]})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/demo-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/demo-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"database": true,
"env": [
{
"name": "<string>",
"secret": true,
"value": "<string>"
}
]
}
'{
"database": true,
"env": [
{
"name": "<string>",
"secret": true,
"value": "<string>"
}
],
"protected": true,
"protected_username": "<string>",
"generated_password": "<string>",
"base_stack": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>"
},
"database_extensions": [
"<string>"
],
"migrate_command": "<string>",
"stack_profile": {
"enabled": true,
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parameters": [
{
"name": "<string>",
"value": "<string>"
}
],
"profile_name": "<string>",
"version": 123
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update an application's demo configuration
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demo-config"
payload = {
"database": True,
"env": [
{
"name": "<string>",
"secret": True,
"value": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({database: true, env: [{name: '<string>', secret: true, value: '<string>'}]})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/demo-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/demo-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"database": true,
"env": [
{
"name": "<string>",
"secret": true,
"value": "<string>"
}
]
}
'{
"database": true,
"env": [
{
"name": "<string>",
"secret": true,
"value": "<string>"
}
],
"protected": true,
"protected_username": "<string>",
"generated_password": "<string>",
"base_stack": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>"
},
"database_extensions": [
"<string>"
],
"migrate_command": "<string>",
"stack_profile": {
"enabled": true,
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parameters": [
{
"name": "<string>",
"value": "<string>"
}
],
"profile_name": "<string>",
"version": 123
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
The application's saved demo defaults, served and accepted by GET/PUT demo-config. On PUT, env and database are replaced wholesale; stack_profile, base_stack, migrate_command, and database_extensions are written only when their key is present in the body (absent preserves the stored value, explicit null/empty clears it).
Whether every demo of this application launches behind Ankra's edge password guard (a Traefik basicAuth middleware on the preview ingress). On PUT, written only when the body carries the key: turning it on mints one shared credential, the answer to that PUT carries generated_password, and Ankra keeps it so POST demo-config/protection/reveal can answer it again; turning it off clears it.
Response
The saved configuration after the write
The application's saved demo defaults, served and accepted by GET/PUT demo-config. On PUT, env and database are replaced wholesale; stack_profile, base_stack, migrate_command, and database_extensions are written only when their key is present in the body (absent preserves the stored value, explicit null/empty clears it).
Whether every demo of this application launches behind Ankra's edge password guard (a Traefik basicAuth middleware on the preview ingress). On PUT, written only when the body carries the key: turning it on mints one shared credential, the answer to that PUT carries generated_password, and Ankra keeps it so POST demo-config/protection/reveal can answer it again; turning it off clears it.