Querying Details About an EVS Snapshot

Function

This API is used to query details about an EVS snapshot.

URI

  • URI format

    GET /v2/{project_id}/snapshots/{snapshot_id}

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    snapshot_id

    Yes

    Specifies the snapshot ID.

Request

  • Example request

    GET https://{endpoint}/v2/{project_id}/snapshots/f9faf7df-fdc1-4093-9ef3-5cba06eef995
    

Response

  • Parameter description

    Parameter

    Type

    Description

    snapshot

    Object

    Specifies the snapshot information. For details, see Parameters in the snapshot field.

    error

    Object

    Specifies the error message returned when an error occurs. For details, see Parameters in the error field.

  • Parameters in the snapshot field

    Parameter

    Type

    Description

    id

    String

    Specifies the snapshot ID.

    status

    String

    Specifies the snapshot status. For details, see EVS Snapshot Status.

    name

    String

    Specifies the snapshot name.

    Snapshots whose names started with prefix autobk_snapshot_ are automatically created by the system during backup creations. Do not delete these snapshots or use them to roll back the disk data.

    description

    String

    Specifies the snapshot description.

    created_at

    String

    Specifies the time when the snapshot was created.

    Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX

    updated_at

    String

    Specifies the time when the snapshot was updated.

    Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX

    metadata

    Object

    Specifies the snapshot metadata.

    If metadata contains the __system__enableActive field, the snapshot is automatically created during the backup of a server.

    volume_id

    String

    Specifies the ID of the snapshot's source disk.

    size

    Integer

    Specifies the snapshot size, in GB.

    os-extended-snapshot-attributes:project_id

    String

    Specifies the tenant ID. The tenant ID is the same as the project ID.

    os-extended-snapshot-attributes:progress

    String

    The reserved field.

  • Parameters in the error field

    Parameter

    Type

    Description

    message

    String

    The error message returned if an error occurs.

    code

    String

    The error code returned if an error occurs.

    For details about the error code, see Error Codes.

  • Example response

    {
        "snapshot": {
            "status": "available",
            "os-extended-snapshot-attributes:progress": "100%",
            "description": "daily backup",
            "created_at": "2013-02-25t04:13:17.000000",
            "metadata": {},
            "volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635",
            "os-extended-snapshot-attributes:project_id": "0c2eba2c5af04d3f9e9d0d410b371fde",
            "size": 1,
            "id": "2bb856e1-b3d8-4432-a858-09e4ce939389",
            "name": "snap-001",
            "updated_at": null
    
        }
    }
    

    or

    {
        "error": {
            "message": "XXXX",
            "code": "XXX"
        }
    }
    

    In the preceding example, error indicates a general error, for example, badRequest or itemNotFound. An example is provided as follows:

    {
        "itemNotFound": {
            "message": "XXXX",
            "code": "XXX"
        }
    }
    

Status Codes

  • Normal

    200

Error Codes

For details, see Error Codes.