> ## Documentation Index
> Fetch the complete documentation index at: https://cubed3-feat-druid-driver-streaming.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get deployment environments



## OpenAPI

````yaml /api-reference/api.yaml get /v1/deployments/{deploymentId}/environments
openapi: 3.1.0
info:
  title: Cube Cloud REST API
  version: 1.0.0
  description: >-
    Programmatically manage Cube Cloud: deployments and everything scoped to
    them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
servers:
  - url: https://{tenant}.cubecloud.dev/api
    description: >-
      Cube Cloud API base URL. Replace the whole host if you use a custom
      domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube Cloud tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Environments
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
paths:
  /v1/deployments/{deploymentId}/environments:
    get:
      tags:
        - Environments
      summary: Get deployment environments
      operationId: getDeploymentEnvironments
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: integer
        - in: query
          name: type
          required: false
          schema:
            oneOf:
              - $ref: '#/components/schemas/GetDeploymentEnvironmentsQueryType'
              - type: 'null'
            type: string
            enum:
              - production
              - staging
              - development
        - in: query
          name: offset
          required: false
          schema:
            oneOf:
              - minimum: 0
                type: integer
              - type: 'null'
            type: integer
            minimum: 0
        - in: query
          name: limit
          required: false
          schema:
            oneOf:
              - minimum: 0
                type: integer
              - type: 'null'
            type: integer
            minimum: 0
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentEnvironmentsListResponse'
          description: ''
components:
  schemas:
    GetDeploymentEnvironmentsQueryType:
      enum:
        - production
        - staging
        - development
      type: string
    DeploymentEnvironmentsListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/DeploymentEnvironment'
          type: array
        pagination:
          $ref: '#/components/schemas/DeploymentsPagination'
      required:
        - data
        - pagination
      type: object
    DeploymentEnvironment:
      properties:
        api_credentials:
          items:
            $ref: '#/components/schemas/DeploymentEnvironmentApiCredential'
          type: array
        branch:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: string
        type:
          $ref: '#/components/schemas/DeploymentEnvironmentType'
        user:
          oneOf:
            - type: string
            - type: 'null'
      required:
        - id
        - type
        - api_credentials
      type: object
    DeploymentsPagination:
      properties:
        limit:
          minimum: 0
          type: integer
        offset:
          minimum: 0
          type: integer
        total:
          minimum: 0
          type: integer
      required:
        - total
        - offset
        - limit
      type: object
    DeploymentEnvironmentApiCredential:
      properties:
        database:
          oneOf:
            - type: string
            - type: 'null'
        host:
          oneOf:
            - type: string
            - type: 'null'
        port:
          oneOf:
            - minimum: 1
              type: integer
            - type: 'null'
        type:
          $ref: '#/components/schemas/DeploymentEnvironmentApiCredentialType'
        url:
          oneOf:
            - type: string
            - type: 'null'
        version:
          minimum: 1
          type: integer
      required:
        - type
        - version
      type: object
    DeploymentEnvironmentType:
      enum:
        - production
        - staging
        - development
      type: string
    DeploymentEnvironmentApiCredentialType:
      enum:
        - rest
        - sql
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````