---
title: "Get environment statuses with stages"
method: GET
path: "/environment/{environmentId}/statusesWithStages"
tags: ["Environment Main Calls"]
---

# Get environment statuses with stages

`GET /environment/{environmentId}/statusesWithStages`

## Request

- Base URL: `https://api.qovery.com`
- URL: `https://api.qovery.com/environment/{environmentId}/statusesWithStages`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/qovery/apis/qovery-api/docs/environment/:environmentId/statusesWithStages/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `environmentId` string, uuid, required

## Response `200`

Get statuses with stages

- EnvironmentStatusesWithStages
  - `environment` EnvironmentStatus
    - `id` string, uuid, required
    - `state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
    - `last_deployment_date` string, date-time, nullable
    - `last_deployment_state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
    - `last_deployment_id` string, nullable
    - `total_deployment_duration_in_seconds` integer, nullable
    - `origin` 'API' | 'CLI' | 'CONSOLE' | 'GIT' | 'QOVERY_INTERNAL' | 'TERRAFORM_PROVIDER', nullable: Origin of the organization event
    - `triggered_by` string, nullable
    - `deployment_status` 'NEVER_DEPLOYED' | 'UP_TO_DATE' | 'OUT_OF_DATE'
  - `stages` DeploymentStageWithServicesStatuses[]
    - `applications` Status[]
      - `id` string, uuid, required
      - `state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
      - `service_deployment_status` 'NEVER_DEPLOYED' | 'OUT_OF_DATE' | 'UP_TO_DATE', required
      - `last_deployment_date` string, date-time
      - `is_part_last_deployment` boolean
      - `steps` ServiceStepMetrics
        - `total_duration_sec` integer, nullable: The total duration in seconds of the service deployment or null if the deployment is not completed.
        - `total_computing_duration_sec` integer: The total duration in seconds of the service deployment without queuing steps.
        - `details` ServiceStepMetric[]: A list of metrics for deployment steps of the service.
          - `step_name` 'REGISTRY_CREATE_REPOSITORY' | 'GIT_CLONE' | 'BUILD_QUEUEING' | 'BUILD' | 'DEPLOYMENT_QUEUEING' | 'DEPLOYMENT' | 'ROUTER_DEPLOYMENT' | 'MIRROR_IMAGE' | 'EXECUTING': The name of the deployment step at the service level: - REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry. - GIT_CLONE: The step to clone the source code repository. - BUILD_QUEUEING: The queuing time preceding the actual building step. - BUILD: The step to build the source code. - DEPLOYMENT_QUEUEING: The queuing time preceding the actual deployment step. - DEPLOYMENT: The step to deploy the service. - ROUTER_DEPLOYMENT: The step to deploy the router. - MIRROR_IMAGE: The step to mirror the image to the private registry. - EXECUTING: The step to execute a job or terraform apply.
          - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
          - `duration_sec` integer: The duration of the step in seconds.
      - `execution_id` string
      - `status_details` StatusDetails, required
        - `action` 'DEPLOY' | 'DELETE' | 'RESTART' | 'STOP' | 'UNKNOWN', required
        - `status` 'QUEUED' | 'ONGOING' | 'SUCCESS' | 'ERROR' | 'EXECUTING' | 'CANCELED' | 'CANCELING' | 'NEVER', required
      - `deployment_request_id` string, uuid, nullable
      - `deployment_requests_count` integer
    - `containers` Status[]
      - `id` string, uuid, required
      - `state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
      - `service_deployment_status` 'NEVER_DEPLOYED' | 'OUT_OF_DATE' | 'UP_TO_DATE', required
      - `last_deployment_date` string, date-time
      - `is_part_last_deployment` boolean
      - `steps` ServiceStepMetrics
        - `total_duration_sec` integer, nullable: The total duration in seconds of the service deployment or null if the deployment is not completed.
        - `total_computing_duration_sec` integer: The total duration in seconds of the service deployment without queuing steps.
        - `details` ServiceStepMetric[]: A list of metrics for deployment steps of the service.
          - `step_name` 'REGISTRY_CREATE_REPOSITORY' | 'GIT_CLONE' | 'BUILD_QUEUEING' | 'BUILD' | 'DEPLOYMENT_QUEUEING' | 'DEPLOYMENT' | 'ROUTER_DEPLOYMENT' | 'MIRROR_IMAGE' | 'EXECUTING': The name of the deployment step at the service level: - REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry. - GIT_CLONE: The step to clone the source code repository. - BUILD_QUEUEING: The queuing time preceding the actual building step. - BUILD: The step to build the source code. - DEPLOYMENT_QUEUEING: The queuing time preceding the actual deployment step. - DEPLOYMENT: The step to deploy the service. - ROUTER_DEPLOYMENT: The step to deploy the router. - MIRROR_IMAGE: The step to mirror the image to the private registry. - EXECUTING: The step to execute a job or terraform apply.
          - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
          - `duration_sec` integer: The duration of the step in seconds.
      - `execution_id` string
      - `status_details` StatusDetails, required
        - `action` 'DEPLOY' | 'DELETE' | 'RESTART' | 'STOP' | 'UNKNOWN', required
        - `status` 'QUEUED' | 'ONGOING' | 'SUCCESS' | 'ERROR' | 'EXECUTING' | 'CANCELED' | 'CANCELING' | 'NEVER', required
      - `deployment_request_id` string, uuid, nullable
      - `deployment_requests_count` integer
    - `jobs` Status[]
      - `id` string, uuid, required
      - `state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
      - `service_deployment_status` 'NEVER_DEPLOYED' | 'OUT_OF_DATE' | 'UP_TO_DATE', required
      - `last_deployment_date` string, date-time
      - `is_part_last_deployment` boolean
      - `steps` ServiceStepMetrics
        - `total_duration_sec` integer, nullable: The total duration in seconds of the service deployment or null if the deployment is not completed.
        - `total_computing_duration_sec` integer: The total duration in seconds of the service deployment without queuing steps.
        - `details` ServiceStepMetric[]: A list of metrics for deployment steps of the service.
          - `step_name` 'REGISTRY_CREATE_REPOSITORY' | 'GIT_CLONE' | 'BUILD_QUEUEING' | 'BUILD' | 'DEPLOYMENT_QUEUEING' | 'DEPLOYMENT' | 'ROUTER_DEPLOYMENT' | 'MIRROR_IMAGE' | 'EXECUTING': The name of the deployment step at the service level: - REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry. - GIT_CLONE: The step to clone the source code repository. - BUILD_QUEUEING: The queuing time preceding the actual building step. - BUILD: The step to build the source code. - DEPLOYMENT_QUEUEING: The queuing time preceding the actual deployment step. - DEPLOYMENT: The step to deploy the service. - ROUTER_DEPLOYMENT: The step to deploy the router. - MIRROR_IMAGE: The step to mirror the image to the private registry. - EXECUTING: The step to execute a job or terraform apply.
          - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
          - `duration_sec` integer: The duration of the step in seconds.
      - `execution_id` string
      - `status_details` StatusDetails, required
        - `action` 'DEPLOY' | 'DELETE' | 'RESTART' | 'STOP' | 'UNKNOWN', required
        - `status` 'QUEUED' | 'ONGOING' | 'SUCCESS' | 'ERROR' | 'EXECUTING' | 'CANCELED' | 'CANCELING' | 'NEVER', required
      - `deployment_request_id` string, uuid, nullable
      - `deployment_requests_count` integer
    - `databases` Status[]
      - `id` string, uuid, required
      - `state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
      - `service_deployment_status` 'NEVER_DEPLOYED' | 'OUT_OF_DATE' | 'UP_TO_DATE', required
      - `last_deployment_date` string, date-time
      - `is_part_last_deployment` boolean
      - `steps` ServiceStepMetrics
        - `total_duration_sec` integer, nullable: The total duration in seconds of the service deployment or null if the deployment is not completed.
        - `total_computing_duration_sec` integer: The total duration in seconds of the service deployment without queuing steps.
        - `details` ServiceStepMetric[]: A list of metrics for deployment steps of the service.
          - `step_name` 'REGISTRY_CREATE_REPOSITORY' | 'GIT_CLONE' | 'BUILD_QUEUEING' | 'BUILD' | 'DEPLOYMENT_QUEUEING' | 'DEPLOYMENT' | 'ROUTER_DEPLOYMENT' | 'MIRROR_IMAGE' | 'EXECUTING': The name of the deployment step at the service level: - REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry. - GIT_CLONE: The step to clone the source code repository. - BUILD_QUEUEING: The queuing time preceding the actual building step. - BUILD: The step to build the source code. - DEPLOYMENT_QUEUEING: The queuing time preceding the actual deployment step. - DEPLOYMENT: The step to deploy the service. - ROUTER_DEPLOYMENT: The step to deploy the router. - MIRROR_IMAGE: The step to mirror the image to the private registry. - EXECUTING: The step to execute a job or terraform apply.
          - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
          - `duration_sec` integer: The duration of the step in seconds.
      - `execution_id` string
      - `status_details` StatusDetails, required
        - `action` 'DEPLOY' | 'DELETE' | 'RESTART' | 'STOP' | 'UNKNOWN', required
        - `status` 'QUEUED' | 'ONGOING' | 'SUCCESS' | 'ERROR' | 'EXECUTING' | 'CANCELED' | 'CANCELING' | 'NEVER', required
      - `deployment_request_id` string, uuid, nullable
      - `deployment_requests_count` integer
    - `helms` Status[]
      - `id` string, uuid, required
      - `state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
      - `service_deployment_status` 'NEVER_DEPLOYED' | 'OUT_OF_DATE' | 'UP_TO_DATE', required
      - `last_deployment_date` string, date-time
      - `is_part_last_deployment` boolean
      - `steps` ServiceStepMetrics
        - `total_duration_sec` integer, nullable: The total duration in seconds of the service deployment or null if the deployment is not completed.
        - `total_computing_duration_sec` integer: The total duration in seconds of the service deployment without queuing steps.
        - `details` ServiceStepMetric[]: A list of metrics for deployment steps of the service.
          - `step_name` 'REGISTRY_CREATE_REPOSITORY' | 'GIT_CLONE' | 'BUILD_QUEUEING' | 'BUILD' | 'DEPLOYMENT_QUEUEING' | 'DEPLOYMENT' | 'ROUTER_DEPLOYMENT' | 'MIRROR_IMAGE' | 'EXECUTING': The name of the deployment step at the service level: - REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry. - GIT_CLONE: The step to clone the source code repository. - BUILD_QUEUEING: The queuing time preceding the actual building step. - BUILD: The step to build the source code. - DEPLOYMENT_QUEUEING: The queuing time preceding the actual deployment step. - DEPLOYMENT: The step to deploy the service. - ROUTER_DEPLOYMENT: The step to deploy the router. - MIRROR_IMAGE: The step to mirror the image to the private registry. - EXECUTING: The step to execute a job or terraform apply.
          - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
          - `duration_sec` integer: The duration of the step in seconds.
      - `execution_id` string
      - `status_details` StatusDetails, required
        - `action` 'DEPLOY' | 'DELETE' | 'RESTART' | 'STOP' | 'UNKNOWN', required
        - `status` 'QUEUED' | 'ONGOING' | 'SUCCESS' | 'ERROR' | 'EXECUTING' | 'CANCELED' | 'CANCELING' | 'NEVER', required
      - `deployment_request_id` string, uuid, nullable
      - `deployment_requests_count` integer
    - `terraforms` Status[]
      - `id` string, uuid, required
      - `state` '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' | 'WAITING_DELETING' | 'WAITING_RESTARTING' | 'WAITING_RUNNING' | 'WAITING_STOPPING', required
      - `service_deployment_status` 'NEVER_DEPLOYED' | 'OUT_OF_DATE' | 'UP_TO_DATE', required
      - `last_deployment_date` string, date-time
      - `is_part_last_deployment` boolean
      - `steps` ServiceStepMetrics
        - `total_duration_sec` integer, nullable: The total duration in seconds of the service deployment or null if the deployment is not completed.
        - `total_computing_duration_sec` integer: The total duration in seconds of the service deployment without queuing steps.
        - `details` ServiceStepMetric[]: A list of metrics for deployment steps of the service.
          - `step_name` 'REGISTRY_CREATE_REPOSITORY' | 'GIT_CLONE' | 'BUILD_QUEUEING' | 'BUILD' | 'DEPLOYMENT_QUEUEING' | 'DEPLOYMENT' | 'ROUTER_DEPLOYMENT' | 'MIRROR_IMAGE' | 'EXECUTING': The name of the deployment step at the service level: - REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry. - GIT_CLONE: The step to clone the source code repository. - BUILD_QUEUEING: The queuing time preceding the actual building step. - BUILD: The step to build the source code. - DEPLOYMENT_QUEUEING: The queuing time preceding the actual deployment step. - DEPLOYMENT: The step to deploy the service. - ROUTER_DEPLOYMENT: The step to deploy the router. - MIRROR_IMAGE: The step to mirror the image to the private registry. - EXECUTING: The step to execute a job or terraform apply.
          - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
          - `duration_sec` integer: The duration of the step in seconds.
      - `execution_id` string
      - `status_details` StatusDetails, required
        - `action` 'DEPLOY' | 'DELETE' | 'RESTART' | 'STOP' | 'UNKNOWN', required
        - `status` 'QUEUED' | 'ONGOING' | 'SUCCESS' | 'ERROR' | 'EXECUTING' | 'CANCELED' | 'CANCELING' | 'NEVER', required
      - `deployment_request_id` string, uuid, nullable
      - `deployment_requests_count` integer
    - `stage` Stage
      - `id` string, uuid, required
      - `name` string, required: stage name
      - `steps` StageStepMetrics
        - `total_duration_sec` integer, nullable: The total duration in seconds of the stage deployment or null if the deployment is not completed
        - `details` StageStepMetric[]: A list of metrics for deployment steps of the stage.
          - `step_name` 'QUEUEING' | 'PROVISION_BUILDER': The name of the deployment step at the stage level: - QUEUEING: The step preceding the actual stage deployment step. - PROVISION_BUILDER: The step to provision builders before the actual build.
          - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
          - `duration_sec` integer: The duration of the step in seconds.
      - `description` string, required
      - `status` 'QUEUED' | 'ONGOING' | 'DONE' | 'ERROR' | 'SKIPPED' | 'CANCELED'
  - `pre_check_stage` object
    - `status` 'SUCCESS' | 'ERROR' | 'CANCEL' | 'SKIP': The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary.
    - `total_duration_sec` integer

## Other responses

- `401`: Access token is missing or invalid
- `403`: Access forbidden
- `404`: Resource not found

---

[API](https://skmtc.dev/qovery/apis/qovery-api.md) - [All operations](https://skmtc.dev/qovery/apis/qovery-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qovery/apis/qovery-api/revisions/93c4960a44ba?raw)
