> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a demo base stack

> Change the mutable designation of a demo base stack: profile, profile version, parameters, and idle TTL. The name (and thus the namespace) is immutable and ignored here; an omitted profile_id keeps the current profile. Changes are refused while the stack is deploying or deleting, and take effect on the next materialisation. Organisation-admin only; browser session authentication with the X-Ankra-CSRF double-submit header (no bearer twin).



## OpenAPI

````yaml https://platform.ankra.app/openapi.json put /org/ai-environment/demo-base-stacks/{base_stack_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /org/ai-environment/demo-base-stacks/{base_stack_id}:
    put:
      tags:
        - AI Environment
      summary: Update a demo base stack
      description: >-
        Change the mutable designation of a demo base stack: profile, profile
        version, parameters, and idle TTL. The name (and thus the namespace) is
        immutable and ignored here; an omitted profile_id keeps the current
        profile. Changes are refused while the stack is deploying or deleting,
        and take effect on the next materialisation. Organisation-admin only;
        browser session authentication with the X-Ankra-CSRF double-submit
        header (no bearer twin).
      operationId: update_demo_base_stack
      parameters:
        - in: path
          name: base_stack_id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DemoBaseStackUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoBaseStack'
          description: The base stack after the write
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: >-
            Validation failure: the stack is currently deploying or deleting,
            the idle TTL is outside 1-720 hours, or the profile binding does not
            validate
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: >-
            "Only organisation admins can change demo base stacks." (or a CSRF
            failure)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: Not found ("Unknown demo base stack for this organisation")
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    DemoBaseStackUpdateRequest:
      description: >-
        The update payload of a demo base stack. name is immutable and ignored
        here; an omitted profile_id keeps the current profile.
      properties:
        idle_ttl_hours:
          anyOf:
            - type: integer
            - type: 'null'
          description: Between 1 and 720 hours; null disables the idle TTL.
        parameters:
          items:
            $ref: '#/components/schemas/DemoStackParameter'
          type: array
        profile_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
        profile_version:
          anyOf:
            - type: integer
            - type: 'null'
          description: Null tracks the profile's current version.
      type: object
    DemoBaseStack:
      description: >-
        One shared demo base stack: an organisation-level stack-profile
        designation that materialises lazily as a persistent stack in a stable
        ankra-demo-base-* namespace on the staging cluster. Status is one of:
        configured (saved, never materialised), deploying, ready, failed,
        deleting, deleted.
      properties:
        cluster_id:
          format: uuid
          type: string
        created_at:
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        idle_ttl_hours:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Idle hours after which the maintainer loop tears the stack down;
            null disables the idle TTL.
        last_error:
          type: string
        last_used_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
        live_demo_count:
          description: >-
            The number of non-destroyed demos referencing this base stack;
            deletion is refused while it is non-zero.
          type: integer
        name:
          type: string
        namespace:
          type: string
        parameters:
          items:
            $ref: '#/components/schemas/DemoStackParameter'
          type: array
        profile_id:
          format: uuid
          type: string
        profile_name:
          description: Denormalized onto reads only (never persisted).
          type: string
        profile_version:
          anyOf:
            - type: integer
            - type: 'null'
          description: Null tracks the profile's current version.
        status:
          enum:
            - configured
            - deploying
            - ready
            - failed
            - deleting
            - deleted
          type: string
      required:
        - id
        - cluster_id
        - name
        - profile_id
        - parameters
        - namespace
        - status
        - created_at
        - live_demo_count
      type: object
    DemoDetailError:
      description: >-
        The FastAPI-style detail envelope the demo routes use for
        400/403/404/409/502 responses.
      properties:
        detail:
          type: string
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    DemoStackParameter:
      description: >-
        One stack-profile parameter binding. Secret values ride as
        ${SECRET_SLOT:<uuid>} sentinels, never resolved values.
      properties:
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````