All Products
Search
Document Center

:Get an environment

Last Updated:Jul 03, 2026

Retrieves a single environment by its ID.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Path parameters

Parameter

Type

Required

Description

environment_id

string

Yes

The unique identifier for the environment (prefixed with env_)

Example request

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

Example response

HTTP 200 OK

{
  "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"
}

Response fields

Field

Type

Description

id

string

The unique identifier for the environment. The value is prefixed with env_.

type

string

The resource type. The value is always "environment".

name

string

The name of the environment.

description

string

The description of the environment.

status

string

The status of the environment. Possible values are "ready" and "archived".

config

object

The environment configuration object.

config.type

string

The environment type. The value is always "cloud".

config.networking

object

The network access configuration.

config.packages

object

The pre-installed package configuration.

archived

boolean

Indicates whether the environment is archived.

archived_at

string|null

The ISO 8601 timestamp when the environment was archived, or null if it has not been archived.

created_at

string

The ISO 8601 timestamp when the environment was created.

updated_at

string

The ISO 8601 timestamp when the environment was last updated.

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 access this resource.

404

not_found_error

The specified environment does not exist.