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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
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).
Show child attributes
Show child attributes
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.
The login a protected demo accepts. Read-only; empty when protection is off.
Present only in the answer to the PUT that turned protection on: the plaintext of the credential just minted. Never stored, never read back; rotate to get a new one.
The shared demo base stack demos of this application depend on; null keeps demos free of shared infrastructure.
Show child attributes
Show child attributes
Postgres extensions the demo database creates at initdb (plain lowercase identifiers, e.g. vector). Requires database=true.
The command that provisions a fresh demo database's schema; runs through sh -c in the application image after the database gate, with the demo environment. Requires database=true or a base stack.
The full-stack demo designation; null keeps demos single-service.
Show child attributes
Show child attributes
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).
Show child attributes
Show child attributes
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.
The login a protected demo accepts. Read-only; empty when protection is off.
Present only in the answer to the PUT that turned protection on: the plaintext of the credential just minted. Never stored, never read back; rotate to get a new one.
The shared demo base stack demos of this application depend on; null keeps demos free of shared infrastructure.
Show child attributes
Show child attributes
Postgres extensions the demo database creates at initdb (plain lowercase identifiers, e.g. vector). Requires database=true.
The command that provisions a fresh demo database's schema; runs through sh -c in the application image after the database gate, with the demo environment. Requires database=true or a base stack.
The full-stack demo designation; null keeps demos single-service.
Show child attributes
Show child attributes