Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Environment/ Obtaining Environment Details Based on the Environment ID
Updated on 2026-04-10 GMT+08:00

Obtaining Environment Details Based on the Environment ID

Function

This API is used to obtain environment details based on the environment ID.

Authorization Information

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    servicestage:environment:get

    read

    environment *

    servicestage:app:get

    -

URI

GET /v3/{project_id}/cas/environments/{environment_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Tenant's project ID. See Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

environment_id

Yes

String

Definition

Environment ID. See Obtaining All Environments.

Constraints

N/A

Range

N/A

Default Value

N/A

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition

Message body type (or format).

Constraints

N/A

Range

application/json;charset=utf8

Default Value

N/A

X-Auth-Token

Yes

String

Definition

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Response

Table 3 Response parameters

Parameter

Type

Description

id

String

Definition

Environment ID.

Range

N/A

name

String

Definition

Environment name.

Range

N/A

description

String

Definition

Environment description.

Range

N/A

project_id

String

Definition

Project ID.

Range

N/A

enterprise_project_id

String

Definition

Enterprise project ID.

Range

N/A

deploy_mode

String

Definition

Environment type.

Range

  • virtualmachine
  • container: Kubernetes
  • mixed: VM and Kubernetes.

vpc_id

String

Definition

VPC ID.

Range

N/A

creator

String

Definition

Environment creator.

Range

N/A

create_time

Integer

Definition

Environment creation time.

Range

N/A

update_time

Integer

Definition

Environment update time.

Range

N/A

labels

Array of objects

Definition

Label. You can use TMS to filter resources by labels. See Table 4.

resources

Array of objects

Definition

Resource. See Table 5.

type

String

Definition

Whether the Kubernetes environment is of the HA type.

Range

  • normal: non-HA environment.
  • high: HA environment.

resource_create_mode

String

Definition

Resource configuration mode.

Range

  • none: resource management.

config_mode

String

Definition

Configuration mode.

Range

  • ui

env_status

String

Definition

Environment resource status (non-real-time status).

Range

  • REFRESHING
  • UNKNOWN
  • NORMAL
  • PARTIALLY_NORMAL

configuration

Object

Definition

Environment variable of the environment. See Table 7.

Table 4 labels

Parameter

Type

Description

key

String

Definition

Label name.

Range

N/A

value

String

Definition

Label value.

Range

N/A

Table 5 resources

Parameter

Type

Description

id

String

Definition

Resource ID.

Range

N/A

name

String

Definition

Resource name.

Range

N/A

type

String

Definition

Resource type.

Range

  • vpc
  • eip
  • elb
  • cce
  • ecs
  • as
  • cse: ServiceComb engine
  • nacos: registry/configuration center
  • dcs
  • rds
  • subnet
  • acl
  • customServer
  • gaussdb
  • dms_rocketmq
  • css_es: Elasticsearch
  • custom_k8s: custom Kubernetes cluster

core

String

Definition

Number of cores of the custom server.

This parameter is returned when the resource type is customServer.

Range

N/A

gib

String

Definition

Memory of the custom server, in Gib.

This parameter is returned when the resource type is customServer.

Range

N/A

parameters

Map<String, String>

Definition

Resource parameters. See Table 6.

Table 6 parameters

Parameter

Type

Description

kube_config

String

Definition

Kubernetes connection configuration file.

This parameter is returned when the resource type is custom_k8s.

Range

N/A

Table 7 configuration

Parameter

Type

Description

resource_envs

Array of objects

Definition

Resource variable bound to the environment. See Table 8.

envs

Array of objects

Definition

Environment variable of the environment. See Table 9.

Table 8 resource_env

Parameter

Type

Description

resource_id

String

Definition

ID of the resource associated with the resource variable bound to the environment.

Range

N/A

resource_name

String

Definition

Name of the resource associated with the resource variable bound to the environment.

Range

N/A

resource_type

String

Definition

Type of the resource associated with the resource variable bound to the environment.

Range

  • vpc
  • eip
  • elb
  • cce
  • ecs
  • as
  • cse: ServiceComb engine
  • nacos: registry/configuration center
  • dcs
  • rds
  • subnet
  • acl
  • customServer
  • gaussdb
  • dms_rocketmq
  • css_es: Elasticsearch
  • custom_k8s: custom Kubernetes cluster

envs

Array of objects

Definition

Resource variable bound to the environment. See Table 9.

Table 9 config_env

Parameter

Type

Description

name

String

Definition

Key of the environment variable of the environment.

Range

N/A

value

String

Definition

Value of the environment variable of the environment.

Range

N/A

Example Request

None

Example Response

{
    "id": "ea011e01-2eb5-453f-87bf-874e4a855abe", 
    "name": "dev-env",
    "description": "develop environment", 
    "project_id": "bf8523d898b64e4eb956e3be3555ca16", 
    "enterprise_project_id": "0", 
    "deploy_mode": "virtualmachine",
    "vpc_id": "234241234124xxvasf2342xxxxxxxxxxx", 
    "resources": [
        {
            "id": "329b135e-7b31-4ea6-afb9-b69017bd0a80",
            "type": "ecs",
            "name": "ecs-test"
        }
    ], 
    "creator": "ss-test", 
    "create_time": 1578984198394, 
    "update_time": 1578984198394,
    "labels": null
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

See ServiceStage Error Codes.