update_application_demo_config
Replace an Application's saved demo env entries and throwaway-database flag wholesale (the demo pre-setup every future launch inherits). Read the current configuration first and carry existing env entries forward - entries not in this call are dropped. The full-stack stack profile and shared base stack designations are NOT settable here and are preserved untouched: a demo whose database comes from a stack must not have the throwaway Postgres wired over it. Values may reference ${{ ankra.demo_database.* }} placeholders (requires database=true) and ${SECRET_SLOT:} sentinels (kept secret, mounted via a Kubernetes Secret). Affects only demo deployments in TTL-reaped namespaces, never production workloads; running demos pick the change up on their next redeploy_demo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | Yes | The complete demo environment as a name-to-value object (empty object clears it). Values carrying ${SECRET_SLOT:<uuid>} sentinels are stored as secret entries. | |
| routing | No | How a multi-component demo is published on the preview host: which component serves / and where the others are routed. Omit to preserve the saved declaration; pass null to clear it and return every lane to the heuristic. | |
| database | Yes | Provision a throwaway per-demo Postgres on every launch and enable the ${{ ankra.demo_database.* }} placeholders. Required. | |
| protected | No | Switch Ankra's edge password guard for every demo of this application. Omit to preserve the stored setting. Turning it on mints one shared credential (username 'preview') and this call's answer carries generated_password; Ankra also keeps it in its secret store, so a member can copy it again later from the application's previews in the Ankra UI. Turning it off clears the credential and drops the kept copy. Enforced at the ingress by a Traefik basicAuth Middleware, never inside the application, so the staging cluster needs the Traefik ingress: without it a protected launch fails closed rather than publishing open. | |
| application_id | Yes | The Application whose demo configuration to replace. | |
| migrate_command | No | The command that provisions a fresh demo database's schema (for example 'pnpm run db:migrate' or 'alembic upgrade head'). Runs through sh -c in the application image after the database is reachable, with the demo environment exported. Omit to preserve the saved command; pass an empty string to clear it. Requires database=true or a base stack. | |
| database_extensions | No | Postgres extensions the demo database creates at initdb (for example ["vector"]). Plain lowercase identifiers only. Omit to preserve; pass [] to clear. Requires database=true. |