XSKY snmp API

SnmpController Operations able snmp

OpenAPI Specification

xsky-snmp-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 snmp API
  contact: {}
  license:
    name: Commercial
basePath: /v1
tags:
- name: snmp
  description: 'SnmpController Operations able snmp

    '
paths:
  /snmp/:
    get:
      tags:
      - snmp
      description: get snmp info
      operationId: GetSnmp
      consumes:
      - application/json
      produces:
      - application/json
      parameters: []
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/SnmpResp'
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
    patch:
      tags:
      - snmp
      description: set snmp
      operationId: SetSnmp
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        description: snmp info
        required: true
        schema:
          $ref: '#/definitions/SnmpSetReq'
        x-exportParamName: Body
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/SnmpResp'
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
  /snmp/mib:
    get:
      tags:
      - snmp
      description: download snmp mib file
      operationId: DownloadMib
      consumes:
      - application/json
      produces:
      - application/json
      parameters: []
      responses:
        200:
          description: OK
          schema:
            type: string
      security:
      - tokenInQuery: []
      - tokenInHeader: []
definitions:
  SnmpSetReq_Snmp:
    type: object
    properties:
      enabled:
        type: boolean
      gateways:
        type: array
        items:
          $ref: '#/definitions/SnmpGatewayReq'
      receivers:
        type: array
        items:
          $ref: '#/definitions/SnmpTrapReceiverReq'
    title: SnmpSetReq_Snmp
    example:
      gateways:
      - read_community: read_community
        user_name: user_name
        Port: 0
        auth_password: auth_password
        context_name: context_name
        priv_protocol: priv_protocol
        version: version
        host_id: 6
        priv_password: priv_password
        security_level: security_level
        auth_protocol: auth_protocol
        context_engine_id: context_engine_id
        write_community: write_community
        security_engine_id: security_engine_id
      - read_community: read_community
        user_name: user_name
        Port: 0
        auth_password: auth_password
        context_name: context_name
        priv_protocol: priv_protocol
        version: version
        host_id: 6
        priv_password: priv_password
        security_level: security_level
        auth_protocol: auth_protocol
        context_engine_id: context_engine_id
        write_community: write_community
        security_engine_id: security_engine_id
      receivers:
      - port: 1
        ip: ip
      - port: 1
        ip: ip
      enabled: true
  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
  SnmpGatewayReq:
    type: object
    properties:
      Port:
        type: integer
        format: int64
      auth_password:
        type: string
      auth_protocol:
        type: string
      context_engine_id:
        type: string
      context_name:
        type: string
      host_id:
        type: integer
        format: int64
      priv_password:
        type: string
      priv_protocol:
        type: string
      read_community:
        type: string
      security_engine_id:
        type: string
      security_level:
        type: string
      user_name:
        type: string
      version:
        type: string
      write_community:
        type: string
    title: SnmpGatewayReq
    example:
      read_community: read_community
      user_name: user_name
      Port: 0
      auth_password: auth_password
      context_name: context_name
      priv_protocol: priv_protocol
      version: version
      host_id: 6
      priv_password: priv_password
      security_level: security_level
      auth_protocol: auth_protocol
      context_engine_id: context_engine_id
      write_community: write_community
      security_engine_id: security_engine_id
  SnmpTrapReceiverReq:
    type: object
    properties:
      ip:
        type: string
      port:
        type: integer
        format: int64
    title: SnmpTrapReceiverReq
    example:
      port: 1
      ip: ip
  SnmpResp:
    type: object
    required:
    - snmp
    properties:
      snmp:
        $ref: '#/definitions/SnmpResp_Snmp'
    title: SnmpResp
    example:
      snmp:
        gateways:
        - read_community: read_community
          user_name: user_name
          ip: ip
          auth_password: auth_password
          update: '2000-01-23T04:56:07.000+00:00'
          context_name: context_name
          priv_protocol: priv_protocol
          version: version
          priv_password: priv_password
          security_level: security_level
          auth_protocol: auth_protocol
          context_engine_id: context_engine_id
          port: 6
          write_community: write_community
          host:
            name: name
            admin_ip: admin_ip
            id: 0
          create: '2000-01-23T04:56:07.000+00:00'
          id: 0
          security_engine_id: security_engine_id
          status: status
        - read_community: read_community
          user_name: user_name
          ip: ip
          auth_password: auth_password
          update: '2000-01-23T04:56:07.000+00:00'
          context_name: context_name
          priv_protocol: priv_protocol
          version: version
          priv_password: priv_password
          security_level: security_level
          auth_protocol: auth_protocol
          context_engine_id: context_engine_id
          port: 6
          write_community: write_community
          host:
            name: name
            admin_ip: admin_ip
            id: 0
          create: '2000-01-23T04:56:07.000+00:00'
          id: 0
          security_engine_id: security_engine_id
          status: status
        receivers:
        - port: 5
          ip: ip
          create: '2000-01-23T04:56:07.000+00:00'
          update: '2000-01-23T04:56:07.000+00:00'
          id: 1
          msg_level: msg_level
        - port: 5
          ip: ip
          create: '2000-01-23T04:56:07.000+00:00'
          update: '2000-01-23T04:56:07.000+00:00'
          id: 1
          msg_level: msg_level
        enabled: true
  SnmpGateway:
    type: object
    properties:
      auth_password:
        type: string
      auth_protocol:
        type: string
      context_engine_id:
        type: string
      context_name:
        type: string
      create:
        type: string
        format: date-time
      host:
        $ref: '#/definitions/Host_Nestview'
      id:
        type: integer
        format: int64
      ip:
        type: string
      port:
        type: integer
        format: int64
      priv_password:
        type: string
      priv_protocol:
        type: string
      read_community:
        type: string
        description: V2c specific
      security_engine_id:
        type: string
      security_level:
        type: string
      status:
        type: string
      update:
        type: string
        format: date-time
      user_name:
        type: string
        description: V3 specific
      version:
        type: string
      write_community:
        type: string
    title: SnmpGateway
    description: SnmpGateway defines the snmp gateway
    example:
      read_community: read_community
      user_name: user_name
      ip: ip
      auth_password: auth_password
      update: '2000-01-23T04:56:07.000+00:00'
      context_name: context_name
      priv_protocol: priv_protocol
      version: version
      priv_password: priv_password
      security_level: security_level
      auth_protocol: auth_protocol
      context_engine_id: context_engine_id
      port: 6
      write_community: write_community
      host:
        name: name
        admin_ip: admin_ip
        id: 0
      create: '2000-01-23T04:56:07.000+00:00'
      id: 0
      security_engine_id: security_engine_id
      status: status
  SnmpSetReq:
    type: object
    properties:
      snmp:
        $ref: '#/definitions/SnmpSetReq_Snmp'
    title: SnmpSetReq
    example:
      snmp:
        gateways:
        - read_community: read_community
          user_name: user_name
          Port: 0
          auth_password: auth_password
          context_name: context_name
          priv_protocol: priv_protocol
          version: version
          host_id: 6
          priv_password: priv_password
          security_level: security_level
          auth_protocol: auth_protocol
          context_engine_id: context_engine_id
          write_community: write_community
          security_engine_id: security_engine_id
        - read_community: read_community
          user_name: user_name
          Port: 0
          auth_password: auth_password
          context_name: context_name
          priv_protocol: priv_protocol
          version: version
          host_id: 6
          priv_password: priv_password
          security_level: security_level
          auth_protocol: auth_protocol
          context_engine_id: context_engine_id
          write_community: write_community
          security_engine_id: security_engine_id
        receivers:
        - port: 1
          ip: ip
        - port: 1
          ip: ip
        enabled: true
  SnmpResp_Snmp:
    type: object
    required:
    - enabled
    - gateways
    - receivers
    properties:
      enabled:
        type: boolean
        description: enable snmp or not
      gateways:
        type: array
        description: snmp gateways
        items:
          $ref: '#/definitions/SnmpGateway'
      receivers:
        type: array
        description: snmp receivers
        items:
          $ref: '#/definitions/TrapReceiver'
    title: SnmpResp_Snmp
    example:
      gateways:
      - read_community: read_community
        user_name: user_name
        ip: ip
        auth_password: auth_password
        update: '2000-01-23T04:56:07.000+00:00'
        context_name: context_name
        priv_protocol: priv_protocol
        version: version
        priv_password: priv_password
        security_level: security_level
        auth_protocol: auth_protocol
        context_engine_id: context_engine_id
        port: 6
        write_community: write_community
        host:
          name: name
          admin_ip: admin_ip
          id: 0
        create: '2000-01-23T04:56:07.000+00:00'
        id: 0
        security_engine_id: security_engine_id
        status: status
      - read_community: read_community
        user_name: user_name
        ip: ip
        auth_password: auth_password
        update: '2000-01-23T04:56:07.000+00:00'
        context_name: context_name
        priv_protocol: priv_protocol
        version: version
        priv_password: priv_password
        security_level: security_level
        auth_protocol: auth_protocol
        context_engine_id: context_engine_id
        port: 6
        write_community: write_community
        host:
          name: name
          admin_ip: admin_ip
          id: 0
        create: '2000-01-23T04:56:07.000+00:00'
        id: 0
        security_engine_id: security_engine_id
        status: status
      receivers:
      - port: 5
        ip: ip
        create: '2000-01-23T04:56:07.000+00:00'
        update: '2000-01-23T04:56:07.000+00:00'
        id: 1
        msg_level: msg_level
      - port: 5
        ip: ip
        create: '2000-01-23T04:56:07.000+00:00'
        update: '2000-01-23T04:56:07.000+00:00'
        id: 1
        msg_level: msg_level
      enabled: true
  TrapReceiver:
    type: object
    properties:
      create:
        type: string
        format: date-time
      id:
        type: integer
        format: int64
      ip:
        type: string
      msg_level:
        type: string
      port:
        type: integer
        format: int64
      update:
        type: string
        format: date-time
    title: TrapReceiver
    description: TrapReceiver defines the snmp trap receiver
    example:
      port: 5
      ip: ip
      create: '2000-01-23T04:56:07.000+00:00'
      update: '2000-01-23T04:56:07.000+00:00'
      id: 1
      msg_level: msg_level
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