XSKY action-logs API

ActionLogController Operations about ActionLog

OpenAPI Specification

xsky-action-logs-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 action-logs API
  contact: {}
  license:
    name: Commercial
basePath: /v1
tags:
- name: action-logs
  description: 'ActionLogController Operations about ActionLog

    '
paths:
  /action-logs/:
    get:
      tags:
      - action-logs
      description: List action logs
      operationId: ListActionLogs
      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: resource_type
        in: query
        description: resource type of action logs
        required: false
        type: string
        x-exportParamName: ResourceType
      - name: status
        in: query
        description: status of action logs
        required: false
        type: string
        x-exportParamName: Status
      - name: user_id
        in: query
        description: user id of action logs
        required: false
        type: integer
        format: int64
        x-exportParamName: UserId
      - name: create_begin
        in: query
        description: create begin timestamp
        required: false
        type: string
        x-exportParamName: CreateBegin
      - name: create_end
        in: query
        description: create end timestamp
        required: false
        type: string
        x-exportParamName: CreateEnd
      - name: q
        in: query
        description: query param of search
        required: false
        type: string
        x-exportParamName: Q
      - name: related_resource
        in: query
        description: related resource info of search
        required: false
        type: string
        x-exportParamName: RelatedResource
      - name: sort
        in: query
        description: sort param of search
        required: false
        type: string
        x-exportParamName: Sort
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/ActionLogsResp'
        400:
          description: BadRequest
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
definitions:
  Alert_Nestview:
    type: object
    properties:
      alarm_id:
        type: string
      id:
        type: integer
        format: int64
    title: Alert_Nestview
  ActionLog:
    type: object
    properties:
      action:
        type: string
      client_ip:
        type: string
      create:
        type: string
        format: date-time
      finish:
        type: string
        format: date-time
      id:
        type: integer
        format: int64
      message:
        type: string
      new_data:
        type: object
        properties: {}
      old_data:
        type: object
        properties: {}
      parameter:
        type: string
      related_resources:
        type: array
        items:
          type: object
          properties: {}
      resource_id:
        type: integer
        format: int64
      resource_type:
        type: string
      start:
        type: string
        format: date-time
      status:
        type: string
      user:
        $ref: '#/definitions/User_Nestview'
    title: ActionLog
    description: ActionLog defines a user action
  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
  ErrorRecord:
    type: object
    properties:
      action_log:
        $ref: '#/definitions/ActionLog_Nestview'
      alert:
        $ref: '#/definitions/Alert_Nestview'
      code:
        type: string
      create:
        type: string
        format: date-time
      details:
        type: string
      extra_data:
        type: object
        properties: {}
      host:
        $ref: '#/definitions/Host_Nestview'
      id:
        type: integer
        format: int64
      message:
        type: string
    title: ErrorRecord
    description: ErrorRecord defines the error record attributes.
  ActionLogsResp:
    type: object
    required:
    - action_logs
    properties:
      action_logs:
        type: array
        items:
          $ref: '#/definitions/ActionLogRecord'
    title: ActionLogsResp
    example:
      action_logs:
      - ''
      - ''
  User_Nestview:
    type: object
    properties:
      id:
        type: integer
        format: int64
        description: id of user
      name:
        type: string
        description: name of user
    title: User_Nestview
    example:
      name: name
      id: 6
  ActionLogRecord:
    title: ActionLogRecord
    allOf:
    - $ref: '#/definitions/ActionLog'
    - properties:
        error_records:
          type: array
          items:
            $ref: '#/definitions/ErrorRecord'
    description: ActionLogRecord defines the response errors of action log
  ActionLog_Nestview:
    type: object
    properties:
      id:
        type: integer
        format: int64
    title: ActionLog_Nestview
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