OpenAPI Specification
swagger: '2.0'
info:
description: XMS is the controller of distributed storage system
version: SDS_4.2.000.0.200302
title: XMS access-paths targets API
contact: {}
license:
name: Commercial
basePath: /v1
tags:
- name: targets
description: 'TargetController Operations able targets
'
paths:
/targets/:
get:
tags:
- targets
description: List all targets in the cluster
operationId: ListTargets
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: host_id
in: query
description: host id
required: false
type: integer
format: int64
x-exportParamName: HostId
- name: access_path_id
in: query
description: access path id
required: false
type: integer
format: int64
x-exportParamName: AccessPathId
- 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/TargetsResp'
400:
description: BadRequest
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
post:
tags:
- targets
description: Create target
operationId: CreateTarget
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: target
description: target info
required: true
schema:
$ref: '#/definitions/TargetCreateReq'
x-exportParamName: Target
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/TargetResp'
400:
description: BadRequest
404:
description: NotFound
409:
description: Conflict
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/targets/{target_id}:
delete:
tags:
- targets
description: delete target
operationId: DeleteTarget
consumes:
- application/json
produces:
- application/json
parameters:
- name: target_id
in: path
description: target id
required: true
type: integer
format: int64
x-exportParamName: TargetId
- name: force
in: query
description: force delete or not
required: false
type: boolean
x-exportParamName: Force
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/TargetResp'
400:
description: BadRequest
404:
description: NotFound
409:
description: Conflict
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
definitions:
TargetsResp:
type: object
required:
- targets
properties:
targets:
type: array
items:
$ref: '#/definitions/Target'
title: TargetsResp
example:
targets:
- access_path:
name: name
id: 0
port: 1
iqn: iqn
host:
name: name
admin_ip: admin_ip
id: 0
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
id: 6
board: 0
status: status
- access_path:
name: name
id: 0
port: 1
iqn: iqn
host:
name: name
admin_ip: admin_ip
id: 0
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
id: 6
board: 0
status: status
TargetCreateReq_Target:
type: object
properties:
access_path_id:
type: integer
format: int64
host_id:
type: integer
format: int64
title: TargetCreateReq_Target
example:
access_path_id: 0
host_id: 6
Host_Nestview:
type: object
required:
- admin_ip
properties:
admin_ip:
type: string
id:
type: integer
format: int64
name:
type: string
title: Host_Nestview
example:
name: name
admin_ip: admin_ip
id: 0
AccessPath_Nestview:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
title: AccessPath_Nestview
example:
name: name
id: 0
TargetCreateReq:
type: object
properties:
target:
$ref: '#/definitions/TargetCreateReq_Target'
title: TargetCreateReq
example:
target:
access_path_id: 0
host_id: 6
Target:
type: object
properties:
access_path:
$ref: '#/definitions/AccessPath_Nestview'
board:
type: integer
format: int64
create:
type: string
format: date-time
host:
$ref: '#/definitions/Host_Nestview'
id:
type: integer
format: int64
iqn:
type: string
port:
type: integer
format: int64
status:
type: string
update:
type: string
format: date-time
title: Target
description: Target defines access path info for host
example:
access_path:
name: name
id: 0
port: 1
iqn: iqn
host:
name: name
admin_ip: admin_ip
id: 0
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
id: 6
board: 0
status: status
TargetResp:
type: object
required:
- target
properties:
target:
$ref: '#/definitions/Target'
title: TargetResp
example:
target:
access_path:
name: name
id: 0
port: 1
iqn: iqn
host:
name: name
admin_ip: admin_ip
id: 0
create: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
id: 6
board: 0
status: status
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