![chenying](/assets/img/avatar_default.png)
Scenario #1 User need a parameter for the region name to query resource instances from different region endpoint. Scenario #2 User uses the Protectable Instances API to query database instances from the verdor's backup software. User must provide some parameters about authentication to the restfull API of the verdor's backup software. A dict type parameter is needed for Protectable Instances API. And it is optional. blueprint instances-parameters Change-Id: I6677e86467c516433a1ba15eac42f339b953d3d9
2029 lines
63 KiB
YAML
2029 lines
63 KiB
YAML
swagger: '2.0'
|
|
info:
|
|
title: Karbor API
|
|
description: Protect all you hold dear
|
|
version: 0.99.0
|
|
host: api.karbor.nowhere.com
|
|
schemes:
|
|
- https
|
|
basePath: /v1
|
|
produces:
|
|
- application/json
|
|
paths:
|
|
/{project_id}/providers:
|
|
get:
|
|
summary: Providers
|
|
description: |
|
|
The Providers endpoint returns information about the providers
|
|
offered at a given service. All providers need to be configured
|
|
first by the admin.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
tags:
|
|
- Protection Provider
|
|
responses:
|
|
'200':
|
|
description: An array of providers
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Provider'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/providers/{provider_id}:
|
|
get:
|
|
summary: Provider
|
|
description: |
|
|
The Providers endpoint returns information about a specific provider.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/provider_idParam'
|
|
tags:
|
|
- Protection Provider
|
|
responses:
|
|
'200':
|
|
description: A protection provider.
|
|
schema:
|
|
$ref: '#/definitions/Provider'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
/{project_id}/providers/{provider_id}/checkpoints:
|
|
get:
|
|
summary: List checkpoints
|
|
description: |
|
|
The checkpoints endpoint returns information about the checkpoints
|
|
offered at a given provider.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/provider_idParam'
|
|
- $ref: '#/parameters/statusFilterParam'
|
|
- $ref: '#/parameters/sortParam'
|
|
- $ref: '#/parameters/limitParam'
|
|
- $ref: '#/parameters/markerParam'
|
|
tags:
|
|
- Protection Provider
|
|
- Checkpoint
|
|
responses:
|
|
'200':
|
|
description: An array of checkpoints
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Checkpoint'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
post:
|
|
summary: Checkpoints
|
|
description: |
|
|
Execute the protect operation for the specified plan and create a
|
|
checkpoint at a given provider.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/provider_idParam'
|
|
- name: checkpoint
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CheckpointCreateBody'
|
|
tags:
|
|
- Protection Provider
|
|
- Checkpoint
|
|
responses:
|
|
'200':
|
|
description: Checkpoint created
|
|
schema:
|
|
$ref: '#/definitions/Checkpoint'
|
|
examples:
|
|
application/json: {
|
|
"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']]]]"
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/providers/{provider_id}/checkpoints/{checkpoint_id}:
|
|
get:
|
|
summary: Get the specified checkpoint
|
|
description: |
|
|
The checkpoints endpoint returns information about the specified
|
|
checkpoint offered at a given provider.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/provider_idParam'
|
|
- $ref: '#/parameters/checkpoint_idParam'
|
|
tags:
|
|
- Protection Provider
|
|
- Checkpoint
|
|
responses:
|
|
'200':
|
|
description: The checkpoint information
|
|
schema:
|
|
$ref: '#/definitions/Checkpoint'
|
|
examples:
|
|
application/json: {
|
|
"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']]]]"
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
delete:
|
|
summary: Delete checkpoint
|
|
description: |
|
|
The checkpoint endpoint deletes a checkpoint
|
|
at a given provider.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/provider_idParam'
|
|
- $ref: '#/parameters/checkpoint_idParam'
|
|
tags:
|
|
- Protection Provider
|
|
- Checkpoint
|
|
responses:
|
|
'200':
|
|
description: Checkpoint deleted
|
|
examples:
|
|
application/json: {}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
/{project_id}/plans:
|
|
get:
|
|
summary: Get protection plans
|
|
description: |
|
|
The Plans endpoint returns information about the protection plans
|
|
offered for the given project.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/nameFilterParam'
|
|
- $ref: '#/parameters/statusFilterParam'
|
|
- $ref: '#/parameters/sortParam'
|
|
- $ref: '#/parameters/limitParam'
|
|
- $ref: '#/parameters/markerParam'
|
|
tags:
|
|
- Project API
|
|
- Protection Plan
|
|
responses:
|
|
'200':
|
|
description: An array of protection plans
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/ProtectionPlan'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
},
|
|
{
|
|
"id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
|
|
"type": "OS::Cinder::Volume",
|
|
"name": "Data volume"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
post:
|
|
summary: Create a plan
|
|
description: |
|
|
Create a new plan. The operation will create a new revision for
|
|
the plan.
|
|
tags:
|
|
- Project API
|
|
- Protection Plan
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- name: plan
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/ProtectionPlan'
|
|
responses:
|
|
'200':
|
|
description: The new created plan information
|
|
schema:
|
|
$ref: '#/definitions/ProtectionPlan'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
},
|
|
{
|
|
"id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
|
|
"type": "OS::Cinder::Volume",
|
|
"name": "Data volume"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/plans/{plan_id}:
|
|
get:
|
|
summary: Protection Plan
|
|
description: |
|
|
The Plan endpoint returns information about a specific plan.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/plan_idParam'
|
|
tags:
|
|
- Project API
|
|
- Protection Plan
|
|
responses:
|
|
'200':
|
|
description: show the protection plan
|
|
schema:
|
|
$ref: '#/definitions/ProtectionPlan'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
},
|
|
{
|
|
"id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
|
|
"type": "OS::Cinder::Volume",
|
|
"name": "Data volume"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
put:
|
|
summary: Protection Plan
|
|
description: |
|
|
Update a specific plan.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/plan_idParam'
|
|
- name: plan
|
|
in: body
|
|
schema:
|
|
$ref: '#/definitions/ProtectionPlanUpdateBody'
|
|
tags:
|
|
- Project API
|
|
- Protection Plan
|
|
responses:
|
|
'200':
|
|
description: update the protection plan
|
|
schema:
|
|
$ref: '#/definitions/ProtectionPlan'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
},
|
|
{
|
|
"id": "33b6bb0b-1157-4e66-8553-1c9e14b1c7ba",
|
|
"type": "OS::Cinder::Volume",
|
|
"name": "Data volume"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
delete:
|
|
summary: Protection Plan
|
|
description: |
|
|
The Plan endpoint deletes a specific plan.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/plan_idParam'
|
|
tags:
|
|
- Project API
|
|
- Protection Plan
|
|
responses:
|
|
'200':
|
|
description: Protection plan deleted
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
/{project_id}/protectables:
|
|
get:
|
|
summary: Protectables
|
|
description: |
|
|
Return all the available protectable types.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
tags:
|
|
- Protectable
|
|
responses:
|
|
'200':
|
|
description: The available protectable types
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/ProtectableType'
|
|
examples:
|
|
application/json: {
|
|
"protectable_type":[
|
|
"OS::Keystone::Project",
|
|
"OS::Cinder::Volume",
|
|
"OS::Cinder::ConsistencyGroup",
|
|
"OS::Glance::Image",
|
|
"OS::Nova::Server"
|
|
]
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/protectables/{protectable_type}:
|
|
get:
|
|
summary: Protectables
|
|
description: |
|
|
Return the information of a given protectable type.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/protectable_typeParam'
|
|
tags:
|
|
- Protectable
|
|
responses:
|
|
'200':
|
|
description: The protectable information
|
|
schema:
|
|
$ref: '#/definitions/ProtectableInfo'
|
|
examples:
|
|
application/json: {
|
|
"protectable_type": {
|
|
"name": "OS::Nova::Server",
|
|
"dependent_types": [
|
|
"OS::Cinder::Volume",
|
|
"OS::Glance::Image"
|
|
]
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/protectables/{protectable_type}/instances:
|
|
get:
|
|
summary: Resource Instances
|
|
description: |
|
|
Return all the available instances for the given protectable type.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/protectable_typeParam'
|
|
- $ref: '#/parameters/nameFilterParam'
|
|
- $ref: '#/parameters/sortParam'
|
|
- $ref: '#/parameters/limitParam'
|
|
- $ref: '#/parameters/markerParam'
|
|
- $ref: '#/parameters/parametersParam'
|
|
tags:
|
|
- Protectable
|
|
- Resource
|
|
responses:
|
|
'200':
|
|
description: The available instances for the protectable type.
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Resource'
|
|
examples:
|
|
application/json: {
|
|
"instances": [
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"instances_links": [
|
|
{
|
|
"href": "/v1/{project_id}/instances?limit=1&marker=cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
|
|
"rel": "next"
|
|
}
|
|
]
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/protectables/{protectable_type}/instances/{resource_id}:
|
|
get:
|
|
summary: Resource Instance
|
|
description: |
|
|
Return information about a specific instance and its immediate dependencies.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/protectable_typeParam'
|
|
- $ref: '#/parameters/resource_idParam'
|
|
- $ref: '#/parameters/parametersParam'
|
|
tags:
|
|
- Protectable
|
|
- Resource
|
|
responses:
|
|
'200':
|
|
description: Information about the instance.
|
|
schema:
|
|
$ref: '#/definitions/Resource'
|
|
examples:
|
|
application/json: {
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
/{project_id}/scheduled_operations:
|
|
get:
|
|
summary: Scheduled Operations
|
|
description: |
|
|
Scheduled operations are operations that will be executed when
|
|
a specific trigger is triggered.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/nameFilterParam'
|
|
- $ref: '#/parameters/scheduled_operation_typeFilterParam'
|
|
- $ref: '#/parameters/trigger_idFilterParam'
|
|
- $ref: '#/parameters/scheduled_operation_defFilterParam'
|
|
- $ref: '#/parameters/sortParam'
|
|
- $ref: '#/parameters/limitParam'
|
|
- $ref: '#/parameters/markerParam'
|
|
tags:
|
|
- Project API
|
|
- Scheduled Operation
|
|
responses:
|
|
'200':
|
|
description: An array of scheduled operations
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/ScheduledOperation'
|
|
examples:
|
|
application/json: {
|
|
"operations": [
|
|
{
|
|
"scheduled_operation": {
|
|
"id": "1a2c0c3d-f402-4cd8-b5db-82e85cb51fad",
|
|
"name": "My scheduled operation",
|
|
"description": "It will run everyday",
|
|
"operation_type": "protect",
|
|
"trigger_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
|
|
"operation_definition": {
|
|
"provider_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa399",
|
|
"plan_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398"
|
|
},
|
|
"enabled": 1
|
|
}
|
|
},
|
|
],
|
|
"operations_links": ""
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
post:
|
|
summary: Scheduled operation
|
|
description: |
|
|
Create a new scheduled operation.
|
|
tags:
|
|
- Project API
|
|
- Scheduled Operation
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- name: scheduled_operation
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/ScheduledOperationCreateBody'
|
|
responses:
|
|
'200':
|
|
description: The new scheduled operation
|
|
schema:
|
|
$ref: '#/definitions/ScheduledOperation'
|
|
examples:
|
|
application/json: {
|
|
"scheduled_operation": {
|
|
"id": "1a2c0c3d-f402-4cd8-b5db-82e85cb51fad",
|
|
"name": "My scheduled operation",
|
|
"description": "It will run everyday",
|
|
"operation_type": "protect",
|
|
"trigger_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
|
|
"operation_definition": {
|
|
"provider_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa399",
|
|
"plan_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
|
|
},
|
|
"enabled": 1
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/scheduled_operations/{scheduled_operation_id}:
|
|
get:
|
|
summary: Scheduled Operation
|
|
description: |
|
|
Get the specified scheduled operation information.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/scheduled_operation_idParam'
|
|
tags:
|
|
- Project API
|
|
- Scheduled Operation
|
|
responses:
|
|
'200':
|
|
description: A scheduled operation
|
|
schema:
|
|
$ref: '#/definitions/ScheduledOperation'
|
|
examples:
|
|
application/json: {
|
|
"scheduled_operation": {
|
|
"id": "1a2c0c3d-f402-4cd8-b5db-82e85cb51fad",
|
|
"name": "My scheduled operation",
|
|
"description": "It will run everyday",
|
|
"operation_type": "protect",
|
|
"trigger_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
|
|
"operation_definition": {
|
|
"provider_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa399",
|
|
"plan_id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398"
|
|
},
|
|
"enabled": 1
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
delete:
|
|
summary: Scheduled operation
|
|
description: |
|
|
Delete a scheduled operation.
|
|
tags:
|
|
- Project API
|
|
- Scheduled Operation
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/scheduled_operation_idParam'
|
|
responses:
|
|
'200':
|
|
description: Scheduled operation deleted
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
/{project_id}/operation_logs/:
|
|
get:
|
|
summary: Operation log entry point.
|
|
description: |
|
|
Get the information about operation instances in karbor.
|
|
Whenever an operation is run a log instance is created.
|
|
The user never creates operation logs.
|
|
This should not include the 'entires' property for the operation log.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/nameFilterParam'
|
|
- $ref: '#/parameters/sortParam'
|
|
- $ref: '#/parameters/limitParam'
|
|
- $ref: '#/parameters/markerParam'
|
|
tags:
|
|
- Project API
|
|
- Scheduled Operation
|
|
responses:
|
|
'200':
|
|
description: An array of operation logs (without the entries)
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/OperationLog'
|
|
examples:
|
|
application/json: [
|
|
{
|
|
"id": "23902b02-5666-4ee6-8dfe-962ac09c3994",
|
|
"scheduled_operation_id": "23902b02-5666-4ee6-8dfe-962ac09c3991",
|
|
"started_at": "2015-08-27T09:50:58-05:00",
|
|
"state": "running"
|
|
},
|
|
{
|
|
"id": "23902b02-5666-4ee6-8dfe-962ac09c3994",
|
|
"scheduled_operation_id": "23902b02-5666-4ee6-8dfe-962ac09c3991",
|
|
"started_at": "2015-08-27T09:50:58-05:00",
|
|
"ended_at": "2015-08-27T10:50:58-05:00",
|
|
"state": "finished"
|
|
},
|
|
{
|
|
"id": "23902b02-5666-4ee6-8dfe-962ac09c3994",
|
|
"scheduled_operation_id": "23902b02-5666-4ee6-8dfe-962ac09c3991",
|
|
"started_at": "2015-08-27T09:50:58-05:00",
|
|
"ended_at": "2015-08-27T10:50:58-05:00",
|
|
"state": "failed",
|
|
"error": "Could not access bank"
|
|
},
|
|
]
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/operation_logs/{operation_log_id}:
|
|
get:
|
|
summary: Operation log.
|
|
description: |
|
|
Get the information about a specific run of an operation
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/operation_log_idParam'
|
|
tags:
|
|
- Project API
|
|
- Scheduled Operation
|
|
responses:
|
|
'200':
|
|
description: An array of operation logs (with the entries)
|
|
schema:
|
|
$ref: '#/definitions/OperationLog'
|
|
examples:
|
|
application/json: {
|
|
"id": "23902b02-5666-4ee6-8dfe-962ac09c3994",
|
|
"scheduled_operation_id": "23902b02-5666-4ee6-8dfe-962ac09c3991",
|
|
"started_at": "2015-08-27T09:50:58-05:00",
|
|
"state": "running",
|
|
"entries": [
|
|
{
|
|
"timestamp": "2015-08-27T09:50:58-05:00",
|
|
"message": "Operation started"
|
|
},
|
|
{
|
|
"timestamp": "2015-08-27T09:50:51-05:00",
|
|
"message": "Doing things"
|
|
}
|
|
]
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
/{project_id}/restores:
|
|
get:
|
|
summary: Restores
|
|
description: |
|
|
List all restores finished and in progress, triggered by
|
|
a given project.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/statusFilterParam'
|
|
- $ref: '#/parameters/sortParam'
|
|
- $ref: '#/parameters/limitParam'
|
|
- $ref: '#/parameters/markerParam'
|
|
tags:
|
|
- Project API
|
|
- Restore
|
|
responses:
|
|
'200':
|
|
description: An array of restores
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Restore'
|
|
examples:
|
|
application/json: {
|
|
"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:35357/v2.0/",
|
|
"parameters": {
|
|
"OS::Cinder::Volume": {
|
|
},
|
|
"OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": {
|
|
}
|
|
},
|
|
"status": "success"
|
|
}
|
|
],
|
|
"restores_links": [
|
|
{
|
|
"href": "/v1/{project_id}/restores?limit={limit_num}&marker=22b82aa7-9179-4c71-bba2-caf5c0e68db7",
|
|
"rel": "next"
|
|
}
|
|
]
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
post:
|
|
summary: Restores
|
|
description: |
|
|
Start a restore.
|
|
tags:
|
|
- Project API
|
|
- Restore
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- name: restore
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/RestoreCreateBody'
|
|
responses:
|
|
'200':
|
|
description: The new started restore information
|
|
schema:
|
|
$ref: '#/definitions/Restore'
|
|
examples:
|
|
application/json: {
|
|
"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:35357/v2.0/",
|
|
"parameters": {
|
|
"OS::Cinder::Volume": {
|
|
},
|
|
"OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": {
|
|
}
|
|
},
|
|
"status": "success"
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/restores/{restore_id}:
|
|
get:
|
|
summary: Restores
|
|
description: |
|
|
Get the information of a given restore.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/restore_idParam'
|
|
tags:
|
|
- Project API
|
|
- Restore
|
|
responses:
|
|
'200':
|
|
description: The restore information
|
|
schema:
|
|
$ref: '#/definitions/Restore'
|
|
examples:
|
|
application/json: {
|
|
"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:35357/v2.0/",
|
|
"parameters": {
|
|
"OS::Cinder::Volume": {
|
|
},
|
|
"OS::Nova::Server#3f8af6c6-ecea-42bd-b44c-724785bbe5ea": {
|
|
}
|
|
},
|
|
"status": "success"
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
/{project_id}/triggers:
|
|
get:
|
|
summary: Triggers
|
|
description: |
|
|
List all of the triggers created by a given project.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/nameFilterParam'
|
|
- $ref: '#/parameters/typeFilterParam'
|
|
- $ref: '#/parameters/propertiesFilterParam'
|
|
- $ref: '#/parameters/sortParam'
|
|
- $ref: '#/parameters/limitParam'
|
|
- $ref: '#/parameters/markerParam'
|
|
tags:
|
|
- Project API
|
|
- Trigger
|
|
responses:
|
|
'200':
|
|
description: An array of triggers
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Trigger'
|
|
examples:
|
|
application/json: {
|
|
"triggers": [{
|
|
"trigger_info": {
|
|
"id": "cc1a-4516-9435-0ebb13caa398",
|
|
"name": "My backup trigger",
|
|
"type": "time",
|
|
"properties": {
|
|
"format": "crontab",
|
|
"pattern": "0 9 * * *",
|
|
"start_time": "2015-12-17T08:30:00",
|
|
"end_time": "2016-03-17T08:30:00",
|
|
"window": "60",
|
|
}
|
|
}
|
|
},
|
|
],
|
|
"triggers_links": ""
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
post:
|
|
summary: Trigger
|
|
description: |
|
|
Create a new scheduled operation.
|
|
tags:
|
|
- Project API
|
|
- Trigger
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- name: trigger_info
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/TriggerCreateBody'
|
|
responses:
|
|
'200':
|
|
description: The new created trigger
|
|
schema:
|
|
$ref: '#/definitions/Trigger'
|
|
examples:
|
|
application/json: {
|
|
"trigger_info": {
|
|
"id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
|
|
"name": "My backup trigger",
|
|
"type": "time",
|
|
"properties": {
|
|
"format": "crontab",
|
|
"pattern": "0 9 * * *",
|
|
"start_time": "2015-12-17T08:30:00",
|
|
"end_time": "2016-03-17T08:30:00",
|
|
"window": "60",
|
|
}
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
/{project_id}/triggers/{trigger_id}:
|
|
put:
|
|
summary: Trigger
|
|
description: |
|
|
Update the specified trigger created by a given project.
|
|
tags:
|
|
- Project API
|
|
- Trigger
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/trigger_idParam'
|
|
- name: trigger_info
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/TriggerUpdateBody'
|
|
responses:
|
|
'200':
|
|
description: The updated trigger
|
|
schema:
|
|
$ref: '#/definitions/Trigger'
|
|
examples:
|
|
application/json: {
|
|
"trigger_info": {
|
|
"id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
|
|
"name": "My backup trigger",
|
|
"type": "time",
|
|
"properties": {
|
|
"format": "crontab",
|
|
"pattern": "0 10 * * *",
|
|
"start_time": "2015-12-17T08:30:00",
|
|
"end_time": "2016-03-17T08:30:00",
|
|
"window": "60",
|
|
}
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
get:
|
|
summary: Triggers
|
|
description: |
|
|
Get the specified trigger created by a given project.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/trigger_idParam'
|
|
tags:
|
|
- Project API
|
|
- Trigger
|
|
responses:
|
|
'200':
|
|
description: The trigger information
|
|
schema:
|
|
$ref: '#/definitions/Trigger'
|
|
examples:
|
|
application/json: {
|
|
"trigger_info": {
|
|
"id": "2a9ce1f3-cc1a-4516-9435-0ebb13caa398",
|
|
"name": "My backup trigger",
|
|
"type": "time",
|
|
"properties": {
|
|
"format": "crontab",
|
|
"pattern": "0 9 * * *",
|
|
"start_time": "2015-12-17T08:30:00",
|
|
"end_time": "2016-03-17T08:30:00",
|
|
"window": "60",
|
|
}
|
|
}
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
delete:
|
|
summary: Trigger
|
|
description: |
|
|
Delete a trigger created by a given project.
|
|
parameters:
|
|
- $ref: '#/parameters/projectParam'
|
|
- $ref: '#/parameters/trigger_idParam'
|
|
tags:
|
|
- Project API
|
|
- Trigger
|
|
responses:
|
|
'200':
|
|
description: Trigger deleted
|
|
'424':
|
|
description: Trigger is being used by scheduled operation
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
examples:
|
|
application/json: {
|
|
"code": 424,
|
|
"message": "Trigger is being used by one or more operations",
|
|
}
|
|
default:
|
|
description: Unexpected error
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
|
|
definitions:
|
|
Provider:
|
|
type: object
|
|
required: [ name ]
|
|
properties:
|
|
id:
|
|
readOnly: true
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific protection provider.
|
|
name:
|
|
type: string
|
|
description: Display name of provider.
|
|
description:
|
|
type: string
|
|
description: Description of provider.
|
|
extended_info_schema:
|
|
$ref: '#/definitions/ExtendedInfoSchema'
|
|
|
|
ExtendedInfoSchema:
|
|
type: object
|
|
required: [ options_schema, saved_info_schema, restore_schema ]
|
|
properties:
|
|
options_schema:
|
|
type: object
|
|
description: |
|
|
A mapping between a resource type and a JSON Schema that defines the options for that type.
|
|
saved_info_schema:
|
|
type: object
|
|
description: |
|
|
A mapping between a resource type and a JSON Schema that defines the saved info fields for that type.
|
|
restore_schema:
|
|
type: object
|
|
description: |
|
|
A mapping between a resource type and a JSON Schema that defines the restore options for that type.
|
|
|
|
Checkpoint:
|
|
type: object
|
|
properties:
|
|
id:
|
|
readOnly: true
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific protection provider.
|
|
project_id:
|
|
type: string
|
|
format: UUID
|
|
protection_plan:
|
|
readOnly: true
|
|
$ref: '#/definitions/ProtectionPlan'
|
|
status:
|
|
readOnly: true
|
|
type: string
|
|
|
|
CheckpointCreateBody:
|
|
type: object
|
|
discriminator: plan_id
|
|
required: [ plan_id ]
|
|
properties:
|
|
plan_id:
|
|
readOnly: true
|
|
type: string
|
|
format: UUID
|
|
description: Unique identifier representing a specific protection protection plan.
|
|
|
|
Resource:
|
|
type: object
|
|
properties:
|
|
id:
|
|
readOnly: true
|
|
type: string
|
|
type:
|
|
$ref: '#/definitions/ProtectableType'
|
|
readOnly: true
|
|
name:
|
|
readOnly: true
|
|
type: string
|
|
|
|
ProtectionPlan:
|
|
type: object
|
|
required: [ name, provider_id, resources ]
|
|
properties:
|
|
id:
|
|
readOnly: true
|
|
type: string
|
|
format: UUID
|
|
description: Unique identifier representing a specific protection protection plan.
|
|
name:
|
|
type: string
|
|
description: Display name of plan.
|
|
description:
|
|
type: string
|
|
description: description about the plan.
|
|
resources:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Resource'
|
|
status:
|
|
type: string
|
|
description: The status of the plan. It's either 'suspended' or 'started'.
|
|
provider_id:
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific protection provider that
|
|
will store checkpoints for this protection plan.
|
|
parameters:
|
|
type: object
|
|
format: dict
|
|
|
|
ProtectionPlanUpdateBody:
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: Display name of plan.
|
|
resources:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Resource'
|
|
status:
|
|
type: string
|
|
description: The status of the plan. It's either 'suspended' or 'started'.
|
|
|
|
ProtectableType:
|
|
type: string
|
|
format: Heat Type String
|
|
example: "OS::Nova::Server"
|
|
description: |
|
|
Name of the resource type. When available the types that are defined by Heat
|
|
are used.
|
|
|
|
ProtectableInfo:
|
|
type: object
|
|
properties:
|
|
name:
|
|
$ref: '#/definitions/ProtectableType'
|
|
dependent_types:
|
|
type: array
|
|
description: |
|
|
List of types that might depend on this type. For example an
|
|
"OS::Nova::Server" has "OS::Cinder::Volume" as a dependent type.
|
|
items:
|
|
$ref: '#/definitions/ProtectableType'
|
|
|
|
OperationDefinition:
|
|
type: object
|
|
discriminator: type
|
|
required: [ type ]
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific operation definition.
|
|
type:
|
|
type: string
|
|
description: |
|
|
Type of the operation. This defines what kind of operation this
|
|
object defines the arguments for.
|
|
|
|
ProtectOperationDefinition:
|
|
description: |
|
|
Operation definition for protect operation.
|
|
allOf:
|
|
- $ref: '#/definitions/OperationDefinition'
|
|
- type: object
|
|
properties:
|
|
protection_plan_id:
|
|
type: string
|
|
format: UUID
|
|
parameters:
|
|
type: object
|
|
format: dict
|
|
required: [ protection_plan_id ]
|
|
|
|
DeleteOperationDefinition:
|
|
description: |
|
|
Operation definition for delete operation.
|
|
allOf:
|
|
- $ref: '#/definitions/OperationDefinition'
|
|
- type: object
|
|
properties:
|
|
checkpoint_path:
|
|
type: string
|
|
provider_id:
|
|
type: string
|
|
format: UUID
|
|
required: [ checkpoint_path, provider_id ]
|
|
|
|
StartOperationDefinition:
|
|
description: |
|
|
Operation definition for start operation.
|
|
allOf:
|
|
- $ref: '#/definitions/OperationDefinition'
|
|
- type: object
|
|
properties:
|
|
protection_plan_id:
|
|
type: string
|
|
format: UUID
|
|
required: [ protection_plan_id ]
|
|
|
|
SuspendOperationDefinition:
|
|
description: |
|
|
Operation definition for suspend operation.
|
|
allOf:
|
|
- $ref: '#/definitions/OperationDefinition'
|
|
- type: object
|
|
properties:
|
|
protection_plan_id:
|
|
type: string
|
|
format: UUID
|
|
required: [ protection_plan_id ]
|
|
|
|
RestoreOperationDefinition:
|
|
description: |
|
|
Operation definition for restore operation.
|
|
allOf:
|
|
- $ref: '#/definitions/OperationDefinition'
|
|
- type: object
|
|
properties:
|
|
checkpoint_id:
|
|
type: string
|
|
format: UUID
|
|
provider_id:
|
|
type: string
|
|
format: UUID
|
|
restore_target:
|
|
type: string
|
|
format: UUID
|
|
restore_auth:
|
|
type: object
|
|
format: dict
|
|
parameters:
|
|
type: object
|
|
format: dict
|
|
required: [ checkpoint_id, provider_id ]
|
|
|
|
ScheduledOperation:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific scheduled operation.
|
|
name:
|
|
type: string
|
|
description: Display name of scheduled operation.
|
|
description:
|
|
type: string
|
|
description: Description about the scheduled operation.
|
|
operation_type:
|
|
type: string
|
|
trigger_id:
|
|
type: string
|
|
format: UUID
|
|
operation_definition:
|
|
type: object
|
|
description: |
|
|
Supply parameters for the operation type.
|
|
enabled:
|
|
type: integer
|
|
|
|
ScheduledOperationCreateBody:
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: Display name of scheduled operation.
|
|
description:
|
|
type: string
|
|
description: Description about the scheduled operation.
|
|
operation_type:
|
|
type: string
|
|
trigger_id:
|
|
type: string
|
|
format: UUID
|
|
operation_definition:
|
|
type: object
|
|
description: |
|
|
Supply parameters for the operation type.
|
|
|
|
OperationStatus:
|
|
type: object
|
|
properties:
|
|
status:
|
|
type: string
|
|
description:
|
|
type: string
|
|
|
|
OperationLog:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific operation log.
|
|
scheduled_operation_id:
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
ID of the scheduled operation that defines this log.
|
|
started_at:
|
|
type: string
|
|
description: When was this operation run started in ISO 8601 format.
|
|
ended_at:
|
|
type: string
|
|
description: When was this operation run ended in ISO 8601 format.
|
|
status:
|
|
type: string
|
|
description: Status of the operation could be running, finished, failed.
|
|
error:
|
|
type: string
|
|
description: If the status is 'failed' this will contain the reason for the failure.
|
|
entries:
|
|
type: array
|
|
description: Complete log of the entires for the operation.
|
|
items:
|
|
$ref: '#/definitions/OperationLogEntry'
|
|
|
|
OperationLogEntry:
|
|
type: object
|
|
properties:
|
|
timestamp:
|
|
type: string
|
|
description: When was this log line emitted in ISO 8601 format.
|
|
message:
|
|
type: string
|
|
description: Message containing information about an event.
|
|
|
|
Trigger:
|
|
type: object
|
|
discriminator: type
|
|
required: [ type ]
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific trigger.
|
|
name:
|
|
type: string
|
|
description: Display name of trigger.
|
|
type:
|
|
type: string
|
|
description: |
|
|
Type of the trigger. This defines what kind of trigger this
|
|
object defines the arguments for.
|
|
properties:
|
|
type: object
|
|
description: |
|
|
Trigger properties. Supply parameters for the trigger type.
|
|
|
|
TimeTrigger:
|
|
description: |
|
|
Trigger definition for time trigger.
|
|
allOf:
|
|
- $ref: '#/definitions/Trigger'
|
|
- type: object
|
|
properties:
|
|
property:
|
|
type: object
|
|
required: [ start_time, trigger_window, format ]
|
|
properties:
|
|
format:
|
|
type: string
|
|
enum: [ crontab ]
|
|
start_time:
|
|
type: string
|
|
trigger_window:
|
|
type: string
|
|
format: xsd:duration
|
|
|
|
TriggerCreateBody:
|
|
type: object
|
|
discriminator: type
|
|
required: [ type ]
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: Display name of trigger.
|
|
type:
|
|
type: string
|
|
description: |
|
|
Type of the trigger. This defines what kind of trigger this
|
|
object defines the arguments for.
|
|
properties:
|
|
type: object
|
|
description: |
|
|
Trigger properties. Supply parameters for the trigger type.
|
|
|
|
TriggerUpdateBody:
|
|
type: object
|
|
discriminator: type
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: Display name of trigger.
|
|
properties:
|
|
type: object
|
|
description: |
|
|
Trigger properties. Supply parameters for the trigger type.
|
|
|
|
Restore:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: UUID
|
|
description: |
|
|
Unique identifier representing a specific restore.
|
|
project_id:
|
|
type: string
|
|
format: UUID
|
|
provider_id:
|
|
type: string
|
|
format: UUID
|
|
checkpoint_id:
|
|
type: string
|
|
format: UUID
|
|
restore_target:
|
|
type: string
|
|
format: url
|
|
parameters:
|
|
type: object
|
|
format: dict
|
|
status:
|
|
type: string
|
|
|
|
RestoreCreateBody:
|
|
type: object
|
|
required: [ provider_id, checkpoint_id, restore_target, parameters ]
|
|
properties:
|
|
provider_id:
|
|
type: string
|
|
format: UUID
|
|
checkpoint_id:
|
|
type: string
|
|
format: UUID
|
|
restore_target:
|
|
type: string
|
|
format: url
|
|
restore_auth:
|
|
type: object
|
|
format: dict
|
|
parameters:
|
|
type: object
|
|
format: dict
|
|
properties:
|
|
username:
|
|
type: string
|
|
password:
|
|
type: string
|
|
|
|
Error:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: integer
|
|
format: int32
|
|
message:
|
|
type: string
|
|
fields:
|
|
type: string
|
|
|
|
parameters:
|
|
projectParam:
|
|
name: project_id
|
|
in: path
|
|
description: |
|
|
Specifies the ID of the project that owns this entity
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
sortParam:
|
|
name: sort
|
|
in: query
|
|
description: |
|
|
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).
|
|
required: false
|
|
type: string
|
|
|
|
limitParam:
|
|
name: limit
|
|
in: query
|
|
description: |
|
|
Requests a specified page size of returned items from the query.
|
|
Returns a number of items up to the specified 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.
|
|
type: integer
|
|
format: int64
|
|
|
|
markerParam:
|
|
name: marker
|
|
in: query
|
|
description: |
|
|
Specifies 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.
|
|
type: string
|
|
|
|
parametersParam:
|
|
name: parameters
|
|
in: query
|
|
description: |
|
|
The parameters field for protectable instances query.
|
|
type: string
|
|
provider_idParam:
|
|
name: provider_id
|
|
in: path
|
|
description: id of the provider.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
plan_idParam:
|
|
name: plan_id
|
|
in: path
|
|
description: id of the plan.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
checkpoint_idParam:
|
|
name: checkpoint_id
|
|
in: path
|
|
description: id of the checkpoint.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
trigger_idParam:
|
|
name: trigger_id
|
|
in: path
|
|
description: id of the trigger.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
resource_idParam:
|
|
name: resource_id
|
|
in: path
|
|
description: id of the resource.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
restore_idParam:
|
|
name: restore_id
|
|
in: path
|
|
description: id of the restore.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
scheduled_operation_idParam:
|
|
name: scheduled_operation_id
|
|
in: path
|
|
description: id of the scheduled operation.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
operation_log_idParam:
|
|
name: operation_log_id
|
|
in: path
|
|
description: id of the operation log.
|
|
required: true
|
|
type: string
|
|
format: uuid
|
|
|
|
nameFilterParam:
|
|
name: name
|
|
in: query
|
|
description: name of the entity. Could be a regex pattern.
|
|
required: false
|
|
type: string
|
|
format: regex
|
|
|
|
typeFilterParam:
|
|
name: type
|
|
in: query
|
|
description: type of the entity.
|
|
required: false
|
|
type: string
|
|
|
|
statusFilterParam:
|
|
name: status
|
|
in: query
|
|
description: status of the entity.
|
|
required: false
|
|
type: string
|
|
|
|
propertiesFilterParam:
|
|
name: properties
|
|
in: query
|
|
description: property of the entity. Could be a regex pattern.
|
|
required: false
|
|
type: string
|
|
format: regex
|
|
|
|
scheduled_operation_typeFilterParam:
|
|
name: operation_type
|
|
in: query
|
|
description: type of the scheduled operation.
|
|
required: false
|
|
type: string
|
|
format: regex
|
|
|
|
scheduled_operation_defFilterParam:
|
|
name: operation_definition
|
|
in: query
|
|
description: definition of the scheduled operation. Could be a regex pattern.
|
|
required: false
|
|
type: string
|
|
format: regex
|
|
|
|
trigger_idFilterParam:
|
|
name: trigger_id
|
|
in: query
|
|
description: id of the trigger.
|
|
required: false
|
|
type: string
|
|
format: uuid
|
|
|
|
protectable_typeParam:
|
|
name: protectable_type
|
|
in: path
|
|
description: the resource type.
|
|
required: true
|
|
type: string
|
|
format: Heat Type String
|