All Products
Search
Document Center

:List environments

Last Updated:Jul 15, 2026

Lists all environments in the current account that are not archived. This endpoint supports cursor-based pagination.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Query parameters

Parameter

Type

Required

Description

limit

integer

No

The maximum number of items to return per page. The default value is 20.

after_id

string

No

A cursor for pagination. The response includes records that appear after this ID.

before_id

string

No

A cursor for pagination. The response includes records that appear before this ID.

For more details, see Pagination.

Example request

curl -s -X GET "https://api.qoder.com.cn/api/v1/cloud/environments" \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK

{
  "data": [
    {
      "id": "env_019e3bb39b6774d8878cd0b9d237574b",
      "type": "environment",
      "name": "doc-test-env",
      "description": "",
      "status": "ready",
      "config": {
        "type": "cloud",
        "networking": {
          "type": "limited"
        },
        "packages": {
          "apt": ["curl"]
        }
      },
      "archived": false,
      "archived_at": null,
      "created_at": "2026-05-18T15:28:07.017808Z",
      "updated_at": "2026-05-18T15:28:07.017808Z"
    },
    {
      "id": "env_019e2590d33f711fabf42f2857cecd8a",
      "type": "environment",
      "name": "default",
      "description": "",
      "status": "ready",
      "config": {
        "type": "cloud",
        "networking": {
          "allow_package_managers": true,
          "type": "limited"
        },
        "packages": {}
      },
      "archived": false,
      "archived_at": null,
      "created_at": "2026-05-14T08:18:28.800813Z",
      "updated_at": "2026-05-14T08:18:28.800813Z"
    }
  ],
  "first_id": "env_019e3bb39b6774d8878cd0b9d237574b",
  "has_more": false,
  "last_id": "env_019e2590d33f711fabf42f2857cecd8a"
}

Response fields

Field

Type

Description

data

array

A list of environment objects.

first_id

string

The ID of the first record on this page.

last_id

string

The ID of the last record on this page.

has_more

boolean

Indicates whether more results are available. Returns false on the last page.

Error codes

HTTP

Type

Description

401

authentication_error

Authentication failed. The Personal Access Token (PAT) is invalid or has expired.

403

permission_error

You do not have permission to perform this action.