Data Protection API V1

Protectables

Enables the Karbor user to access information about which resource types are protectable (i.e. can be protected by Karbor). In addition, enables the user to get additional information on each resource type, such as a list of actual instances and their dependencies.

GET
/v1/{tenant_id}/protectables

List protectable types

Lists all the available protectable types.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

protectable_type

body

array

All the available protection types.

Response Example

{
  "protectable_type": [
    "OS::Keystone::Project",
    "OS::Cinder::Volume",
    "OS::Glance::Image",
    "OS::Nova::Server"
  ]
}
GET
/v1/{tenant_id}/protectables/{protectable_type}

Show protectable type

Shows the information of a given protectable type.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

protectable_type

path

string

The name of a specified protectable type.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

protectable_type

body

object

A protectable_type object.

name

body

string

The name of the protectable type.

dependent_types

body

array

All dependent protectable type, It can be an empty list.

Response Example

{
  "protectable_type": {
    "name": "OS::Nova::Server",
    "dependent_types": [
      "OS::Cinder::Volume",
      "OS::Glance::Image"
    ]
  }
}
GET
/v1/{tenant_id}/protectables/{protectable_type}/instances

List protectable instances

List all the available instances for the given protectable type.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

protectable_type

path

string

The name of a specified protectable type.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

instances

body

array

The list of protectable_instance objects.

id

body

UUID

The UUID of a protectable instance.

type

body

string

The name of a specified protectable type.

name

body

string

The name of a protectable instance.

dependent_resources

body

array

All dependent resources for a given protectable instance, It can be an empty list.

instances_links

body

array

Links for transfer.

Response Example

{
  "instances":[
    {
        "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
        "type": "OS::Cinder::Volume",
        "name": "System volume",
        "extra_info": {
            "availability_zone": "az1"
        }
    },
    {
        "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
        "type": "OS::Cinder::Volume",
        "name": "Data volume",
        "extra_info": {
            "availability_zone": "az1"
        }
    }
],
  "instances_links": [
    {
      "href": "/v1/{project_id}/instances?limit=1&marker=cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
      "rel": "next"
    }
  ]
}
GET
/v1/{tenant_id}/protectables/{protectable_type}/instances/{resource_id}

Show protectable instance

Show the information about a specific instance and its immediate dependencies.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

protectable_type

path

string

The name of a specified protectable type.

resource_id

path

UUID

The UUID of a resource.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

instance

body

object

A protectable_instance object.

id

body

UUID

The UUID of a protectable instance.

type

body

string

The name of a specified protectable type.

name

body

string

The name of a protectable instance.

dependent_resources

body

array

All dependent resources for a given protectable instance, It can be an empty list.

Response Example

{
  "instance": {
    "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
    "type": "OS::Nova::Server",
    "name": "My VM",
    "dependent_resources": [
      {
        "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
        "type": "OS::Glance::Image",
        "name": "cirros-0.3.4-x86_64-uec"
      }
    ]
  }
}

Providers

Enables the Karbor user to list available providers and get parameters and result schema super-set for all plugins of a specific Provider.

GET
/v1/{tenant_id}/providers

List protection providers

List all the information about the providers offered at a given service, or part of the providers limited by ?limit={limit_num} by GET method. All providers need to be configured first by the admin.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

providers

body

array

The list of provider objects.

id

body

UUID

The UUID of the provider.

name

body

string

The name of the provider.

description

body

string

The description for this object, resource, operation and so on. May be NULL.

extended_info_schema

body

dict

The extended info schema for provider.

saved_info_schema

body

dict

The saved info schema for provider.

restore_schema

body

dict

The restore schema for provider.

providers_links

body

array

Links for transfer.

Response Example

{
  "providers": [
    {
      "id": "2220f8b1-975d-4621-a872-fa9afb43cb6c",
      "name": "OS Infra Provider",
      "description": "This provider uses OpenStack's own services (swift, cinder) as storage",
      "extended_info_schema": {
        "options_schema": {
          "OS::Cinder::Volume": {
            "required": [
              "backup_mode"
            ],
            "type": "object",
            "properties": {
              "backup_mode": {
                "default": "auto",
                "enum": [
                  "full",
                  "incremental",
                  "auto"
                ],
                "type": "string",
                "description": "The backup mode.",
                "title": "Backup Mode"
              }
            },
            "title": "Cinder Protection Options"
          }
        },
        "saved_info_schema": {
          "OS::Cinder::Volume": {
            "required": [
              "name"
            ],
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name for this backup.",
                "title": "Name"
              }
            },
            "title": "Cinder Protection Saved Info"
          }
        },
        "restore_schema": {
          "OS::Cinder::Volume": {
            "type": "object",
            "properties": {
              "restore_name": {
                "type": "string",
                "description": "The name of the restored volume.",
                "title": "Restore Name"
              }
            },
            "title": "Cinder Protection Restore"
          }
        }
      }
    }
  ],
  "providers_links": [
    {
      "href": "/v1/{project_id}/providers?limit={limit_num}&marker=cf56bd3e-97a7-4078-b6d5-f36246333fd9",
      "rel": "next"
    }
  ]
}
GET
/v1/{tenant_id}/providers/{provider_id}

Show protection provider

Shows the information about a specific provider.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

path

UUID

The UUID of a provider.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

provider

body

object

A provider object.

id

body

UUID

The UUID of the provider.

name

body

string

The name of the provider.

description

body

string

The description for this object, resource, operation and so on. May be NULL.

extended_info_schema

body

dict

The extended info schema for provider.

saved_info_schema

body

dict

The saved info schema for provider.

restore_schema

body

dict

The restore schema for provider.

Response Example

{
  "provider": {
    "id": "2220f8b1-975d-4621-a872-fa9afb43cb6c",
    "name": "OS Infra Provider",
    "description": "This provider uses OpenStack's own services (swift, cinder) as storage",
    "extended_info_schema": {
      "options_schema": {
        "OS::Cinder::Volume": {
          "required": [
            "backup_mode"
          ],
          "type": "object",
          "properties": {
            "backup_mode": {
              "default": "auto",
              "enum": [
                "full",
                "incremental",
                "auto"
              ],
              "type": "string",
              "description": "The backup mode.",
              "title": "Backup Mode"
            }
          },
          "title": "Cinder Protection Options"
        }
      },
      "saved_info_schema": {
        "OS::Cinder::Volume": {
          "required": [
            "name"
          ],
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name for this backup.",
              "title": "Name"
            }
          },
          "title": "Cinder Protection Saved Info"
        }
      },
      "restore_schema": {
        "OS::Cinder::Volume": {
          "type": "object",
          "properties": {
            "restore_name": {
              "type": "string",
              "description": "The name of the restored volume.",
              "title": "Restore Name"
            }
          },
          "title": "Cinder Protection Restore"
        }
      }
    }
  }
}

Plans

This API enables the Karbor user to access the protection Plan registry and do the following operations:

  • Plan CRUD.

  • List Plans.

  • Starting and suspending of plans.

When you perform the above operation, these status values are possible:

Status

Description

started

A plan is updated.

suspended

A plan is created.

GET
/v1/{tenant_id}/plans

List plans

List all the protection plans offered for the given project, or part of the protection plans limited by ?limit={limit_num} by GET method.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

plans

body

array

The list of plan objects.

id

body

UUID

The UUID of the plan.

name

body

string

The name of the plan.

resources

body

array

The list of all resources in plan.

status

body

string

The status of plan. A valid value is started or suspended.

provider_id

body

UUID

The UUID of the provider.

parameters

body

dict

The specified parameters for plan.

plans_links

body

array

Links for transfer.

Response Example

{
  "plans": [
    {
      "id": "9e5475d2-6425-4986-9136-a4f09642297f",
      "name": "My 3 tier application",
      "resources": [
        {
          "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
          "type": "OS::Glance::Image",
          "name": "cirros-0.3.4-x86_64-uec"
        },
        {
          "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
          "type": "OS::Nova::Server",
          "name": "App server"
        },
        {
          "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
          "type": "OS::Cinder::Volume",
          "name": "System volume",
          "extra_info": {
              "availability_zone": "az1"
          }
        },
        {
          "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
          "type": "OS::Cinder::Volume",
          "name": "Data volume",
          "extra_info": {
              "availability_zone": "az1"
          }
        }
      ],
      "status": "suspended",
      "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
      "parameters": {
        "OS::Nova::Server": {
          "backup_name": "os"
        },
        "OS::Nova::Server#cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01": {
          "backup_name": "crash"
        },
        "OS::Cinder::Volume": {
          "backup_name": "os"
        },
        "OS::Cinder::Volume#33b6bb0b-1157-4e66-8553-1c9e14b1c7ba": {
          "backup_name": "crash"
        }
      }
    }
  ],
  "plans_links": [
    {
      "href": "/v1/{project_id}/plans?limit={limit_num}&marker=9e5475d2-6425-4986-9136-a4f09642297f",
      "rel": "next"
    }
  ]
}
POST
/v1/{tenant_id}/plans

Create plan

Create a new plan.

To specify the parameters for this plan, include the parameters in the parameters attribute in the request body.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

plan

body

object

A plan object.

name

body

string

The name of the plan.

resources

body

array

The list of all resources in plan.

provider_id

body

UUID

The UUID of the provider.

parameters

body

dict

The specified parameters for plan.

Request Example

{
  "plan": {
    "name": "My 3 tier application",
    "resources": [
      {
        "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
        "type": "OS::Glance::Image",
        "name": "cirros-0.3.4-x86_64-uec"
      },
      {
        "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
        "type": "OS::Nova::Server",
        "name": "App server"
      },
      {
        "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
        "type": "OS::Cinder::Volume",
        "name": "System volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      },
      {
        "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
        "type": "OS::Cinder::Volume",
        "name": "Data volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      }
    ],
    "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
    "parameters": {
      "OS::Nova::Server": {
        "backup_name": "os"
      },
      "OS::Nova::Server#cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01": {
        "backup_name": "crash"
      },
      "OS::Cinder::Volume": {
        "backup_name": "os"
      },
      "OS::Cinder::Volume#33b6bb0b-1157-4e66-8553-1c9e14b1c7ba": {
        "backup_name": "crash"
      }
    }
  }
}

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

plan

body

object

A plan object.

id

body

UUID

The UUID of the plan.

name

body

string

The name of the plan.

resources

body

array

The list of all resources in plan.

status

body

string

The status of plan. A valid value is started or suspended.

provider_id

body

UUID

The UUID of the provider.

parameters

body

dict

The specified parameters for plan.

Response Example

{
  "plan": {
    "id": "9e5475d2-6425-4986-9136-a4f09642297f",
    "name": "My 3 tier application",
    "resources": [
      {
        "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
        "type": "OS::Glance::Image",
        "name": "cirros-0.3.4-x86_64-uec"
      },
      {
        "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
        "type": "OS::Nova::Server",
        "name": "App server"
      },
      {
        "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
        "type": "OS::Cinder::Volume",
        "name": "System volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      },
      {
        "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
        "type": "OS::Cinder::Volume",
        "name": "Data volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      }
    ],
    "status": "suspended",
    "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
    "parameters": {
      "OS::Nova::Server": {
        "backup_name": "os"
      },
      "OS::Nova::Server#cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01": {
        "backup_name": "crash"
      },
      "OS::Cinder::Volume": {
        "backup_name": "os"
      },
      "OS::Cinder::Volume#33b6bb0b-1157-4e66-8553-1c9e14b1c7ba": {
        "backup_name": "crash"
      }
    }
  }
}
GET
/v1/{tenant_id}/plans/{plan_id}

Show plan

Shows the information about a specific plan.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

plan_id

body

UUID

The UUID of the plan.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

plan

body

object

A plan object.

id

body

UUID

The UUID of the plan.

name

body

string

The name of the plan.

resources

body

array

The list of all resources in plan.

status

body

string

The status of plan. A valid value is started or suspended.

provider_id

body

UUID

The UUID of the provider.

parameters

body

dict

The specified parameters for plan.

Response Example

{
  "plan": {
    "id": "9e5475d2-6425-4986-9136-a4f09642297f",
    "name": "My 3 tier application",
    "resources": [
      {
        "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
        "type": "OS::Glance::Image",
        "name": "cirros-0.3.4-x86_64-uec"
      },
      {
        "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
        "type": "OS::Nova::Server",
        "name": "App server"
      },
      {
        "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
        "type": "OS::Cinder::Volume",
        "name": "System volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      },
      {
        "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
        "type": "OS::Cinder::Volume",
        "name": "Data volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      }
    ],
    "status": "suspended",
    "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
    "parameters": {
      "OS::Nova::Server": {
        "backup_name": "os"
      },
      "OS::Nova::Server#cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01": {
        "backup_name": "crash"
      },
      "OS::Cinder::Volume": {
        "backup_name": "os"
      },
      "OS::Cinder::Volume#33b6bb0b-1157-4e66-8553-1c9e14b1c7ba": {
        "backup_name": "crash"
      }
    }
  }
}
PUT
/v1/{tenant_id}/plans/{plan_id}

Update plan

Updates a specific plan.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

plan_id

body

UUID

The UUID of the plan.

plan

body

object

A plan object.

name (Optional)

body

string

The name of the plan.

resources (Optional)

body

array

The list of all resources in plan.

status (Optional)

body

string

The status of plan. A valid value is started or suspended.

Request Example

{
  "plan":{
    "status": "started",
    "name": "My 1 tier application"
  }
}

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

plan

body

object

A plan object.

id

body

UUID

The UUID of the plan.

name

body

string

The name of the plan.

resources

body

array

The list of all resources in plan.

status

body

string

The status of plan. A valid value is started or suspended.

provider_id

body

UUID

The UUID of the provider.

parameters

body

dict

The specified parameters for plan.

Response Example

{
  "plan": {
    "id": "9e5475d2-6425-4986-9136-a4f09642297f",
    "name": "My 1 tier application",
    "resources": [
      {
        "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
        "type": "OS::Glance::Image",
        "name": "cirros-0.3.4-x86_64-uec"
      },
      {
        "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
        "type": "OS::Nova::Server",
        "name": "App server"
      },
      {
        "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
        "type": "OS::Cinder::Volume",
        "name": "System volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      },
      {
        "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
        "type": "OS::Cinder::Volume",
        "name": "Data volume",
        "extra_info": {
            "availability_zone": "az1"
        }
      }
    ],
    "status": "started",
    "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
    "parameters": {
      "OS::Nova::Server": {
        "backup_name": "os"
      },
      "OS::Nova::Server#cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01": {
        "backup_name": "crash"
      },
      "OS::Cinder::Volume": {
        "backup_name": "os"
      },
      "OS::Cinder::Volume#33b6bb0b-1157-4e66-8553-1c9e14b1c7ba": {
        "backup_name": "crash"
      }
    }
  }
}
DELETE
/v1/{tenant_id}/plans/{plan_id}

Delete plan

Deletes a specific plan.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

202 - Accepted

Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

plan_id

body

UUID

The UUID of the plan.

Triggers

This API enables the Karbor user to access the trigger registry and do the following operations:

  • Trigger CRUD.

  • List Triggers.

GET
/v1/{tenant_id}/triggers

List triggers

List all the triggers offered for the given project, or part of the triggers limited by ?limit={limit_num} by GET method.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

triggers

body

array

The list of trigger objects.

id

body

UUID

The UUID of the trigger.

type

body

string

The type of the trigger.

name

body

string

The name of the trigger.

properties

body

dict

The property list for trigger. it must include “pattern” and “format”, may include “window” “start_time” and “end_time”.

plans_links

body

array

Links for transfer.

Response Example

{"triggers": [
    {"trigger_info": {
      "id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
      "type": "time",
      "name": "My backup trigger",
      "properties": {
        "format": "calendar",
        "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
        "start_time": "2015-12-17T08:30:00",
        "end_time": "2016-03-17T08:30:00",
        "window": "3600"
        }
      }
    }
  ],
 "triggers_links": [
    {
      "href": "/v1/{project_id}/triggers?limit={limit_num}&marker=2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
      "rel": "next"
    }
  ]
}
POST
/v1/{tenant_id}/triggers

Create trigger

Create a new trigger.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

trigger_info

body

object

A trigger object.

type

body

string

The type of the trigger.

name

body

string

The name of the trigger.

properties

body

dict

The property list for trigger. it must include “pattern” and “format”, may include “window” “start_time” and “end_time”.

Request Example

{"trigger_info": {
    "name": "My backup trigger",
    "type": "time",
    "properties": {
      "format": "calendar",
      "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
      "start_time": "2015-12-17T08:30:00",
      "end_time": "2016-03-17T08:30:00",
      "window": "3600"
    }
  }
}

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

trigger_info

body

object

A trigger object.

id

body

UUID

The UUID of the trigger.

type

body

string

The type of the trigger.

name

body

string

The name of the trigger.

properties

body

dict

The property list for trigger. it must include “pattern” and “format”, may include “window” “start_time” and “end_time”.

Response Example

{"trigger_info": {
    "id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
    "name": "My backup trigger",
    "type": "time",
    "properties": {
      "format": "calendar",
      "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
      "start_time": "2015-12-17T08:30:00",
      "end_time": "2016-03-17T08:30:00",
      "window": "3600"
    }
  }
}
GET
/v1/{tenant_id}/triggers/{trigger_id}

Show trigger

Shows the information about a specified trigger.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

trigger_id

path

UUID

The UUID of the trigger.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

trigger_info

body

object

A trigger object.

id

body

UUID

The UUID of the trigger.

type

body

string

The type of the trigger.

name

body

string

The name of the trigger.

properties

body

dict

The property list for trigger. it must include “pattern” and “format”, may include “window” “start_time” and “end_time”.

Response Example

{"trigger_info": {
    "id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
    "name": "My backup trigger",
    "type": "time",
    "properties": {
      "format": "calendar",
      "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
      "start_time": "2015-12-17T08:30:00",
      "end_time": "2016-03-17T08:30:00",
      "window": "3600"
    }
  }
}
PUT
/v1/{tenant_id}/triggers/{trigger_id}

Update trigger

Updates the name or properties of a specific trigger alone or at the same time.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

trigger_id

path

UUID

The UUID of the trigger.

trigger_info

body

object

A trigger object.

name (Optional)

body

string

The name of the trigger.

properties (Optional)

body

dict

The property list for trigger. it must include “pattern” and “format”, may include “window” “start_time” and “end_time”.

Request Example

{"trigger_info": {
    "name": "Trigger for backup",
    "properties": {
      "format": "calendar",
      "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
      "start_time": "2015-12-17T08:30:00",
      "end_time": "2016-03-17T08:30:00",
      "window": "3600"
    }
  }
}

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

trigger_info

body

object

A trigger object.

id

body

UUID

The UUID of the trigger.

type

body

string

The type of the trigger.

name

body

string

The name of the trigger.

properties

body

dict

The property list for trigger. it must include “pattern” and “format”, may include “window” “start_time” and “end_time”.

Response Example

{"trigger_info": {
    "id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
    "name": "Trigger for backup",
    "type": "time",
    "properties": {
      "format": "calendar",
      "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
      "start_time": "2015-12-17T08:30:00",
      "end_time": "2016-03-17T08:30:00",
      "window": "3600"
    }
  }
}
DELETE
/v1/{tenant_id}/triggers/{trigger_id}

Delete trigger

Deletes a specific trigger.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

202 - Accepted

Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

trigger_id

path

UUID

The UUID of the trigger.

Scheduled operations

This API enables the Karbor user to manage protection Operations:

  • Create a checkpoint for a given Protection Plan.

  • Delete unneeded checkpoints from the provider.

  • Status on a given Operation ID.

Scheduled operations are operations that will be executed when a specific trigger is triggered.

GET
/v1/{tenant_id}/scheduled_operations

List scheduled operations

List all the scheduled operations based on trigger and plan, or part of the scheduled operations limited by ?limit={limit_num} by GET method.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

operations

body

array

The list of scheduled operation objects.

scheduled_operation

body

object

A scheduled operation object.

id

body

UUID

The UUID of the scheduled operation.

name

body

string

The name of the scheduled operation.

description

body

string

The description for this object, resource, operation and so on. May be NULL.

operation_type

body

string

The type of the scheduled operation.

trigger_id

body

UUID

The UUID of the trigger.

operation_definition

body

dict

The operation definition for scheduled operation, include provider_id and plan_id key.

enabled

body

int

1” means Enable, “0” means Disable.

plans_links

body

array

Links for transfer.

Response Example

{"operations": [
    {"scheduled_operation": {
       "id": "1a2c0c3d-f402-4cd8-b5db-82e85cb51fad",
       "name": "My scheduled operation",
       "description": "It will run everyday",
       "operation_type": "protect",
       "trigger_id": "23902b02-5666-4ee6-8dfe-962ac09c3995",
       "operation_definition": {
         "provider_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa399",
         "plan_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398"
         },
       "enabled": 1
      }
    },
  ],
  "operations_links": [
    {
      "href": "/v1/{project_id}/scheduled_operations?limit={limit_num}&marker=1a2c0c3d-f402-4cd8-b5db-82e85cb51fad",
      "rel": "next"
    }
  ]
}
POST
/v1/{tenant_id}/scheduled_operations

Create scheduled operation

Create a new scheduled operation.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

scheduled_operation

body

object

A scheduled operation object.

name

body

string

The name of the scheduled operation.

description

body

string

The description for this object, resource, operation and so on. May be NULL.

operation_type

body

string

The type of the scheduled operation.

trigger_id

body

UUID

The UUID of the trigger.

operation_definition

body

dict

The operation definition for scheduled operation, include provider_id and plan_id key.

Request Example

{"scheduled_operation": {
    "name": "My scheduled operation",
    "description": "It will run everyday",
    "operation_type": "protect",
    "trigger_id": "23902b02-5666-4ee6-8dfe-962ac09c3995",
    "operation_definition": {
      "provider_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa399",
      "plan_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398"
    }
  }
}

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

scheduled_operation

body

object

A scheduled operation object.

id

body

UUID

The UUID of the scheduled operation.

name

body

string

The name of the scheduled operation.

description

body

string

The description for this object, resource, operation and so on. May be NULL.

operation_type

body

string

The type of the scheduled operation.

trigger_id

body

UUID

The UUID of the trigger.

operation_definition

body

dict

The operation definition for scheduled operation, include provider_id and plan_id key.

enabled

body

int

1” means Enable, “0” means Disable.

Response Example

{"scheduled_operation": {
    "id": "1a2c0c3d-f402-4cd8-b5db-82e85cb51fad",
    "name": "My scheduled operation",
    "description": "It will run everyday",
    "operation_type": "protect",
    "trigger_id": "23902b02-5666-4ee6-8dfe-962ac09c3995",
    "operation_definition": {
      "provider_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa399",
      "plan_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398"
    },
    "enabled": 1
  }
}
GET
/v1/{tenant_id}/scheduled_operations/{scheduled_operation_id}

Show scheduled operation

Shows the specified scheduled operation information.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

scheduled_operation_id

path

UUID

The UUID of the scheduled operation.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

scheduled_operation

body

object

A scheduled operation object.

id

body

UUID

The UUID of the scheduled operation.

name

body

string

The name of the scheduled operation.

description

body

string

The description for this object, resource, operation and so on. May be NULL.

operation_type

body

string

The type of the scheduled operation.

trigger_id

body

UUID

The UUID of the trigger.

operation_definition

body

dict

The operation definition for scheduled operation, include provider_id and plan_id key.

enabled

body

int

1” means Enable, “0” means Disable.

Response Example

{"scheduled_operation": {
    "id": "1a2c0c3d-f402-4cd8-b5db-82e85cb51fad",
    "name": "My scheduled operation",
    "description": "It will run everyday",
    "operation_type": "protect",
    "trigger_id": "23902b02-5666-4ee6-8dfe-962ac09c3995",
    "operation_definition": {
      "provider_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa399",
      "plan_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398"
    },
    "enabled": 1
  }
}
DELETE
/v1/{tenant_id}/scheduled_operations/{scheduled_operation_id}

Delete scheduled operation

Deletes a specific scheduled operation.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

202 - Accepted

Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

scheduled_operation_id

path

UUID

The UUID of the scheduled operation.

Checkpoints

This API enables the Karbor user to access and manage the checkpoints stored in the protection provider:

  • List all checkpoints given a Bank ID.

  • Show Information on a given checkpoint ID.

  • Delete a checkpoint.

  • Create a checkpoint.

When you perform the above operation, these status values are possible:

Status

Description

error

A checkpoint creation error occurred.

protecting

The checkpoint is being created.

available

The checkpoint is created, and available.

deleting

The checkpoint is being deleted.

deleted

The checkpoint is deleted.

error-deleting

A checkpoint deletion error occurred.

GET
/v1/{tenant_id}/providers/{provider_id}/checkpoints

List checkpoints

List all the checkpoints offered at the given provider, or part of checkpoints limited by ?limit={limit_num} by GET method.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

path

UUID

The UUID of a provider.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

checkpoints

body

array

The list of checkpoint objects.

id

body

UUID

The UUID of the checkpoint.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

status

body

string

The status of checkpoint. A valid value is error, protecting, available, deleting, deleted or error-deleting.

protection_plan

body

object

A plan object.

resource_graph

body

array

The resource graph of protection plan corresponding to the checkpoint.

checkpoints_links

body

array

Links for transfer.

Response Example

{
  "checkpoints": [
    {
      "id": "dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
      "project_id": "e486a2f49695423ca9c47e589b948108",
      "status": "available",
      "protection_plan": {
        "id": "3523a271-68aa-42f5-b9ba-56e5200a2ebb",
        "name": "My 3 tier application",
        "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
        "resources": [
          {
            "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
            "type": "OS::Glance::Image",
            "name": "cirros-0.3.4-x86_64-uec"
          },
          {
            "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
            "type": "OS::Nova::Server",
            "name": "App server"
          },
          {
            "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
            "type": "OS::Cinder::Volume",
            "name": "System volume"
          },
          {
            "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
            "type": "OS::Cinder::Volume",
            "name": "Data volume"
          }
        ]
      },
      "resource_graph": "[{'0x3': ['OS::Cinder::Volume', '33b6bb0b-1157-4e66-8553-1c9e14b1c7ba', 'Data volume'], '0x2': ['OS::Cinder::Volume', '25336116-f38e-4c22-81ad-e9b7bd71ba51', 'System volume'], '0x1': ['OS::Nova::Server', 'cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01', 'App server'], '0x0': ['OS::Glance::Image', '99777fdd-8a5b-45ab-ba2c-52420008103f', 'cirros-0.3.4-x86_64-uec']}, [['0x1', ['0x0']]]]"
    }
  ],
  "checkpoints_links": [
    {
      "href": "/v1/{project_id}/checkpoints?limit={limit_num}&marker=dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
      "rel": "next"
    }
  ]
}
POST
/v1/{tenant_id}/providers/{provider_id}/checkpoints

Create checkpoint

Execute the protect operation for the specified plan and create a checkpoint at a given provider.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

path

UUID

The UUID of a provider.

checkpoint

body

object

A checkpoint object.

plan_id

body

UUID

The UUID of the plan.

extra_info (Optional)

body

dict

The extra information for checkpoint.

Request Example

{
  "checkpoint": {
    "plan_id": "3523a271-68aa-42f5-b9ba-56e5200a2ebb",
    "extra_info": {
      "create-by": "operation-engine",
      "trigger_id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba"
    }
  }
}

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

checkpoint

body

object

A checkpoint object.

id

body

UUID

The UUID of the checkpoint.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

status

body

string

The status of checkpoint. A valid value is error, protecting, available, deleting, deleted or error-deleting.

protection_plan

body

object

A plan object.

resource_graph

body

array

The resource graph of protection plan corresponding to the checkpoint.

Response Example

{
  "checkpoint": {
    "id": "dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
    "project_id": "e486a2f49695423ca9c47e589b948108",
    "status": "available",
    "protection_plan": {
      "id": "3523a271-68aa-42f5-b9ba-56e5200a2ebb",
      "name": "My 3 tier application",
      "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
      "resources": [
        {
          "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
          "type": "OS::Glance::Image",
          "name": "cirros-0.3.4-x86_64-uec"
        },
        {
          "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
          "type": "OS::Nova::Server",
          "name": "App server"
        },
        {
          "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
          "type": "OS::Cinder::Volume",
          "name": "System volume"
        },
        {
          "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
          "type": "OS::Cinder::Volume",
          "name": "Data volume"
        }
      ]
    },
    "resource_graph": "[{'0x3': ['OS::Cinder::Volume', '33b6bb0b-1157-4e66-8553-1c9e14b1c7ba', 'Data volume'], '0x2': ['OS::Cinder::Volume', '25336116-f38e-4c22-81ad-e9b7bd71ba51', 'System volume'], '0x1': ['OS::Nova::Server', 'cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01', 'App server'], '0x0': ['OS::Glance::Image', '99777fdd-8a5b-45ab-ba2c-52420008103f', 'cirros-0.3.4-x86_64-uec']}, [['0x1', ['0x0']]]]"
  }
}
GET
/v1/{tenant_id}/providers/{provider_id}/checkpoints/{checkpoint_id}

Show checkpoint

Shows the information about the specified checkpoint offered at a given provider.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

path

UUID

The UUID of a provider.

checkpoint_id

path

UUID

The UUID of a checkpoint.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

checkpoint

body

object

A checkpoint object.

id

body

UUID

The UUID of the checkpoint.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

status

body

string

The status of checkpoint. A valid value is error, protecting, available, deleting, deleted or error-deleting.

protection_plan

body

object

A plan object.

resource_graph

body

array

The resource graph of protection plan corresponding to the checkpoint.

Response Example

{
  "checkpoint": {
    "id": "dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
    "project_id": "e486a2f49695423ca9c47e589b948108",
    "status": "available",
    "protection_plan": {
      "id": "3523a271-68aa-42f5-b9ba-56e5200a2ebb",
      "name": "My 3 tier application",
      "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
      "resources": [
        {
          "id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
          "type": "OS::Glance::Image",
          "name": "cirros-0.3.4-x86_64-uec"
        },
        {
          "id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
          "type": "OS::Nova::Server",
          "name": "App server"
        },
        {
          "id": "25336116-f38e-4c22-81ad-e9b7bd71ba51",
          "type": "OS::Cinder::Volume",
          "name": "System volume"
        },
        {
          "id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
          "type": "OS::Cinder::Volume",
          "name": "Data volume"
        }
      ]
    },
    "resource_graph": "[{'0x3': ['OS::Cinder::Volume', '33b6bb0b-1157-4e66-8553-1c9e14b1c7ba', 'Data volume'], '0x2': ['OS::Cinder::Volume', '25336116-f38e-4c22-81ad-e9b7bd71ba51', 'System volume'], '0x1': ['OS::Nova::Server', 'cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01', 'App server'], '0x0': ['OS::Glance::Image', '99777fdd-8a5b-45ab-ba2c-52420008103f', 'cirros-0.3.4-x86_64-uec']}, [['0x1', ['0x0']]]]"
  }
}
DELETE
/v1/{tenant_id}/providers/{provider_id}/checkpoints/{checkpoint_id}

Delete checkpoint

Deletes a specific checkpoint.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

path

UUID

The UUID of a provider.

checkpoint_id

path

UUID

The UUID of a checkpoint.

Response

Empty dict

Response Example

{}
PUT
/v1/{tenant_id}/providers/{provider_id}/checkpoints/{checkpoint_id}

Update checkpoint

Updates a specific checkpoint.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

path

UUID

The UUID of a provider.

checkpoint_id

path

UUID

The UUID of a checkpoint.

os-resetState

body

object

A os-resetState object.

os-resetState.state

body

string

The status of checkpoint. A valid value is error or available.

Response

Empty dict

Response Example

{}

Restores

This API enables the Karbor user restore a checkpoint on to a restore target:

  • List all restores by a given project.

  • Create restored system from a checkpoint.

  • Show the information of a given restore operation.

When you perform the above operation, these status values are possible:

Status

Description

started

A restore operation is in progress.

success

A restore operation is success.

failed

A restore operation is failed.

GET
/v1/{tenant_id}/restores

List restores

List all restores started, success or failed, triggered by a given project, or part of the protection plans limited by ?limit={limit_num} by GET method.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

restores

body

array

The list of restore objects.

id

body

UUID

The UUID of the restore.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

body

UUID

The UUID of the provider.

checkpoint_id

body

UUID

The UUID of the checkpoint.

restore_target

body

string

The target of the restore operation.

parameters

body

dict

specifies each resource or resource type paramters according to protection plugin’s restore schema.

status

body

string

The status of restore. A valid value is “started” “success” or “failed”.

resource_status

body

dict

Map of the restore status for each resource

resource_reason

body

dict

Map of the reason for failure of each resource in the restore

restores_links

body

array

Links for transfer.

Response Example

{
  "restores": [
    {
      "id": "22b82aa7-9179-4c71-bba2-caf5c0e68db7",
      "project_id": "e486a2f49695423ca9c47e589b948108",
      "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
      "checkpoint_id": "dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
      "restore_target": "http://192.168.1.2/identity/",
      "parameters": {
        "OS::Cinder::Volume": {
        },
        "OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": {
        }
      },
      "restore_auth": {
        "type": "password",
        "username": "admin",
        "password": "***"
      },
      "resource_status": {
        "OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": "restoring",
        "OS::Cinder::Volume#98eb847f-9f59-4d54-8b7b-5047bd2fa4c7": "error"
      },
      "resource_reason": {
        "OS::Cinder::Volume#98eb847f-9f59-4d54-8b7b-5047bd2fa4c7": "Backup not found"
      },
      "status": "success"
    }
  ],
  "restores_links": [
    {
      "href": "/v1/{project_id}/restores?limit={limit_num}&marker=22b82aa7-9179-4c71-bba2-caf5c0e68db7",
      "rel": "next"
    }
  ]
}
POST
/v1/{tenant_id}/restores

Create restore

Start a restore operation.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

restore

body

object

A restore object.

provider_id

body

UUID

The UUID of the provider.

checkpoint_id

body

UUID

The UUID of the checkpoint.

restore_target

body

string

The target of the restore operation.

restore_auth

body

dict

The authentication for restore, include “type” “username” and “password” key.

parameters

body

dict

specifies each resource or resource type paramters according to protection plugin’s restore schema.

Request Example

{
  "restore": {
    "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
    "checkpoint_id": "dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
    "restore_target": "http://192.168.1.2/identity/",
    "restore_auth": {
      "type": "password",
      "username": "admin",
      "password": "secretadmin"
    },
    "parameters": {
      "OS::Cinder::Volume": {
      },
      "OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": {
      }
    }
  }
}

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

restore

body

object

A restore object.

id

body

UUID

The UUID of the restore.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

body

UUID

The UUID of the provider.

checkpoint_id

body

UUID

The UUID of the checkpoint.

restore_target

body

string

The target of the restore operation.

restore_auth

body

dict

The authentication for restore, include “type” “username” and “password” key.

parameters

body

dict

specifies each resource or resource type paramters according to protection plugin’s restore schema.

status

body

string

The status of restore. A valid value is “started” “success” or “failed”.

resource_status

body

dict

Map of the restore status for each resource

resource_reason

body

dict

Map of the reason for failure of each resource in the restore

Response Example

{
  "restore": {
    "id": "22b82aa7-9179-4c71-bba2-caf5c0e68db7",
    "project_id": "e486a2f49695423ca9c47e589b948108",
    "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
    "checkpoint_id": "dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
    "restore_target": "http://192.168.1.2/identity/",
    "restore_auth": {
      "type": "password",
      "username": "admin",
      "password": "***"
    },
    "parameters": {
      "OS::Cinder::Volume": {
      },
      "OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": {
      }
    },
    "resource_status": {
      "OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": "restoring",
      "OS::Cinder::Volume#98eb847f-9f59-4d54-8b7b-5047bd2fa4c7": "restoring"
    },
    "resource_reason": {
    },
    "status": "success"
  }
}
GET
/v1/{tenant_id}/restores/{restore_id}

Show restore

Show the information of a given restore operation.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

restore_id

path

UUID

The UUID of the restore.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

restore

body

object

A restore object.

id

body

UUID

The UUID of the restore.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

provider_id

body

UUID

The UUID of the provider.

checkpoint_id

body

UUID

The UUID of the checkpoint.

restore_target

body

string

The target of the restore operation.

parameters

body

dict

specifies each resource or resource type paramters according to protection plugin’s restore schema.

status

body

string

The status of restore. A valid value is “started” “success” or “failed”.

resource_status

body

dict

Map of the restore status for each resource

resource_reason

body

dict

Map of the reason for failure of each resource in the restore

Response Example

{
  "restore": {
    "id": "22b82aa7-9179-4c71-bba2-caf5c0e68db7",
    "project_id": "e486a2f49695423ca9c47e589b948108",
    "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
    "checkpoint_id": "dcb20606-ad71-40a3-80e4-ef0fafdad0c3",
    "restore_target": "http://192.168.1.2/identity/",
    "restore_auth": {
      "type": "password",
      "username": "admin",
      "password": "***"
    },
    "parameters": {
      "OS::Cinder::Volume": {
      },
      "OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": {
      }
    },
    "resource_status": {
      "OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": "restoring",
      "OS::Cinder::Volume#98eb847f-9f59-4d54-8b7b-5047bd2fa4c7": "restoring"
    },
    "resource_reason": {
    },
    "status": "success"
  }
}

Operation logs

This API enables the Karbor user get the information about operation logs:

  • List all operation logs by a given project.

  • Show the information of a given operation log.

When you perform the above operation, these status values are possible:

Status

Description

available

A protect operation is finished.

success

A restore operation is success.

deleted

A delete operation is finished.

GET
/v1/{tenant_id}/operation_logs

List operation logs

List all operation logs, triggered by a given project, or part of the operation logs limited by ?limit={limit_num} by GET method.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

sort (Optional)

query

string

Comma-separated list of sort keys and optional sort directions in the form of < key > [: < direction > ]. A valid direction is asc (ascending) or desc (descending).

limit (Optional)

query

integer

Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

marker (Optional)

query

string

The ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

operation_logs

body

array

The list of operation_log objects.

id

body

UUID

The UUID of the operation_log.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

operation_type

body

string

The type of the scheduled operation.

checkpoint_id (Optional)

body

UUID

The UUID of the checkpoint.

plan_id (Optional)

body

UUID

The UUID of the plan.

provider_id (Optional)

body

UUID

The UUID of the provider.

restore_id (Optional)

body

UUID

The UUID of the restore.

scheduled_operation_id (Optional)

body

UUID

The UUID of the scheduled operation.

status (Optional)

body

string

The status of operation logs.

started_at (Optional)

body

string

The started time of the operation.

ended_at (Optional)

body

string

The ended time of the operation.

error_info (Optional)

body

dict

The error info of of the operation.

extra_info (Optional)

body

dict

The extra information for checkpoint.

operation_logs_links

body

array

Links for transfer.

Response Example

{
    "operation_logs": [{
        "status": "deleted",
        "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
        "restore_id": null,
        "checkpoint_id": "dbc459ff-2ac6-44fa-ba15-89350d7ebd43",
        "error_info": null,
        "ended_at": "2017-07-28T09:02:57.000000",
        "started_at": "2017-07-28T09:02:41.000000",
        "id": "f0aa664b-f385-4618-bc27-9e0116cceea7",
        "extra_info": null,
        "plan_id": "d58ffd3e-f64e-4b67-9bb0-b86d3483e7d0",
        "scheduled_operation_id": null,
        "operation_type": "protect"
    },
    {
        "status": "success",
        "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
        "restore_id": "7c0d396a-981b-4953-95f5-30382ddaa8bf",
        "checkpoint_id": "dbc459ff-2ac6-44fa-ba15-89350d7ebd43",
        "error_info": null,
        "ended_at": "2017-07-28T08:58:08.000000",
        "started_at": "2017-07-28T08:57:36.000000",
        "id": "8736649d-857e-4637-923c-3bdb35edd74e",
        "extra_info": null,
        "plan_id": null,
        "scheduled_operation_id": null,
        "operation_type": "restore"
    },
    {
        "status": "available",
        "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
        "restore_id": null,
        "checkpoint_id": "dbc459ff-2ac6-44fa-ba15-89350d7ebd43",
        "error_info": null,
        "ended_at": "2017-07-28T08:43:22.000000",
        "started_at": "2017-07-28T08:42:02.000000",
        "id": "7a16c731-0658-47dd-aa3b-98ee21830e23",
        "extra_info": null,
        "plan_id": "d58ffd3e-f64e-4b67-9bb0-b86d3483e7d0",
        "scheduled_operation_id": null,
        "operation_type": "protect"
    }],
    "operation_logs_links": [{
        "href": "/v1/{project_id}/operation_logs?limit={limit_num}&marker=7a16c731-0658-47dd-aa3b-98ee21830e23",
        "rel": "next"
    }]
}
GET
/v1/{tenant_id}/operation_logs/{operation_log_id}

Show operation log

Show the information of a given operation log.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

operation_log_id

path

UUID

The UUID of the operation log.

Response

Name

In

Type

Description

X-Openstack-Request-Id

header

UUID

A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.

operation_log

body

object

A operation_log object.

id

body

UUID

The UUID of the operation_log.

project_id

body

string

The UUID of the tenant in a multi-tenancy cloud.

operation_type

body

UUID

The type of the operation acitons.

checkpoint_id (Optional)

body

UUID

The UUID of the checkpoint.

plan_id (Optional)

body

UUID

The UUID of the plan.

provider_id (Optional)

body

UUID

The UUID of the provider.

restore_id (Optional)

body

UUID

The UUID of the restore.

scheduled_operation_id (Optional)

body

UUID

The UUID of the scheduled operation.

status (Optional)

body

string

The status of operation logs.

started_at (Optional)

body

string

The started time of the operation.

ended_at (Optional)

body

string

The ended time of the operation.

error_info (Optional)

body

dict

The error info of of the operation.

extra_info (Optional)

body

dict

The extra info of of the operation.

Response Example

{
    "operation_log": {
        "status": "available",
        "provider_id": "cf56bd3e-97a7-4078-b6d5-f36246333fd9",
        "restore_id": null,
        "checkpoint_id": "dbc459ff-2ac6-44fa-ba15-89350d7ebd43",
        "error_info": null,
        "ended_at": "2017-07-28T08:43:22.000000",
        "started_at": "2017-07-28T08:42:02.000000",
        "id": "7a16c731-0658-47dd-aa3b-98ee21830e23",
        "extra_info": null,
        "plan_id": "d58ffd3e-f64e-4b67-9bb0-b86d3483e7d0",
        "scheduled_operation_id": null,
        "operation_type": "protect"
    }
}

Services

Administrator only. Lists all Karbor services, enables or disables a Karbor service, freeze or thaw the specified karbor-operationengine host, failover a replicating karbor-operationengine host.

GET
/v1/{tenant_id}/os-services

List All Karbor Services

Lists all Karbor services. Provides details why any services were disabled.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

host (Optional)

query

string

Filter the service list result by host name of the service.

binary (Optional)

query

string

Filter the service list result by binary name of the service.

Response

Name

In

Type

Description

services

body

array

A list of service objects.

id

body

integer

UUID for the cleanup service.

binary

body

string

The binary name of the service.

host

body

string

The name of the host.

status

body

string

The status of the service. One of enabled or disabled.

state

body

string

The state of the service. One of up or down.

updated_at

body

string

The date and time stamp when the extension was last updated.

disabled_reason

body

string

The reason for disabling a service.

Response Example

{
  "services": [{
    "status": "enabled",
    "binary": "karbor-operationengine",
    "state": "down",
    "updated_at": "2019-11-03T11:50:25.000000",
    "host": "devstack",
    "disabled_reason": null,
    "id": 1
  }, {
    "status": "enabled",
    "binary": "karbor-operationengine",
    "state": "up",
    "updated_at": "2019-11-11T02:56:05.000000",
    "host": "devstack",
    "disabled_reason": null,
    "id": 2
  }, {
    "status": "enabled",
    "binary": "karbor-protection",
    "state": "up",
    "updated_at": "2019-11-11T02:56:03.000000",
    "host": "devstack",
    "disabled_reason": null,
    "id": 3
  }]
}
PUT
/v1/{tenant_id}/os-services/{service_id}

Update a Karbor Service Status

Update a Karbor operationengine service status. Specify the service by its id.

Response codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

Request

Name

In

Type

Description

tenant_id

path

string

The UUID of the tenant in a multi-tenancy cloud.

service_id

path

integer

The ID of the service.

Request Example

{
  "status": "disabled",
  "disabled_reason": "service down"
}

Response Parameters

Name

In

Type

Description

service

body

object

A service object.

id

body

integer

UUID for the cleanup service.

binary

body

string

The binary name of the service.

host

body

string

The name of the host.

status

body

string

The status of the service. One of enabled or disabled.

state

body

string

The state of the service. One of up or down.

updated_at

body

string

The date and time stamp when the extension was last updated.

disabled_reason

body

string

The reason for disabling a service.

Response Example

{
  "service": {
    "status": "disabled",
    "binary": "karbor-operationengine",
    "state": "down",
    "updated_at": "2019-11-03T11:50:25.000000",
    "host": "devstack",
    "disabled_reason": null,
    "id": 1
  }
}