Updated on 2025-07-10 GMT+08:00

Obtaining All Components

Function

This API is used to obtain all application components.

URI

GET /v3/{project_id}/cas/components

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Table 2 Query parameters

Parameter

Mandatory

Type

Description

limit

No

integer

Number of records to be queried. Value range: 0–100.

offset

No

integer

Query offset, which indicates the result after the Nth data record is queried.

order_by

No

String

Sorting field.

Numerated values:

  • create_time (default)
  • name
  • update_time

If the transferred value is not within the supported enumerated value range, the default sorting field is used.

order

No

String

Sorting order.

  • desc (default)
  • asc

application_name

No

String

Application name.

component_name

No

String

Component name.

Request

Table 3 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 the token, see Authentication.

Response

Table 4 Response parameters

Parameter

Type

Description

count

Integer

Total number of components.

components

Array of objects

Component parameters. See Table 5.

Table 5 components

Parameter

Type

Description

id

String

Component ID.

name

String

Component name.

labels

Array of objects

Label. For container-deployed components, you can query a workload by label. For VM-deployed components, you can configure a label of the corresponding microservice name to use graceful startup and shutdown. See Table 10.

status

Object

Component status. See Table 8.

runtime_stack

Object

Technology stack. See Table 7.

application_name

String

Application name.

application_id

String

Application ID.

environment_name

String

Environment name.

environment_id

String

Environment ID.

version

String

Version number.

source

Object

Source of the code or software package. See Table 6.

creator

String

Creator.

platform_type

String

Type of the platform where an application runs. Values:

  • cce
  • vmapp

external_accesses

Array of Objects

External access. See Table 11.

workload_kind

String

Workload type.

  • deployment
  • statefulset
  • daemonset

is_multi_containers

Boolean

Whether multi-container is set.

enterprise_project_id

String

Enterprise project ID.

engine_id

String

Engine ID.

swimlane_tag

String

Lane tag.

swimlane

Object

Lane. See Table 12.

refer_resources

Array of Objects

Associated resource. See Table 14.

config_mode

String

Component creation mode.

  • yaml
  • ui
  • template

template_source

Object

Source of the component template package. See Table 20.

Table 6 source

Parameter

Type

Description

kind

String

Component source kind.

  • code
  • package
  • image

version

String

Version number.

url

String

Package address. This parameter is mandatory when kind is set to package or image.

storage

String

Storage mode, for example, obs.

auth

String

Authentication mode, for example, iam.

repo_auth

String

Authorization name.

repo_namespace

String

Namespace of the code repository.

repo_ref

String

Code branch or tag. Example: master.

repo_type

String

Code repository type. Value: GitHub, BitBucket, or GitLab.

web_url

String

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

repo_url

String

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

http_username

String

Username. This parameter is mandatory when storage is set to http. Username and password authentication is supported.

http_password

String

Password. This parameter is mandatory when storage is set to http. Username and password authentication is supported.

http_command

String

Address of the custom software package. This parameter is mandatory when storage is set to http.

http_headers

Map<String, String>

This parameter is mandatory when storage is set to http. You can customize request headers as key-value pairs, for example, {"key":"xx","value":"xx""}.

Table 7 runtime_stack

Parameter

Type

Description

name

String

Technology stack name.

type

String

Technology stack type. Value: Java, Tomcat, Nodejs, Php, Docker, or Python.

When deploy_mode is set to virtualmachine, only Java, Tomcat, and Node.js are supported. When deploy_mode is set to container, all of the preceding types are supported.

version

String

Technology stack version. Example: 1.1.4.

deploy_mode

String

Deployment mode.

  • container
  • virtualmachine
Table 8 status parameters

Parameter

Type

Description

component_status

String

Component status.

  • INITIALIZING
  • UPGRADING
  • FAILED
  • RUNNING
  • DOWN
  • DELETING
  • DELETED
  • RESERVED
  • STARTING
  • STOPPING
  • STOPPED
  • RESTARTING
  • PENDING
  • UNKNOWN
  • PARTIALLY_FAILED

available_replica

Integer

Available instances.

replica

Integer

Total instances.

fail_detail

String

Failure cause.

  • cluster_deleted
  • cluster_unavailable
  • cluster_inaccessible
  • namespace_deleted
  • namespace_unavailable
  • namespace_inaccessible
  • resource_deleted
  • create_failed
  • delete_failed

last_job_id

String

ID of the last executed job.

create_time

Integer

Creation time.

update_time

Integer

Update time.

creator

String

Creator.

artifact

Object

Artifact information. See Table 9.

Table 9 artifact

Parameter

Type

Description

type

String

Component source type.

  • package
  • image

url

String

Software package or image address.

Table 10 labels

Parameter

Type

Description

key

String

Label name.

value

String

Label value.

Table 11 external_accesses

Parameter

Type

Description

protocol

String

External access type. Value: http or https.

address

String

External access address.

forward_port

Integer

External access port.

Table 12 swimlane

Parameter

Type

Description

id

String

Lane ID.

name

String

Lane name.

swimlane_group_id

String

Lane group ID.

type

String

Lane type.

  • BASE: baseline lane.
  • GRAY: dark launch lane.

tag

String

Lane tag, which is used to control traffic routing.

route_status

String

Route status.

  • ENABLE
  • DISABLED

rule_match_mode

String

Mode of matching routing rules. This parameter is valid when gray_release_type is set to CONTENT.

  • ALL: matches all rules.
  • ANY: matches any rule.

rules

Array of objects

Routing rules. This parameter is valid when gray_release_type is set to CONTENT. See Table 13.

weight

Integer

Lane traffic weight. The value ranges from 0 to 100. This parameter is valid when gray_release_type is set to WEIGHT.

project_id

String

Project ID.

create_time

Integer

Creation time.

update_time

Integer

Update time.

creator

String

Creator.

swimlane_group

Object

Lane group. See Table 17.

engine_ids

Array of String

Engine ID list.

Table 13 rules

Parameter

Type

Description

type

String

Type of dark launch matching rule. Currently, only HEADER is supported, that is, matching by header.

key

String

Key.

value

String

Value.

condition

String

Match condition.

  • EXACT
  • PREFIX
  • REGEX
Table 14 refer_resources

Parameter

Type

Description

id

String

Resource ID.

instance_id

String

Component instance ID.

type

String

Resource type.

  • vpc
  • eip
  • elb
  • cce
  • ecs
  • customServer
  • dcs
  • rds
  • cse: ServiceComb engine.
  • nacos: registry/configuration center.
  • pvc
  • gaussdb
  • dms_rocketmq
  • css_es: Elasticsearch

refer_type

String

Resource type.

  • platform: deployment type.
  • service: service type.

refer_alias

String

Resource alias.

parameters

Object

Resource parameters. See Table 15.

selectors

Objects

Resource selector. See Table 16.

Table 15 refer_resource_parameter

Parameter

Type

Description

namespace

String

Namespace.

name

String

Resource name.

capacity

Integer

Storage capacity, in GiB.

type

String

Volume declaration type. This parameter is specified when type is set to pvc in Table 14.

  • efs
  • obs
  • sfs
  • evs

class

String

Volume declaration subtype.

  • csi-sfsturbo: fixed when type is set to efs.
  • csi-obs: fixed when type is set to obs.
  • csi-nas: fixed when type is set to sfs.
  • csi-disk: fixed when type is set to evs.

pv_name

String

Volume name. This parameter is displayed when type is set to efs.

share_id

String

Volume handle. This parameter is displayed when type is set to efs.

share_export_location

String

Shared path of the volume. This parameter is displayed when type is set to efs.

share_proto

String

File system type of the volume. This parameter is displayed when type is set to efs. Default value: NFS.

obs_volume_type

String

OBS volume type. Default value: STANDARD.

access_mode

String

Storage volume access mode.

  • ReadWriteOnce: A volume can be mounted as read-write by a single node.
  • ReadWriteMany: A volume can be mounted as read-write by many nodes.

availableZone

String

AZ.

volume_type

String

Volume type.

Table 16 selectors

Parameter

Type

Description

name

String

Resource selector name.

flavor

String

Resource selector flavor.

labels

Map<String, String>

Label.

Table 17 swimlane_group

Parameter

Type

Description

id

String

Lane group ID.

name

String

Lane group name.

description

String

Lane group description.

creator

String

Creator.

project_id

String

Project ID.

gray_release_type

String

Dark launch type of the lane group.

  • WEIGHT: full-link dark launch based on the traffic ratio.
  • CONTENT: full-link dark launch based on content.

engine_ids

Array of string

Engine IDs of the gateway's target services.

gateways

Array of objects

List of target services. See Table 18.

create_time

Integer

Creation time.

update_time

Integer

Update time.

Table 18 gateways

Parameter

Type

Description

id

String

Gateway ID.

name

String

Gateway name.

engine_id

String

ID of the engine used by the target services.

target_services

Array of objects

List of target services in the gateway service management. See Table 19.

Table 19 target_services

Parameter

Type

Description

id

String

Target service ID.

name

String

Target service name.

host

String

Host information of the target service.

Table 20 template_source

Parameter

Type

Description

storage

String

Storage mode of the component template package.

  • devcloud: CodeArts release repository
  • obs
  • http: custom file address

url

String

Address of the component template package.

This parameter is valid only when the component template package storage mode is http.

http_username

String

Username.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication.

http_password

String

Password.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication.

http_headers

Array of objects

Request header. See Table 21.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is custom header authentication.

Table 21 http_headers

Parameter

Type

Description

key

String

Request key.

value

String

Request value.

Example Request

None

Example Response

{
    "components": [
        {
            "source": {
                "kind": "package",
                "url": "obs://bucket0001/weather-1.0.0.jar",
                "storage": "obs"
            },
            "name": "mycomponent",
            "id": "b8702b0f-94d3-4822-98a1-56815632a0a0",
            "labels": null,
            "runtime_stack": {
                "name": "OpenJDK8",
                "deploy_mode": "virtualmachine",
                "version": "1.1.1"
            },
            "external_accesses": null,
            "status": {
                "component_status": "RUNNING",
                "available_replica": 1,
                "replica": 1,
                "fail_detail": null,
                "last_job_id": "JOB8be53b2a-af9a-4e2b-8505-096688a52237",
                "creator": "ss-test",
                "create_time": 1679556221028,
                "update_time": 1679556318779
            },
            "environment_name": "sudo",
            "environment_id": "4d084044-0b80-4641-963c-b9c9f4092a4f",
            "application_name": "app-39mbbn",
            "application_id": "fc092465-a5fb-4a52-bc65-b735f18366d8",
            "creator": "ss-test",
            "platform_type": "cce",
            "version": "2023.0323.15181"
        }
    ],
    "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.