• Cloud Server Backup Service

csbs
  1. Help Center
  2. Cloud Server Backup Service
  3. API Reference
  4. API Description
  5. Resource Management
  6. Querying Backup Capabilities of Resources

Querying Backup Capabilities of Resources

Function

This API is used to query whether resources can be backed up.

URI

  • URI format

    POST /v1/{project_id}/providers/{provider_id}/resources/action

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

    provider_id

    Yes

    String

    Backup provider ID

Request

  • Element description

    Parameter

    Mandatory

    Type

    Description

    check_protectable

    Yes

    List<protectable_param>

    Query parameter list

  • Parameter description of field protectable_param

    Parameter

    Mandatory

    Type

    Description

    resource_id

    Yes

    String

    ID of the resource (server, or EVS disk) to be checked

    resource_type

    Yes

    String

    Type of the resource to be checked, for example, OS::Nova::Server for an ECS

  • Example request
    POST /v1/{project_id}/providers/{provider_id}/resources/action
    {
      "check_protectable" : [ {
        "resource_id" : "6507cb66-90dc-4a12-a573-c9f3398f899d",
        "resource_type" : "OS::Nova::Server"
      } ]
    }

Response

  • Element description

    Parameter

    Type

    Description

    protectable

    List<check_resp>

    Check result list

  • Parameter description of field check_resp

    Parameter

    Type

    Description

    result

    Boolean

    Whether backup or restoration is supported

    resource_type

    String

    Resource type

    error_code

    String

    Error code

    error_msg

    String

    Error message, which will be returned if the VM is associated with a backup policy

    resource_id

    String

    Resource ID

  • Example response
    {
      "protectable" : [ {
        "resource_id" : "6507cb66-90dc-4a12-a573-c9f3398f899d",
        "resource_type" : "OS::Nova::Server",
        "result" : true
      } ]
    }

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.