Updated on 2023-06-25 GMT+08:00

Obtaining Component Instance Snapshots

Function

This API is used to obtain component instance snapshots.

Instance snapshots refer to the instance information about the source version. They can be used for version rollback.

URI

GET /v2/{project_id}/cas/applications/{application_id}/components/{component_id}/instances/{instance_id}/snapshots

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Tenant's project ID.

application_id

String

Yes

Application ID.

component_id

String

Yes

Component ID.

instance_id

String

Yes

Component instance ID.

Table 2 Query parameters

Parameter

Type

Mandatory

Description

limit

Integer

No

Number of records to be displayed. The value is 1000 or ranges from 0 to 100. If the specified value is not within the range, value 10 is assigned. In the non-pagination scenario, the value is 1000. In the pagination scenario, the value ranges from 0 to 100.

offset

Integer

No

Offset.

order_by

String

No

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

order

String

No

Descending or ascending order. Default value: desc.

Request

None

Response

Table 3 Response parameters

Parameter

Type

Description

count

Integer

Number of snapshots.

snapshots

Array of objects

Snapshot parameters. See Table 4.

Table 4 snapshot parameters

Parameter

Type

Description

create_time

Integer

Creation time.

description

String

Description.

instance_id

String

Component instance ID.

version

String

Version number.

Example

Example request

None

Example response

{
	"snapshots": [
		{
			"version": "1.0.0",
			"description": "{\"action\":\"New Version: 1.0.0\"}",
			"instance_id": "11eddb33-140b-4e51-b1e2-6ec265373ca3",
			"create_time": 1610331830841
		}
	],
	"count": 1
}

Status Code

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.