• Cloud Server Backup Service

csbs
  1. Help Center
  2. Cloud Server Backup Service
  3. API Reference
  4. API Description
  5. Backup Management
  6. Querying the Number of Backups

Querying the Number of Backups

Function

This API is used to query the number of backups.

URI

  • URI format

    GET /v1/{project_id}/checkpoint_items/count

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    status

    No

    String

    Query based on field status is supported.

    all_tenants

    No

    Boolean

    Whether backups of all tenants are queried

    name

    No

    String

    Query based on field name is supported.

    az

    No

    String

    AZ-based filtering is supported.

    resource_id

    No

    String

    Filtering based on the backup object ID is supported.

    resource_name

    No

    String

    Filtering based on the backup object name is supported.

    start_time

    No

    String

    Filtering based on the backup start time is supported.

    end_time

    No

    String

    Filtering based on the backup end time is supported.

    image_type

    No

    String

    Filtering based on the backup type is supported.

    policy_id

    No

    String

    Filtering based on policy_id is supported.

    ip

    No

    String

    Searching based on the VM's IP address is supported.

    checkpoint_id

    No

    String

    Filtering based on checkpoint_id is supported.

    resource_type

    No

    String

    Type of backup objects

  • Element description

None

  • Example request
    Querying the total number of backups:
    GET /v1/{project_id}/checkpoint_items/count
    Querying the number of backups with certain conditions:
    GET /v1/{project_id}/checkpoint_items/count?status=error

Response

  • Element description

    Parameter

    Type

    Description

    count

    Integer

    Number of backups

  • Example response
    {
      "count" : 10
    }

Status Codes

  • Normal

    Status Code

    Description

    200

    OK

  • Abnormal

    Status Code

    Description

    400

    Invalid request parameters.

    401

    Authentication failed.

    403

    No operation permission.

    404

    Requested object not found.

    500

    Service internal error.

    503

    Service unavailable.

Error Codes

For details, see Error Codes.