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

# List environment deployments

> List previous and current environment deployments with the status deployment and the related services. By default it returns the 20 last results. The response is paginated. In order to request the next page, you can use the startId query parameter



## OpenAPI

````yaml /api-reference/openapi.yaml get /environment/{environmentId}/deploymentHistory
openapi: 3.0.0
info:
  version: 1.0.4
  title: Qovery API
  description: >
    - Qovery is the fastest way to deploy your full-stack apps on any Cloud
    provider.

    - ℹ️ The API is stable and still in development.
  contact:
    name: Qovery Product Team
    url: https://www.qovery.com
    email: support+api+documentation@qovery.com
  x-logo:
    url: https://console.qovery.com/assets/logos/logo-white.svg
    altText: Qovery
servers:
  - url: https://api.qovery.com
security:
  - bearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: Account
  - name: Account Info
  - name: Alert Receivers
  - name: Alert Rules
  - name: Admin
  - name: ArgoCD
  - name: Application
  - name: Application Actions
  - name: Application Configuration
  - name: Application Database
  - name: Application Deployment Restriction
  - name: Application Deployment History
  - name: Application Environment Variable
  - name: Application Logs
  - name: Application Main Calls
  - name: Application Secret
  - name: Application Annotations Group
  - name: Applications
  - name: AutoscalingPolicy
  - name: Container
  - name: Container Actions
  - name: Container Configuration
  - name: Container Database
  - name: Container Deployment History
  - name: Container Environment Variable
  - name: Container Logs
  - name: Container Main Calls
  - name: Container Registry
  - name: Container Secret
  - name: Container Annotations Group
  - name: Containers
  - name: Deployment Stage Main Calls
  - name: Job
  - name: Job Actions
  - name: Job Configuration
  - name: Job Database
  - name: Job Deployment Restriction
  - name: Job Deployment History
  - name: Job Environment Variable
  - name: Job Logs
  - name: Job Main Calls
  - name: Job Registry
  - name: Job Secret
  - name: Job Annotations Group
  - name: Jobs
  - name: KedaTriggerAuthentication
  - name: Helm
  - name: Helm Actions
  - name: Helm Configuration
  - name: Helm Database
  - name: Helm Deployment Restriction
  - name: Helm Deployment History
  - name: Helm Logs
  - name: Helm Main Calls
  - name: Helm Repository
  - name: Helms
  - name: Backups
  - name: Billing
  - name: Cloud Provider
  - name: Cloud Provider Credentials
  - name: Clusters
  - name: Custom Domain
  - name: Container Custom Domain
  - name: Database
  - name: Database Actions
  - name: Database Application
  - name: Database Container
  - name: Database Deployment History
  - name: Database Main Calls
  - name: Database Annotations Group
  - name: Databases
  - name: Environment
  - name: Environment Actions
  - name: Environment Deployment History
  - name: Environment Deployment Rule
  - name: Environment Logs
  - name: Environment Main Calls
  - name: Environment Secret
  - name: Environment Variable
  - name: Environments
  - name: Git
  - name: Github App
  - name: Git repositories
  - name: Members
  - name: Organization
  - name: Organization Account Git Repositories
  - name: Organization Cluster Lock
  - name: Organization Main Calls
  - name: Organization Custom Role
  - name: Organization Event
  - name: Organization Api Token
  - name: Organization Webhook
  - name: Organization Annotations Group
  - name: Organization Labels Group
  - name: Organization Enterprise Connection
  - name: Project
  - name: Project Deployment Rule
  - name: Project Environment Variable
  - name: Project Main Calls
  - name: Project Secret
  - name: Projects
  - name: Referral & Rewards
  - name: Secret Manager Access
  - name: Terraforms
  - name: Terraform Main Calls
  - name: Terraform Resources
  - name: Terraform Deployment History
  - name: Terraform Deployment Restriction
  - name: Container Registries
  - name: Helm Repositories
  - name: User Sign Up
  - name: Variable Main Calls
  - name: Helm Custom Domain
  - name: Lifecycle Template Main Calls
paths:
  /environment/{environmentId}/deploymentHistory:
    get:
      tags:
        - Environment Deployment History
      summary: List environment deployments
      description: >-
        List previous and current environment deployments with the status
        deployment and the related services. By default it returns the 20 last
        results. The response is paginated. In order to request the next page,
        you can use the startId query parameter
      operationId: listEnvironmentDeploymentHistory
      parameters:
        - $ref: '#/components/parameters/environmentId'
        - $ref: '#/components/parameters/startId'
      responses:
        '200':
          description: List deployment history
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeploymentHistoryEnvironmentPaginatedResponseList
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    environmentId:
      name: environmentId
      in: path
      description: Environment ID
      required: true
      schema:
        type: string
        format: uuid
    startId:
      name: startId
      in: query
      description: Starting point after which to return results
      required: false
      schema:
        type: string
        format: uuid
  schemas:
    DeploymentHistoryEnvironmentPaginatedResponseList:
      allOf:
        - $ref: '#/components/schemas/PaginationData'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentHistoryEnvironment'
    PaginationData:
      type: object
      required:
        - page
        - page_size
      properties:
        page:
          type: number
          example: 1
        page_size:
          type: number
          example: 20
    DeploymentHistoryEnvironment:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          properties:
            status:
              $ref: '#/components/schemas/StateEnum'
            origin:
              $ref: '#/components/schemas/OrganizationEventOrigin'
            triggered_by:
              type: string
            applications:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentHistoryApplication'
            containers:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentHistoryContainer'
            databases:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentHistoryDatabase'
            jobs:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentHistoryJobResponse'
            helms:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentHistoryHelmResponse'
    Base:
      type: object
      required:
        - id
        - created_at
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    StateEnum:
      type: string
      enum:
        - BUILDING
        - BUILD_ERROR
        - CANCELED
        - CANCELING
        - DELETED
        - DELETE_ERROR
        - DELETE_QUEUED
        - DELETING
        - DEPLOYED
        - DEPLOYING
        - DEPLOYMENT_ERROR
        - DEPLOYMENT_QUEUED
        - EXECUTING
        - QUEUED
        - READY
        - RECAP
        - RESTARTED
        - RESTARTING
        - RESTART_ERROR
        - RESTART_QUEUED
        - STOPPED
        - STOPPING
        - STOP_ERROR
        - STOP_QUEUED
        - UNAVAILABLE
        - WAITING_DELETING
        - WAITING_RESTARTING
        - WAITING_RUNNING
        - WAITING_STOPPING
    OrganizationEventOrigin:
      type: string
      description: Origin of the organization event
      enum:
        - API
        - CLI
        - CONSOLE
        - GIT
        - QOVERY_INTERNAL
        - TERRAFORM_PROVIDER
      example: API
    DeploymentHistoryApplication:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          properties:
            name:
              type: string
            commit:
              $ref: '#/components/schemas/Commit'
            status:
              $ref: '#/components/schemas/StateEnum'
    DeploymentHistoryContainer:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          properties:
            name:
              type: string
              description: name of the container
            status:
              $ref: '#/components/schemas/StateEnum'
            image_name:
              type: string
            tag:
              type: string
            arguments:
              type: array
              items:
                type: string
            entrypoint:
              type: string
    DeploymentHistoryDatabase:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          properties:
            name:
              type: string
              description: name of the service
            status:
              $ref: '#/components/schemas/StateEnum'
    DeploymentHistoryJobResponse:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          properties:
            name:
              type: string
              description: name of the job
            status:
              $ref: '#/components/schemas/StateEnum'
            image_name:
              type: string
            tag:
              type: string
            commit:
              $ref: '#/components/schemas/Commit'
            schedule:
              type: object
              properties:
                event:
                  $ref: '#/components/schemas/JobScheduleEvent'
                schedule_at:
                  type: string
                  format: cron
                  nullable: true
                  description: >
                    Can only be set if the event is CRON.

                    Represent the cron format for the job schedule without
                    seconds.

                    For example: `* * * * *` represent the cron to launch the
                    job every minute.

                    See https://crontab.guru/ to WISIWIG interface.

                    Timezone is UTC
            arguments:
              type: array
              items:
                type: string
            entrypoint:
              type: string
    DeploymentHistoryHelmResponse:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          properties:
            name:
              type: string
              description: name of the helm
            status:
              $ref: '#/components/schemas/StateEnum'
            commit:
              $ref: '#/components/schemas/Commit'
            repository:
              type: object
              nullable: true
              description: >-
                If the chart source if from a repository, the chart name and its
                version
              properties:
                chart_name:
                  type: string
                chart_version:
                  type: string
    Commit:
      type: object
      nullable: true
      required:
        - git_commit_id
        - created_at
        - author_name
        - message
        - tag
      properties:
        created_at:
          type: string
          format: date-time
        git_commit_id:
          type: string
        tag:
          type: string
          example: v2.1.1
        message:
          type: string
        author_name:
          type: string
        author_avatar_url:
          type: string
        commit_page_url:
          type: string
    JobScheduleEvent:
      type: string
      enum:
        - ON_START
        - ON_STOP
        - ON_DELETE
        - CRON
      description: |
        On which event the job is going to run.  
        ON_START means when a deployment is requested for the environment  
        ON_STOP means when a stop of the environment is requested  
        ON_DELETE means when an environment delete is requested  
        CRON means at a scheduled interval
  responses:
    '401':
      description: Access token is missing or invalid
    '403':
      description: Access forbidden
    '404':
      description: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT tokens should be used with OIDC account (human to machine). JWT
        tokens used by the Qovery console to communicate with the API have a
        TTL. Curl Example ' curl https://console.qovery.com/organization -H
        "Authorization: Bearer $qovery_token" '
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token API are generated by Qovery to manage machine to machine
        interaction and do not have a TTL. Curl Example ' curl
        https://console.qovery.com/organization -H "Authorization: Token
        $qovery_token" '

````