XSKY dp-block-snapshot-policies API
DpBlockSnapshotPolicyController API /dp-block-snapshot-policies
DpBlockSnapshotPolicyController API /dp-block-snapshot-policies
swagger: '2.0'
info:
description: XMS is the controller of distributed storage system
version: SDS_4.2.000.0.200302
title: XMS access-paths dp-block-snapshot-policies API
contact: {}
license:
name: Commercial
basePath: /v1
tags:
- name: dp-block-snapshot-policies
description: 'DpBlockSnapshotPolicyController API /dp-block-snapshot-policies
'
paths:
/dp-block-snapshot-policies/:
get:
tags:
- dp-block-snapshot-policies
description: List dp block snapshot policies
operationId: ListDpBlockSnapshotPolicies
consumes:
- application/json
produces:
- application/json
parameters:
- name: limit
in: query
description: paging param
required: false
type: integer
format: int64
x-exportParamName: Limit
- name: offset
in: query
description: paging param
required: false
type: integer
format: int64
x-exportParamName: Offset
- name: q
in: query
description: query param of search
required: false
type: string
x-exportParamName: Q
- name: sort
in: query
description: sort param of search
required: false
type: string
x-exportParamName: Sort
responses:
200:
description: OK
schema:
$ref: '#/definitions/DpBlockSnapshotPoliciesResp'
400:
description: BadRequest
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
post:
tags:
- dp-block-snapshot-policies
description: Create dp block snapshot policy
operationId: CreateDpBlockSnapshotPolicy
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: policy info
required: true
schema:
$ref: '#/definitions/DpBlockSnapshotPolicyCreateReq'
x-exportParamName: Body
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/DpBlockSnapshotPolicyResp'
400:
description: BadRequest
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/dp-block-snapshot-policies/{policy_id}:
get:
tags:
- dp-block-snapshot-policies
description: Get dp block snapshot policy
operationId: GetDpBlockSnapshotPolicy
consumes:
- application/json
produces:
- application/json
parameters:
- name: policy_id
in: path
description: resource id
required: true
type: integer
format: int64
x-exportParamName: PolicyId
responses:
200:
description: OK
schema:
$ref: '#/definitions/DpBlockSnapshotPolicyResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
delete:
tags:
- dp-block-snapshot-policies
description: Delete dp block snapshot policy
operationId: DeleteDpBlockSnapshotPolicy
consumes:
- application/json
produces:
- application/json
parameters:
- name: policy_id
in: path
description: resource id
required: true
type: integer
format: int64
x-exportParamName: PolicyId
- name: force
in: query
description: force delete or not
required: false
type: boolean
x-exportParamName: Force
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/DpBlockSnapshotPolicyResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
patch:
tags:
- dp-block-snapshot-policies
description: Update dp block snapshot policy
operationId: UpdateDpBlockSnapshotPolicy
consumes:
- application/json
produces:
- application/json
parameters:
- name: policy_id
in: path
description: resource id
required: true
type: integer
format: int64
x-exportParamName: PolicyId
- in: body
name: body
description: policy info
required: true
schema:
$ref: '#/definitions/DpBlockSnapshotPolicyUpdateReq'
x-exportParamName: Body
responses:
200:
description: OK
schema:
$ref: '#/definitions/DpBlockSnapshotPolicyResp'
202:
description: Accepted
schema:
$ref: '#/definitions/DpBlockSnapshotPolicyResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
definitions:
DpBlockSnapshotPolicyResp:
type: object
properties:
dp_block_snapshot_policy:
$ref: '#/definitions/DpBlockSnapshotPolicy'
title: DpBlockSnapshotPolicyResp
example:
dp_block_snapshot_policy:
retained_max: 1
block_volume_num: 0
cron_expr: cron_expr
name: name
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
dp_gateway:
name: name
id: 6
id: 6
status: status
DpBlockSnapshotPolicyUpdateReq:
type: object
required:
- dp_block_snapshot_policy
properties:
dp_block_snapshot_policy:
$ref: '#/definitions/DpBlockSnapshotPolicyUpdateReq_Policy'
title: DpBlockSnapshotPolicyUpdateReq
example:
dp_block_snapshot_policy:
retained_max: 0
cron_expr: cron_expr
name: name
DpBlockSnapshotPolicyCreateReq:
type: object
required:
- dp_block_snapshot_policy
properties:
dp_block_snapshot_policy:
$ref: '#/definitions/DpBlockSnapshotPolicyCreateReq_Policy'
title: DpBlockSnapshotPolicyCreateReq
example:
dp_block_snapshot_policy:
retained_max: 6
dp_gateway_id: 0
cron_expr: cron_expr
name: name
DpBlockSnapshotPoliciesResp:
type: object
properties:
dp_block_snapshot_policies:
type: array
items:
$ref: '#/definitions/DpBlockSnapshotPolicy'
title: DpBlockSnapshotPoliciesResp
example:
dp_block_snapshot_policies:
- retained_max: 1
block_volume_num: 0
cron_expr: cron_expr
name: name
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
dp_gateway:
name: name
id: 6
id: 6
status: status
- retained_max: 1
block_volume_num: 0
cron_expr: cron_expr
name: name
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
dp_gateway:
name: name
id: 6
id: 6
status: status
DpBlockSnapshotPolicyUpdateReq_Policy:
type: object
properties:
cron_expr:
type: string
description: cron expression
name:
type: string
description: name
retained_max:
type: integer
format: int64
description: retained max number of snapshots
title: DpBlockSnapshotPolicyUpdateReq_Policy
example:
retained_max: 0
cron_expr: cron_expr
name: name
DpBlockSnapshotPolicyCreateReq_Policy:
type: object
required:
- cron_expr
- dp_gateway_id
- name
- retained_max
properties:
cron_expr:
type: string
description: cron expression
dp_gateway_id:
type: integer
format: int64
description: dp gateway
name:
type: string
description: name
retained_max:
type: integer
format: int64
description: retained max number of snapshots
title: DpBlockSnapshotPolicyCreateReq_Policy
example:
retained_max: 6
dp_gateway_id: 0
cron_expr: cron_expr
name: name
DpBlockSnapshotPolicy:
type: object
properties:
block_volume_num:
type: integer
format: int64
create:
type: string
format: date-time
cron_expr:
type: string
dp_gateway:
$ref: '#/definitions/DpGateway_Nestview'
id:
type: integer
format: int64
name:
type: string
retained_max:
type: integer
format: int64
status:
type: string
update:
type: string
format: date-time
title: DpBlockSnapshotPolicy
description: DpBlockSnapshotPolicy protects a block volume by snapshot
example:
retained_max: 1
block_volume_num: 0
cron_expr: cron_expr
name: name
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
dp_gateway:
name: name
id: 6
id: 6
status: status
DpGateway_Nestview:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
title: DpGateway_Nestview
example:
name: name
id: 6
securityDefinitions:
tokenInHeader:
description: auth by token
type: apiKey
name: Xms-Auth-Token
in: header
tokenInQuery:
description: auth by token
type: apiKey
name: token
in: query