---
title: "Get an array of environments of an app"
method: GET
path: "/apps/{appId}/environments"
tags: ["environments"]
---

# Get an array of environments of an app

`GET /apps/{appId}/environments`

## Request

- Base URL: `https://cloud.home.mendix.com/api/v4`
- URL: `https://cloud.home.mendix.com/api/v4/apps/{appId}/environments`
- Auth: API key in header `Authorization`

Get all environments of the app.

## Query parameters

- `offset` integer
- `limit` integer
- `sort` string
- `expand` string

## Response `200`

OK

- Environments
  - `environments` Environment[], required
    - `id` string, uuid, required
    - `appId` string, uuid, required: The unique App ID of the app. This can be seen on the **General** page of the app in the Mendix Portal. It is a UUID format.
    - `name` string, required: The name of the environment.
    - `state` 'stopped' | 'running' | 'notdeployed', required: The state of the environment.
    - `isProduction` boolean, required: Indicates if the environment is marked as Production.
    - `url` string, uri, required: The full URL to access the app running in the environment.
    - `dbVersion` string: The database version used.
    - `planName` string
    - `package` Package
      - `id` string, uuid, required: The ID of the package.
      - `appId` string, uuid, required: The unique App ID of the app. This can be seen on the **General** page of the app in the Mendix Portal. It is a UUID format.
      - `modelVersion` string, required: The version of the model. This is added by the developer when the package is created.
      - `runtimeVersion` string, required: The Mendix runtime version.
      - `createdOn` string, date-time, required
      - `expiresOn` string, date-time: The date the package will expire when not in use. This is set only for packages that are unused.
      - `description` string: The Tag description of the package, added by the developer when the package is created.
      - `fileName` string, required: The file name of the package (MDA) file.
      - `fileSize` integer, required: The size of the package file (MDA) in bytes.
  - `pagination` Pagination, required: Pagination attributes that reflect the parameters used to get the objects in the response.
    - `offset` integer, required: The offset used to get the array of objects. It starts at 0.
    - `limit` integer, required: The maximum number of objects to retrieve. When not specified then the server will set use the default value. If this is set to a number which is greater than the maximum supported number of objects, then the supported maximum is used.
    - `size` integer, required: The number of objects in the response.

## Other responses

- `400`: The request probably contains invalid data or there is data missing from the request. The error response gives additional feedback.
- `401`: There were no usable authentication credentials found. The error response gives additional feedback.
- `403`: Access is denied. The provided credentials are incorrect or the credentials do not have the required level of access. The error response gives additional feedback.
- `404`: The requested item could not be found. The error response gives additional feedback.
- `500`: Internal system error.

---

[API](https://skmtc.dev/mendix/apis/deploy-api.md) - [All operations](https://skmtc.dev/mendix/apis/deploy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mendix/apis/deploy-api/revisions/4e82641fb4c5?raw)
