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

# List Environments

> List all environments.

<RequestExample>
  ```bash cURL theme={null}
  curl --url http://localhost:8080/api/v2/environments \
    --header 'Accept: application/json'
  ```
</RequestExample>


## OpenAPI

````yaml https://raw.githubusercontent.com/flipt-io/flipt/refs/heads/v2/rpc/v2/environments/openapi.yaml GET /api/v2/environments
openapi: 3.0.3
info:
  title: Management API
  description: Flipt Management REST API
  version: 2.9.0
servers: []
security: []
tags:
  - name: EnvironmentsService
paths:
  /api/v2/environments:
    get:
      tags:
        - EnvironmentsService
      description: List environments.
      operationId: listEnvironments
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEnvironmentsResponse'
components:
  schemas:
    ListEnvironmentsResponse:
      type: object
      properties:
        environments:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
          description: The list of environments.
      description: The response message for listing environments.
    Environment:
      type: object
      properties:
        key:
          type: string
          description: The environment key.
        name:
          type: string
          description: The environment name.
        default:
          type: boolean
          description: The default indicates if this is the default environment.
        configuration:
          allOf:
            - $ref: '#/components/schemas/EnvironmentConfiguration'
          description: The environment configuration.
      description: The Environment represents a environment.
    EnvironmentConfiguration:
      type: object
      properties:
        ref:
          type: string
          description: The git reference (branch or tag) for the environment.
        directory:
          type: string
          description: >-
            The directory within the repository where environment resources are
            located.
        remote:
          type: string
          description: The git remote URL for the environment.
        base:
          type: string
          description: The base branch or tag for the environment.
        scm:
          enum:
            - SCM_UNKNOWN
            - SCM_GITHUB
            - SCM_GITEA
            - SCM_GITLAB
            - SCM_AZURE
            - SCM_BITBUCKET
          type: string
          description: The source control management system for the environment.
          format: enum
      description: >-
        The EnvironmentConfiguration represents the configuration for an
        environment.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.