• Cloud Server Backup Service

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

Querying Restoration Capabilities of Resources

Function

This API is used to check whether target resources can be restored.

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_restorable

    Yes

    List<restorable_param>

    Query parameter list

  • Parameter description of field restorable_param

    Parameter

    Mandatory

    Type

    Description

    checkpoint_item_id

    Yes

    String

    ID of the backup used to restore data

    target

    Yes

    restorable_target

    Restoration target

  • Parameter description of field restorable_target

    Parameter

    Mandatory

    Type

    Description

    resource_id

    Yes

    String

    ID of the resource to which the backup is restored

    resource_type

    Yes

    String

    Type of the target to which the backup is restored, for example, OS::Nova::Server for an ECS

    volumes

    Yes

    List<restore_volume_mapping>

    EVS disk mapping list for restoring a server

  • Parameter description of field restore_volume_mapping

    Parameter

    Mandatory

    Type

    Description

    backup_id

    Yes

    String

    EVS disk ID

    volume_id

    Yes

    String

    ID of the destination EVS disk for the restoration

  • Example request
    POST /v1/{project_id}/providers/{provider_id}/resources/action
    {
      "check_restorable" : [ {
        "checkpoint_item_id" : "8986ce68-3da7-4d29-9cc2-1921e9504975",
        "target" : {
          "resource_type" : "OS::Nova::Server",
          "resource_id" : "5aa119a8-d25b-45a7-8d1b-88e127885635",
          "volumes" : [ {
            "backup_id" : "7ea119a8-d25b-43a7-8d1b-88e12788513a",
            "volume_id" : "45baf976-c20a-4894-a7c3-c94b7376bf55"
          } ]
        }
      } ]
    }

Response

  • Element description

    Parameter

    Type

    Description

    restorable

    List<check_resp>

    Response parameter 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 reason

    resource_id

    String

    Resource ID

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

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.