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

# Get environment

> Returns a single environment by ID, with the fields that define it. An environment is one draft-and-published copy of the agent.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json get /v1/stable/environment/{environmentAlias}
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/environment/{environmentAlias}:
    get:
      tags:
        - Environment
      summary: Get environment
      description: >-
        Returns a single environment by ID, with the fields that define it. An
        environment is one draft-and-published copy of the agent.
      operationId: StableEnvironmentController_get
      parameters:
        - name: environmentAlias
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The alias of the environment to operate on (e.g. `main`).
          description: The alias of the environment to operate on (e.g. `main`).
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
      responses:
        '200':
          description: >-
            Returns the one environment the alias resolves to, including its
            release history and the share of live traffic routed to it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StableEnvironmentResponse'
          x-vf-doc:
            description: >-
              Returns the one environment the alias resolves to, including its
              release history and the share of live traffic routed to it.
      security:
        - token: []
components:
  schemas:
    StableEnvironmentResponse:
      type: object
      properties:
        environment:
          $ref: '#/components/schemas/StableEnvironment'
      required:
        - environment
    StableEnvironment:
      type: object
      properties:
        name:
          type: string
        alias:
          type: string
          description: The URL-safe alias that identifies the environment (e.g. `main`).
        isMain:
          type: boolean
          description: Whether this is the main (default) environment of the project.
        releases:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              backupID:
                type: number
                description: >-
                  The ID of the backup that snapshots the environment for this
                  release.
              createdAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description:
                nullable: true
                description: An optional description of what changed in this release.
                type: string
              autogenerated:
                type: boolean
                description: >-
                  Whether the release was created automatically by the system
                  rather than published manually.
            required:
              - name
              - backupID
              - createdAt
              - description
              - autogenerated
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        trafficPercentage:
          type: number
          description: >-
            The percentage of live traffic (0-100) currently routed to this
            environment.
      required:
        - name
        - alias
        - isMain
        - releases
        - createdAt
        - trafficPercentage
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token

````