> ## 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.

# Get Application Demos

> Return the application's active demos plus everything the demos tab needs in one round-trip: the caller's TTL policy, the staging-cluster status, and the default container port (the generated Dockerfile's EXPOSE port when known). A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /api/v1/org/applications/{application_id}/demos
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/applications/{application_id}/demos:
    get:
      tags:
        - Applications API
      summary: Get Application Demos
      description: >-
        Return the application's active demos plus everything the demos tab
        needs in one round-trip: the caller's TTL policy, the staging-cluster
        status, and the default container port (the generated Dockerfile's
        EXPOSE port when known). A browser session twin is mounted at the same
        path without the /api/v1 prefix (cookie authentication).
      operationId: get_application_demos_api_v1_org_applications__application_id__demos_get
      parameters:
        - in: path
          name: application_id
          required: true
          schema:
            title: Application Id
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationDemosResponse'
          description: Successful Response
        '401':
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: Not found ("Application not found")
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    ApplicationDemosResponse:
      description: >-
        The application's active demos plus everything the demos tab needs in
        one round-trip.
      properties:
        default_container_port:
          description: >-
            The port a demo of this application should target by default (the
            generated Dockerfile's EXPOSE port when known).
          type: integer
        demos:
          items:
            $ref: '#/components/schemas/DemoWorkspace'
          type: array
        staging:
          $ref: '#/components/schemas/DemoStagingStatus'
        ttl:
          $ref: '#/components/schemas/DemoTTLPolicy'
      required:
        - demos
        - ttl
        - staging
        - default_container_port
      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
    DemoWorkspace:
      description: >-
        One ephemeral PR or branch demo record. kind is pr_demo or branch_demo;
        status is one of pending, provisioning, ready, failed, tearing_down,
        destroyed.
      properties:
        application_id:
          anyOf:
            - type: string
            - type: 'null'
        branch:
          anyOf:
            - type: string
            - type: 'null'
        cluster_id:
          anyOf:
            - type: string
            - type: 'null'
        component:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The deployable component this demo runs; null for rows predating
            component records.
        container_port:
          anyOf:
            - type: integer
            - type: 'null'
        created_at:
          format: date-time
          type: string
        created_by_user_id:
          type: string
        database:
          type: boolean
        detected_container_port:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            The port the readiness reconciler's log parser saw the container
            announce; set with port_corrected_at when a runtime correction
            happened.
        port_corrected_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When the demo's container port was automatically corrected from the
            container's own logs; a demo row receives at most one correction.
        demo_base_stack_error:
          anyOf:
            - type: string
            - type: 'null'
        demo_base_stack_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            References the shared base stack this demo depends on;
            name/status/error are joined from the base stack for display. All
            absent when the demo has no base-stack dependency.
        demo_base_stack_name:
          anyOf:
            - type: string
            - type: 'null'
        demo_base_stack_status:
          anyOf:
            - type: string
            - type: 'null'
        demo_stack_error:
          anyOf:
            - type: string
            - type: 'null'
        demo_stack_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The stack-profile replica attached to a full-stack demo; absent for
            single-service demos (as are demo_stack_status and
            demo_stack_error).
        demo_stack_status:
          anyOf:
            - type: string
            - type: 'null'
        environment:
          description: >-
            The demo's env entry names and secret flags only - values (sentinel
            or plaintext) never ride list surfaces.
          items:
            $ref: '#/components/schemas/DemoEnvironmentSummaryEntry'
          type: array
        expires_at:
          format: date-time
          type: string
        head_sha:
          anyOf:
            - type: string
            - type: 'null'
        id:
          type: string
        image_tag:
          anyOf:
            - type: string
            - type: 'null'
        kind:
          type: string
        last_error:
          anyOf:
            - type: string
            - type: 'null'
        namespace:
          type: string
        pod_name:
          anyOf:
            - type: string
            - type: 'null'
        pr_number:
          anyOf:
            - type: integer
            - type: 'null'
        preview_url:
          anyOf:
            - type: string
            - type: 'null'
        repos:
          items:
            $ref: '#/components/schemas/DemoWorkspaceRepo'
          type: array
        stack_profile_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The profile's display name, denormalized so list surfaces can badge
            full-stack demos without a second lookup.
        status:
          type: string
        components:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/DemoWorkspaceComponent'
          description: >-
            Every deployable component the demo runs; null for single-workload
            demos predating multi-component records.
      required:
        - id
        - kind
        - application_id
        - cluster_id
        - namespace
        - pod_name
        - pr_number
        - branch
        - image_tag
        - container_port
        - preview_url
        - head_sha
        - status
        - last_error
        - repos
        - database
        - expires_at
        - created_by_user_id
        - created_at
      type: object
    DemoStagingStatus:
      description: The staging-cluster status the demos tab renders.
      properties:
        agent_online:
          type: boolean
        cluster_id:
          anyOf:
            - type: string
            - type: 'null'
        cluster_name:
          anyOf:
            - type: string
            - type: 'null'
        configured:
          type: boolean
      required:
        - configured
        - cluster_id
        - cluster_name
        - agent_online
      type: object
    DemoTTLPolicy:
      description: >-
        The caller-specific TTL contract the demos tab renders: the pre-filled
        default, the role-capped maximum, and whether the caller may deploy at
        all.
      properties:
        can_deploy:
          type: boolean
        default_ttl_hours:
          type: integer
        max_ttl_hours:
          type: integer
      required:
        - default_ttl_hours
        - max_ttl_hours
        - can_deploy
      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
    DemoEnvironmentSummaryEntry:
      description: >-
        The value-free projection list surfaces expose: names and secret flags
        only, never values.
      properties:
        name:
          type: string
        secret:
          type: boolean
      required:
        - name
        - secret
      type: object
    DemoWorkspaceRepo:
      description: One repository cloned into a workspace pod.
      properties:
        name:
          type: string
        path:
          type: string
        url:
          type: string
      required:
        - name
        - url
        - path
      type: object
    DemoWorkspaceComponent:
      type: object
      description: >-
        One deployable component of a demo: its own Deployment and Service
        inside the demo namespace. The entry component owns the demo host's root
        path.
      properties:
        name:
          type: string
        image_tag:
          type: string
        container_port:
          type: integer
        ingress_path:
          type: string
          description: >-
            Path prefix the component is published under on the demo host; empty
            keeps it in-cluster only.
        entry:
          type: boolean
      required:
        - name
        - container_port

````