XSKY protection-domains API

ProtectionDomainController Protection Domain Management

OpenAPI Specification

xsky-protection-domains-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: XMS is the controller of distributed storage system
  version: SDS_4.2.000.0.200302
  title: XMS access-paths protection-domains API
  contact: {}
  license:
    name: Commercial
basePath: /v1
tags:
- name: protection-domains
  description: 'ProtectionDomainController Protection Domain Management

    '
paths:
  /protection-domains/:
    get:
      tags:
      - protection-domains
      description: List protection domains
      operationId: ListProtectionDomains
      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/ProtectionDomainRecordsResp'
      security:
      - tokenInQuery: []
      - tokenInHeader: []
  /protection-domains/{protection_domain_id}:
    get:
      tags:
      - protection-domains
      description: get protection domain
      operationId: GetProtectionDomain
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: protection_domain_id
        in: path
        description: protection domain id
        required: true
        type: integer
        format: int64
        x-exportParamName: ProtectionDomainId
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/ProtectionDomainRecordResp'
        400:
          description: BadRequest
        404:
          description: NotFound
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
definitions:
  PlacementNode_Nestview:
    type: object
    properties:
      id:
        type: integer
        format: int64
        description: id of placement node
      parent:
        $ref: '#/definitions/PlacementNode_Nestview_parent'
    title: PlacementNode_Nestview
  PdRecord:
    title: PdRecord
    allOf:
    - $ref: '#/definitions/ProtectionDomain'
    description: PdRecord defines the response content of protection domain related API
  PlacementNodeProperties:
    type: object
    properties:
      is_witness:
        type: boolean
        description: whether this is a witness node
    title: PlacementNodeProperties
    description: PlacementNodeProperties contains properties for a placement node.
    example:
      is_witness: true
  ProtectionDomain:
    type: object
    properties:
      create:
        type: string
        format: date-time
        description: time of creating protection domain
      description:
        type: string
        description: description of protection domain
      id:
        type: integer
        format: int64
        description: id of protection domain
      name:
        type: string
        description: name of protection domain
      placement_node:
        description: placement node of protection domain
        $ref: '#/definitions/PlacementNode_Nestview'
      status:
        type: string
        description: status protection domain
      update:
        type: string
        format: date-time
        description: time of updating protection domain
    title: ProtectionDomain
    description: ProtectionDomain defines protection domain objects
  PlacementNode_Nestview_parent:
    properties:
      create:
        type: string
        format: date-time
        description: time of creating placement node
      id:
        type: integer
        format: int64
        description: id of placement node
      name:
        type: string
        description: name of placement node
      parent:
        description: parent of placement node
        $ref: '#/definitions/PlacementNode'
      properties:
        description: properties for this placement node like is_witness
        $ref: '#/definitions/PlacementNodeProperties'
      type:
        type: string
        description: type of placement node
      update:
        type: string
        format: date-time
        description: time of updating placement node
    description: parent of placement node
  PlacementNode:
    type: object
    properties:
      create:
        type: string
        format: date-time
        description: time of creating placement node
      id:
        type: integer
        format: int64
        description: id of placement node
      name:
        type: string
        description: name of placement node
      parent:
        description: parent of placement node
        $ref: '#/definitions/PlacementNode'
      properties:
        description: properties for this placement node like is_witness
        $ref: '#/definitions/PlacementNodeProperties'
      type:
        type: string
        description: type of placement node
      update:
        type: string
        format: date-time
        description: time of updating placement node
    title: PlacementNode
    description: PlacementNode defines a placement node managing a range of hosts
    example:
      parent: null
      name: name
      create: '2000-01-23T04:56:07.000+00:00'
      update: '2000-01-23T04:56:07.000+00:00'
      id: 6
      type: type
      properties:
        is_witness: true
  ProtectionDomainRecordResp:
    type: object
    required:
    - protection_domain
    properties:
      protection_domain:
        description: protection domain
        $ref: '#/definitions/PdRecord'
    title: ProtectionDomainRecordResp
    example:
      protection_domain: ''
  ProtectionDomainRecordsResp:
    type: object
    required:
    - protection_domains
    properties:
      protection_domains:
        type: array
        description: protection domains
        items:
          $ref: '#/definitions/PdRecord'
    title: ProtectionDomainRecordsResp
    example:
      protection_domains:
      - ''
      - ''
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