Help Center/ ServiceStage/ API Reference/ Historical APIs/ Application Management V2 APIs/ Component/ Obtaining Deployment Information About All Components of an Application
Updated on 2025-11-06 GMT+08:00

Obtaining Deployment Information About All Components of an Application

Function

This API is used to obtain the deployment information about all components of an application.

URI

GET /v2/{project_id}/cas/applications/{application_id}/components/overviews

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

application_id

Yes

String

Application ID. See Obtaining All Applications.

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

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 a token, see Obtaining a User Token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records to be displayed. If this parameter is specified, pagination query is performed. The value ranges from 0 to 100. If this parameter is not specified, no pagination query is performed. A maximum of 1000 records can be displayed.

offset

No

Integer

Offset. Default value: 0.

order_by

No

String

Sorting field. By default, query results are sorted by creation time.

Enumerated values: create_time, name, and update_time.

order

No

String

Descending or ascending order. Default value: desc.

Response

Table 4 Response parameters

Parameter

Type

Description

count

Integer

Number of components.

components

Array of objects

Component deployment information list. See Table 5.

Table 5 components

Parameter

Type

Description

id

String

Component ID.

application_id

String

Application ID.

name

String

Application component name.

project_id

String

Project ID.

runtime

String

Runtime type.

category

String

Application component category. Options: Webapp, MicroService, or Common.

sub_category

String

Application component sub-category.

Webapp sub-types include Web, Magento, and Wordpress.

MicroService sub-types include Java Chassis, Go Chassis, Mesher, and SpringCloud.

Common sub-category can be empty.

description

String

Component description.

status

Integer

Value: 0 or 1.

0: Normal.

1: Being deleted.

source

Object

Component source. See Table 6.

build

Object

Build project. See Table 9.

creator

String

Creator.

create_time

Long

Creation time.

update_time

Long

Update time.

instances

Array of objects

Component deployment information list. See Table 11.

Table 6 source

Parameter

Type

Description

kind

String

Source type. Value: source code or artifact software package.

spec

Object

Content structure of spec when the value of kind is artifact. See Table 7.

Table 7 source spec

Parameter

Type

Description

storage

String

Storage mode. Value: swr or obs.

type

String

Type. Value: package.

url

String

Source code address of the software package. Example: https://{IP}:20202/xxx/xxx.jar.

webUrl

String

Address of the software package/source code repository.

auth

String

Authentication mode. Value: iam or none. Default value: iam.

properties

Object

Other attributes of the software package. You need to add these attributes only when you set storage to obs. See Table 8.

repo_type

String

Code repository. Value: GitHub, GitLab, Gitee, or Bitbucket.

repo_url

String

Code repository URL. Example: https://github.com/example/demo.git.

repo_ref

String

Code branch or tag. Default value: master.

repo_auth

String

Authorization name, which can be obtained from the authorization list.

Table 8 source spec properties

Parameter

Type

Description

endpoint

String

OBS endpoint address. Example: https://obs.region_name.external_domain_name.com.

bucket

String

Name of the OBS bucket where the software package is stored.

key

String

Object in an OBS bucket, which is usually the name of the software package. If there is a folder, the path of the folder must be added. Example: test.jar or demo/test.jar.

Table 9 build

Parameter

Type

Description

id

String

Build ID, which can be obtained from the build list.

parameters

Object

Environment variable of a build job. See Table 10.

Table 10 build parameters

Parameter

Type

Description

build_cmd

String

Compilation command. By default:

1. When build.sh exists in the root directory, the command is ./build.sh.

2. When build.sh does not exist in the root directory, the command varies depending on the OS. Example:

Java and Tomcat: mvn clean package

Node.js: npm build

dockerfile_path

String

Address of the Docker file. By default, the Docker file is in the root directory (./).

artifact_namespace

String

Build archive organization. Default value: cas_{project_id}.

cluster_id

String

ID of the cluster to be built.

node_label_selector

Object

key: label key. value: label value.

Table 11 instances

Parameter

Type

Description

instance_id

String

Component instance ID.

instance_name

String

Component instance name.

description

String

Instance description.

environment_id

String

Component environment ID.

platform_type

String

Platform type.

Value: cce or vmapp.

flavor_id

String

Resource flavor.

artifacts

Map<String,Object>

Artifact. key indicates the component name. In the Docker container scenario, key indicates the container name. See Table 12.

version

String

Component version.

configuration

Object

Component configurations, such as environment variables.

creator

String

Creator.

create_time

Long

Creation time.

update_time

Long

Update time.

external_accesses

Object

Access mode list. See Table 13.

refer_resources

Object

Deployed resource list. See Table 14.

status_detail

Object

Status details. See Table 15.

Table 12 instances artifacts

Parameter

Type

Description

storage

String

Storage mode. Value: swr or obs.

type

String

Type. Value: package (VM-based deployment) or image (container-based deployment).

url

String

Software package or image address. For the image which is automatically generated using the component source code or software package, the format is "Component name:v${index}".

auth

String

Authentication mode. Value: iam or none. Default value: iam.

version

String

Version number.

properties

Object

Property information.

Table 13 instances external_accesses

Parameter

Type

Description

id

String

ID.

protocol

String

Protocol.

address

String

Access address.

forward_port

Integer

Port for listening to an application component process.

type

String

Type.

status

String

Status.

create_time

Long

Creation time.

update_time

Long

Update time.

Table 14 instances refer_resources

Parameter

Type

Description

id

String

Resource ID.

type

String

Resource type.

Basic resources: cce, as, and ecs.

Optional resources: rds, dcs, elb, cse, and other services.

refer_alias

String

Application alias. This parameter is available only when type is set to dcs. Value: "distributed_session", "distributed_cache", or "distributed_session, distributed_cache" (default).

parameters

Object

Reference resource parameter.

Table 15 instances status_detail

Parameter

Type

Description

status

String

Instance status.

available_replica

Integer

Number of normal instance replicas.

replica

Integer

Number of instance replicas.

fail_detail

String

Failure description.

cluster_deleted

cluster_unavailable

cluster_inaccessible

namespace_deleted

namespace_unavailable

namespace_inaccessible

resource_deleted

last_job_id

String

Latest job ID.

last_job_status

String

Latest job status.

enterprise_project_id

String

Enterprise project ID.

Example Request

None

Example Response

{
        "components": [
                {
                        "description": "",
                        "id": "df490c83-875f-4c67-bee5-89a2b321cceb",
                        "application_id": "8cb9b39b-b8bd-4ef5-8263-e5ca83fbafb3",
                        "name": "sadxzc",
                        "runtime": "Docker",
                        "sub_category": "",
                        "source": {
                                "kind": "artifact",
                                "spec": {
                                        "auth": "iam",
                                        "storage": "swr",
                                        "type": "image",
                                        "url": "swr.test.com.cn/ss-test-ui-test:v1"
                                }
                        },
                        "status": 0,
                        "creator": "zhangyuhao",
                        "create_time": 1761649242446,
                        "update_time": 1761703557147,
                        "project_id": "e72f3b5a22d8458cad5ed8cf40b86acf",
                        "instances": [
                                {
                                        "environment_id": "7c1ce30a-dca2-44a1-b3d8-85523c3c474c",
                                        "instance_id": "166f7e7a-34b1-4d8d-8646-0b57f8432f3b",
                                        "instance_name": "sadxzc-yw-cce-env02-s38smo",
                                        "version": "2025.1029.10074",
                                        "create_time": 1761649242570,
                                        "update_time": 1761703599817,
                                        "platform_type": "cce",
                                        "flavor_id": "CUSTOM-10G:null-null:null-null",
                                        "configuration": {
                                                "configs": []
                                        },
                                        "artifacts": {
                                                "sadxzc": {
                                                        "storage": "swr",
                                                        "type": "image",
                                                        "url": "swr.test.com.cn/ss-test-ui-test:v1",
                                                        "auth": "iam"
                                                }
                                        },
                                        "status_detail": {
                                                "status": "RUNNING",
                                                "replica": 1,
                                                "available_replica": 1
                                                "fail_detail": null,
                                                "last_job_id": "JOB9c7e6c3d-9172-4c12-b207-4a6ae8cc57bc",
                                                "last_job_status": "SUCCEEDED",
                                                "enterprise_project_id": "0"
                                        },
                                        "external_accesses": [
                                                {
                                                        "protocol": "HTTP",
                                                        "address": "www.sad",
                                                        "forward_port": 22,
                                                        "type": "SPECIFIED",
                                                        "status": "NORMAL",
                                                        "create_time": 1761703557194,
                                                        "update_time": 1761703557194
                                                },
                                                {
                                                        "protocol": "tcp",
                                                        "address": "71.160.219.138",
                                                        "forward_port": 30464,
                                                        "type": "IP_ADDR",
                                                        "status": "NORMAL",
                                                        "create_time": 1761706159709,
                                                        "update_time": 1761706159709
                                                }
                                        ],
                                        "refer_resources": [
                                                {
                                                        "id": "cba3cafc-59b8-4330-b8ee-987bc03c78c6",
                                                        "type": "dcs",
                                                        "refer_alias": "distributed_session,distributed_cache",
                                                        "parameters": {
                                                                "name": "dcs-klq7",
                                                                "cluster": false
                                                        }
                                                }
                                        ]
                                }
                        ]
                }
        ],
        "count": 1
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

See ServiceStage Error Codes.