Help Center> ServiceStage> API Reference> Application Management APIs> Instances> Obtaining Component Instance Snapshots

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 queried. Value range: 0–100. Default value: 1000, indicating that a maximum of 1000 records can be queried and all records are displayed on the same page.

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 Parameters

Request parameters

None

Response Parameters

Response parameters

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": [{
        "create_time": 1571647078435,
        "description": "xxx",
        "instance_id": "945a7ee0-4bd7-4ae6-bb6a-6fe36e866ce0",
        "version": "1.6"
    },
    "count": 10]
}

Status Code

Table 5 Status codes

HTTP Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

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