Help Center/ Cloud Application Engine/ API Reference/ CAE API/ Component./ Obtaining the Component Snapshot List
Updated on 2025-10-22 GMT+08:00

Obtaining the Component Snapshot List

Function

Obtain the component snapshot list.

URI

GET /v1/{project_id}/cae/applications/{application_id}/components/{component_id}/snapshots

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. See Obtaining a Project ID.

application_id

Yes

String

Application ID.

component_id

Yes

String

Component ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

  • Obtain the token. For details, see "Obtaining a User Token" in Identity and Access Management API Reference (https://support.huaweicloud.com/intl/en-us/api-iam/iam_30_0001.html).

  • The value of X-Subject-Token in the response header is the token value.

X-Enterprise-Project-ID

No

String

Enterprise project ID.

  • When an environment is created, it will be bound with an enterprise project ID.

  • Enter 0 or up to 36 characters in UUID format with hyphens (-).

  • If this parameter is not specified or set to 0, resources in the default enterprise project are queried.

NOTE:
For details about how to obtain enterprise project IDs and enterprise project features, see Enterprise Management User Guide.

X-Environment-ID

Yes

String

Environment ID.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

api_version

String

API version. Fixed value: v1.

kind

String

API type. Fixed value: ComponentSnapshot.

items

Array of ComponentSnapshotItem objects

Snapshot list.

Table 4 ComponentSnapshotItem

Parameter

Type

Description

component_id

String

Component ID.

index

Integer

Snapshot index.

context

ComponentSnapshotContext object

Context.

created_at

String

Creation time.

updated_at

String

Update time.

Table 5 ComponentSnapshotContext

Parameter

Type

Description

app_id

String

Application ID.

available_replica

Integer

Number of available instances.

build

String

Component build information.

build_id

String

Build job ID.

build_log_id

String

Build log ID.

env_id

String

Environment ID.

id

String

Component ID.

image_url

String

Image address.

job_id

String

Job ID.

log_group_id

String

ID of an LTS log group.

log_stream_id

String

ID of an LTS log stream.

name

String

Component name.

operation

String

Operation performed on a component.

operation_status

String

Status of the operation performed on a component.

  • failed

  • deploying

  • retrying

  • restarting

  • scaling

  • stopping

  • starting

  • rollingBack

  • upgrading

  • configuring

  • deleting

  • deploy_failed

  • retry_failed

  • restart_failed

  • scale_failed

  • stop_failed

  • start_failed

  • rollback_failed

  • upgrade_failed

  • configure_failed

  • delete_failed

  • create_succeeded

  • deploy_succeeded

  • retry_succeeded

  • restart_succeeded

  • scale_succeeded

  • stop_succeeded

  • start_succeeded

  • rollback_succeeded

  • upgrade_succeeded

  • configure_succeeded

replica

Integer

Number of instances.

resource_limit

String

Component specifications.

runtime

String

Language or runtime.

source

String

Component source.

status

String

Component status.

  • created: not deployed.

  • running

  • paused

  • notReady

version

String

Component version.

created_at

String

Creation time.

updated_at

String

Update time.

Example Requests

Obtain the component snapshot list.

GET https://{endpoint}/v1/{project_id}/cae/applications/{application_id}/components/{component_id}/snapshots

Example Responses

Status code: 200

OK

{
  "api_version" : "v1",
  "kind" : "ComponentSnapshot",
  "items" : [ {
    "component_id" : "79229698-e2ec-47db-81df-599b59a9fc17",
    "index" : 1,
    "context" : {
      "app_id" : "d65fd1d7-9df8-424f-ba4d-44b1bb7cfc05",
      "available_replica" : 1,
      "build" : "{\"archive\":{\"artifact_namespace\":\"cae-test\"},\"parameters\":{\"base_image\":\"\"}}",
      "env_id" : "7eb2f920-e183-4d4e-9b9d-fffb875ae520",
      "id" : "79229698-e2ec-47db-81df-599b59a9fc17",
      "image_url" : "nginx:stable-alpine-perl",
      "job_id" : "4681ac3f-5771-4d98-97ad-9e25171b26b8",
      "log_group_id" : "96fe4c34-578a-4ea8-8e77-ee59bf8a0fd1",
      "log_stream_id" : "9c024ad2-5c80-45ee-8651-5f2bd89d3c7e",
      "name" : "test",
      "operation" : "deploy",
      "operation_status" : "started",
      "replica" : 1,
      "resource_limit" : "{\"cpu_limit\":\"500m\",\"memory_limit\":\"1Gi\"}",
      "runtime" : "Docker",
      "source" : "{\"type\":\"image\",\"url\":\"nginx:stable-alpine-perl\"}",
      "status" : "running",
      "version" : "1.0.0",
      "created_at" : "2023-02-27T06:22:46.812877Z",
      "updated_at" : "2023-02-27T06:22:46.812877Z"
    },
    "created_at" : "2023-02-27T08:26:39.362226Z",
    "updated_at" : "2023-02-27T08:26:39.362226Z"
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.