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 services API
contact: {}
license:
name: Commercial
basePath: /v1
tags:
- name: services
description: 'ServiceController Disk Management
'
paths:
/services/:
get:
tags:
- services
description: List all services by host
operationId: ListServices
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: type
in: query
description: service type
required: false
type: string
x-exportParamName: Type_
responses:
200:
description: OK
schema:
$ref: '#/definitions/ServicesResp'
400:
description: BadRequest
404:
description: NotFound
security:
- tokenInHeader: []
- tokenInQuery: []
/services/{service_id}:
get:
tags:
- services
description: get a service
operationId: GetService
consumes:
- application/json
produces:
- application/json
parameters:
- name: service_id
in: path
description: service id
required: true
type: integer
format: int64
x-exportParamName: ServiceId
responses:
200:
description: OK
schema:
$ref: '#/definitions/ServiceResp'
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
definitions:
SSLCertificate_Nestview:
type: object
properties:
force_https:
type: boolean
description: redirect http request to https
id:
type: integer
format: int64
description: certificate id
name:
type: string
description: certificate name
title: SSLCertificate_Nestview
example:
force_https: true
name: name
id: 2
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
Service:
type: object
properties:
create:
type: string
format: date-time
enabled:
type: boolean
heartbeat:
type: string
format: date-time
host:
$ref: '#/definitions/Host_Nestview'
id:
type: integer
format: int64
name:
type: string
primary:
type: boolean
ssl_certificate:
$ref: '#/definitions/SSLCertificate_Nestview'
started_time:
type: string
format: date-time
status:
type: string
type:
type: string
up:
type: boolean
update:
type: string
format: date-time
title: Service
description: Service defines basic install task, used to as API
example:
ssl_certificate:
force_https: true
name: name
id: 2
heartbeat: '2000-01-23T04:56:07.000+00:00'
started_time: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
type: type
enabled: true
host:
name: name
admin_ip: admin_ip
id: 0
name: name
create: '2000-01-23T04:56:07.000+00:00'
id: 0
up: true
primary: true
status: status
ServicesResp:
type: object
required:
- services
properties:
services:
type: array
description: services
items:
$ref: '#/definitions/Service'
title: ServicesResp
example:
services:
- ssl_certificate:
force_https: true
name: name
id: 2
heartbeat: '2000-01-23T04:56:07.000+00:00'
started_time: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
type: type
enabled: true
host:
name: name
admin_ip: admin_ip
id: 0
name: name
create: '2000-01-23T04:56:07.000+00:00'
id: 0
up: true
primary: true
status: status
- ssl_certificate:
force_https: true
name: name
id: 2
heartbeat: '2000-01-23T04:56:07.000+00:00'
started_time: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
type: type
enabled: true
host:
name: name
admin_ip: admin_ip
id: 0
name: name
create: '2000-01-23T04:56:07.000+00:00'
id: 0
up: true
primary: true
status: status
ServiceResp:
type: object
required:
- service
properties:
service:
description: service
$ref: '#/definitions/Service'
title: ServiceResp
example:
service:
ssl_certificate:
force_https: true
name: name
id: 2
heartbeat: '2000-01-23T04:56:07.000+00:00'
started_time: '2000-01-23T04:56:07.000+00:00'
update: '2000-01-23T04:56:07.000+00:00'
type: type
enabled: true
host:
name: name
admin_ip: admin_ip
id: 0
name: name
create: '2000-01-23T04:56:07.000+00:00'
id: 0
up: true
primary: true
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