> ## 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 the application's environments

> The environment ladder: every place the application runs, one row per environment (wave 1: one per cluster), derived from the deployments read and the installation rows. status is the deployment-state ladder applied to that environment's targets alone; read_state is unknown when the deployments read failed, and environments is then empty - which a client must render as could-not-check, never as no environments. address carries the raw ingress inputs; the verdict is the client's existing rule.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /org/applications/{application_id}/environments
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /org/applications/{application_id}/environments:
    get:
      tags:
        - applications
      summary: Get the application's environments
      description: >-
        The environment ladder: every place the application runs, one row per
        environment (wave 1: one per cluster), derived from the deployments read
        and the installation rows. status is the deployment-state ladder applied
        to that environment's targets alone; read_state is unknown when the
        deployments read failed, and environments is then empty - which a client
        must render as could-not-check, never as no environments. address
        carries the raw ingress inputs; the verdict is the client's existing
        rule.
      operationId: get_application_environments
      parameters:
        - in: path
          name: application_id
          required: true
          schema:
            type: string
            title: Application Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationEnvironmentsResponse'
          description: Successful Response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoDetailError'
          description: Not found ("Application not found")
components:
  schemas:
    ApplicationEnvironmentsResponse:
      properties:
        application_id:
          type: string
          title: Application Id
        read_state:
          type: string
          enum:
            - ok
            - unknown
          title: Read State
        read_reason:
          type: string
          title: Read Reason
        follows_pushes:
          anyOf:
            - type: boolean
            - type: 'null'
        environments:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationEnvironment'
          title: Environments
      required:
        - application_id
        - read_state
        - read_reason
        - follows_pushes
        - environments
      title: ApplicationEnvironmentsResponse
      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
    ApplicationEnvironment:
      properties:
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        role:
          type: string
          enum:
            - playground
            - production
            - staging
            - development
            - custom
          title: Role
        order:
          type: integer
          title: Order
        status:
          type: string
          enum:
            - running
            - degraded
            - failed
            - deploying
            - parked
            - not_deployed
            - unknown
          title: Status
        status_message:
          type: string
          title: Status Message
        follows:
          type: string
          enum:
            - pushes
            - manual
            - unknown
          title: Follows
        serving:
          anyOf:
            - $ref: '#/components/schemas/ApplicationEnvironmentServing'
            - type: 'null'
        address:
          $ref: '#/components/schemas/ApplicationEnvironmentAddress'
        targets:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationEnvironmentTarget'
          title: Targets
      required:
        - id
        - name
        - role
        - order
        - status
        - status_message
        - follows
        - serving
        - address
        - targets
      title: ApplicationEnvironment
      type: object
    ApplicationEnvironmentServing:
      properties:
        commit_sha:
          anyOf:
            - type: string
            - type: 'null'
        chart_version:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - commit_sha
        - chart_version
      title: ApplicationEnvironmentServing
      type: object
    ApplicationEnvironmentAddress:
      properties:
        host:
          anyOf:
            - type: string
            - type: 'null'
        publication:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - host
        - publication
      title: ApplicationEnvironmentAddress
      type: object
    ApplicationEnvironmentTarget:
      properties:
        cluster_id:
          type: string
          title: Cluster Id
        cluster_name:
          type: string
          title: Cluster Name
        cluster_kind:
          type: string
          title: Cluster Kind
        namespace:
          anyOf:
            - type: string
            - type: 'null'
        deployment_kind:
          type: string
          title: Deployment Kind
        health_status:
          anyOf:
            - type: string
            - type: 'null'
        sync_status:
          anyOf:
            - type: string
            - type: 'null'
        pod_ready:
          anyOf:
            - type: integer
            - type: 'null'
        pod_total:
          anyOf:
            - type: integer
            - type: 'null'
        installed_version:
          anyOf:
            - type: string
            - type: 'null'
        desired_version:
          anyOf:
            - type: string
            - type: 'null'
        version_drift:
          type: boolean
          title: Version Drift
        is_draft:
          type: boolean
          title: Is Draft
        is_parked:
          type: boolean
          title: Is Parked
        installation_status:
          anyOf:
            - type: string
            - type: 'null'
        failure_message:
          anyOf:
            - type: string
            - type: 'null'
        last_updated_at:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - cluster_id
        - cluster_name
        - cluster_kind
        - namespace
        - deployment_kind
        - health_status
        - sync_status
        - pod_ready
        - pod_total
        - installed_version
        - desired_version
        - version_drift
        - is_draft
        - is_parked
        - installation_status
        - failure_message
        - last_updated_at
      title: ApplicationEnvironmentTarget
      type: object

````