openapi: 3.0.0
x-tagGroups:
  - name: Device Configuration API
    tags:
      - general
      - time
      - zoneinfo
      - dns
      - route
      - network
      - ethernets
      - serials
      - cellulars
      - gps
      - dhcpservers
      - wifi
      - firewall
      - systemtags
      - platform
info:
  version: 2.1.0
  title: Device Configuration APIs
  description: Device Configuration APIs
servers:
  - url: https://127.0.0.1/api/v1
security:
  - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    GeneralInformation:
      title: Device general configuration
      properties:
        type:
          type: string
          description: Interface type.
          minLength: 7
          maxLength: 7
          pattern: ^general$
          example: general
          readOnly: true
        description:
          type: string
          description: device description.
          minLength: 0
          maxLength: 512
          example: This is My Thingspro Edge.
        hostName:
          type: string
          description: >-
            device hostname. <br> - Hostname must be between 1 and 64 octets
            inclusive.<br> - Each label in the hostname (component separated by
            ".") must be between 1 and 63 octets inclusive. <br> - Each label
            must start with an ASCII alphabet character (a-z, A-Z), end with an
            ASCII alphanumeric character (a-z, A-Z, 0-9), and must contain only
            ASCII alphanumeric characters or hyphens (a-z, A-Z, 0-9, "-").
          minLength: 1
          maxLength: 64
          pattern: >-
            ^[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$
          example: Moxa
        modelName:
          type: string
          description: Model name of device.
          minLength: 1
          maxLength: 255
          readOnly: true
          example: UC-8100A-ME-T-LX
        serialNumber:
          type: string
          description: Serial number of device.
          minLength: 12
          maxLength: 12
          readOnly: true
          example: IMOXA1234567
        thingsproVersion:
          type: string
          description: ThingsPro version.
          minLength: 5
          maxLength: 255
          readOnly: true
          example: 2.0.0-1600
        firmwareVersion:
          type: string
          description: device firmware version.
          minLength: 3
          maxLength: 255
          readOnly: true
          example: '1.0'
        biosVersion:
          type: string
          description: device BIOS/Bootloader version.
          minLength: 3
          maxLength: 255
          readOnly: true
          example: 1.0.0S06
        memorySize:
          type: integer
          description: device memory size(unit:byte).
          minimum: 1
          maximum: 2147483647
          readOnly: true
          example: 2116034560
        cpu:
          type: string
          description: device cpu information.
          minLength: 1
          maxLength: 255
          readOnly: true
          example: ARMv7 Processor rev 5 (v7l)
        disk:
          type: array
          description: device disk information.
          readOnly: true
          items:
            type: object
            readOnly: true
            properties:
              name:
                type: string
                description: disk name.
                minLength: 1
                maxLength: 255
                readOnly: true
                example: System
              mount:
                type: string
                description: disk mount point
                minLength: 1
                maxLength: 255
                readOnly: true
                example: /
              device:
                type: string
                description: disk physical device node path
                minLength: 1
                maxLength: 255
                readOnly: true
                example: /dev/root
              total:
                description: 'disk Total size (unit: byte)'
                type: integer
                minimum: 1
                maximum: 18446744073709552000
                readOnly: true
                example: 6948147200
              free:
                description: 'disk Free size (unit: byte)'
                type: integer
                minimum: 1
                maximum: 18446744073709552000
                readOnly: true
                example: 4857821184
              used:
                description: 'disk Used size (unit: byte)'
                type: integer
                minimum: 1
                maximum: 18446744073709552000
                readOnly: true
                example: 1798492160
              percent:
                description: Percent of used size
                type: number
                minimum: 0
                maximum: 100
                readOnly: true
                example: 27.019343397064695
              tags:
                type: object
                description: system tag lists
                readOnly: true
                properties:
                  used:
                    type: string
                    description: tag name of used disk size in byte
                    minLength: 1
                    maxLength: 255
                    readOnly: true
                    example: systemDiskUsed
                  free:
                    type: string
                    description: tag name of free disk size in byte
                    minLength: 1
                    maxLength: 255
                    readOnly: true
                    example: systemDiskFree
                  percent:
                    type: string
                    description: tag name of used disk percentage
                    minLength: 1
                    maxLength: 255
                    readOnly: true
                    example: systemDiskPercent
        lastBootTime:
          type: string
          description: |
            device last boot time. (format in RFC 3339)
            ('2020-06-04T5:45:44Z or '2020-06-04T13:45:44.000+08:00')
          minLength: 20
          maxLength: 29
          readOnly: true
          example: '2020-06-04T13:45:44+08:00'
    TimeInformation:
      title: Device time configuration
      properties:
        type:
          type: string
          description: Interface type.
          example: time
          readOnly: true
        lastUpdateTime:
          type: string
          description: |
            Last update time with RFC3339 format after time settings.
            '-' means not updated yet since NTP updated and enabled.
          readOnly: true
          example: '2015-03-26T16:00:00+08:00'
        time:
          type: string
          description: 'Current system time (format: RFC3339).'
          minLength: 20
          maxLength: 35
          example: '2015-03-26T16:27:48+08:00'
        timezone:
          type: string
          description: device timezone.
          minLength: 1
          maxLength: 64
          example: Asia/Taipei
        ntp:
          type: object
          properties:
            enable:
              type: boolean
              description: enable/disable sync time from time server
              example: false
            source:
              type: string
              description: time sync source
              enum:
                - timeserver
                - gps
              default: timeserver
            server:
              type: string
              description: ntp server url
              minLength: 2
              maxLength: 253
              pattern: >-
                (?=^.{2,253}$)(?:^(?!\.|-)[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9])(?:\.(?!\.|\-)[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9])*$
              example: pool.ntp.org
            gpsLongJump:
              type: boolean
              description: allow gps sync time with long-distance jumps
              default: true
            interval:
              type: integer
              description: ntpd update interval
              minimum: 60
              maximum: 2592000
              example: 7200
    TimezoneZone:
      description: ISO 3166 alpha-2 country code and zone name
      type: object
      required:
        - cca2
        - name
        - offset
      properties:
        cca2:
          description: ISO 3166 alpha-2 country code
          type: string
          pattern: '[A-Z]{2}'
        name:
          description: zone name
          type: string
        offset:
          description: zone offset (format should be "+0800", etc)
          type: string
    TimezoneIso3166:
      description: ISO 3166 alpha-2 country code and country name
      type: object
      required:
        - cca2
        - name
      properties:
        cca2:
          description: ISO 3166 alpha-2 country code
          type: string
          pattern: '[A-Z]{2}'
        name:
          description: The usual English name for the coded region
          type: string
    TimezoneInfo:
      description: Timezone information
      type: object
      required:
        - zone
        - iso3166
      properties:
        zone:
          description: TZ zone list with cca2 and TZ
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/TimezoneZone'
        iso3166:
          description: ISO 3166 alpha-2 country codes
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/TimezoneIso3166'
      example:
        data:
          zone:
            - cca2: AD
              name: Europe/Andorra
              offset: '+0100'
            - cca2: AE
              name: Asia/Dubai
              offset: '+0400'
            - cca2: AF
              name: Asia/Kabul
              offset: '+0430'
          iso3166:
            - cca2: AD
              name: Andorra
            - cca2: AE
              name: United Arab Emirates
            - cca2: AF
              name: Afghanistan
    DnsInformation:
      title: Current DNS information
      properties:
        data:
          type: array
          readOnly: true
          items:
            type: string
    RouteInformation:
      title: Device route configuration
      properties:
        default:
          type: string
          description: default route display name.
          readOnly: true
        priorityList:
          type: array
          items:
            type: string
            pattern: '[A-Za-z0-9_-]+'
            minLength: 2
            maxLength: 15
    WANInformation:
      title: Current WAN information
      properties:
        name:
          type: string
          description: Interface name.
        displayName:
          type: string
          description: Interface display name.
        ip:
          type: string
          description: IP address for the Ethernet interface.
        netmask:
          type: string
          description: Interface netmask.
        gateway:
          type: string
          description: Gateway is a router or a proxy server that routes between networks.
        dns:
          type: array
          description: |
            The Domain Name System (DNS) is a hierarchical distributed naming
            system for computers, services, or any resource connected to the
            Internet or a private network.
          items:
            type: string
    EthernetItem:
      title: Ethernet configuration
      properties:
        type:
          type: string
          description: Interface type.
          readOnly: true
          example: ethernets
        id:
          type: integer
          description: Interface id.
          example: 1
          readOnly: true
        displayName:
          type: string
          description: Interface display name.
          readOnly: true
          example: LAN1
        name:
          type: string
          description: Interface name.
          readOnly: true
          example: eth0
        wan:
          type: boolean
          description: Enable/disable wan.
          example: true
        enable:
          type: boolean
          description: >-
            Enable/disable the interface.(enable=true doesn’t mean the interface
            is trying to connect if the interface belongs to Wi-Fi Client which
            the TCP/IP layer 2 behavior controlled by the other endpoints.)
          example: true
        status:
          type: string
          description: Interface current status.
          readOnly: true
          enum:
            - connected
            - disconnected
          example: connected
        enableDhcp:
          type: boolean
          description: Enable/disable dhcp.
          example: true
        ip:
          type: string
          description: Interface ip.
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
          example: 192.168.3.100
        netmask:
          type: string
          description: Interface netmask.
          pattern: >-
            ^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)
          example: 255.255.255.0
        subnet:
          type: string
          description: Interface subnet.
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
          readOnly: true
          example: 192.168.3.0
        broadcast:
          type: string
          description: Interface broadcast.
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
          readOnly: true
          example: 192.168.3.255
        gateway:
          type: string
          description: Interface gateway.
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
          example: 192.168.3.254
        dns:
          type: array
          description: Interface dns.
          items:
            type: string
            pattern: >-
              ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
            example:
              - 10.128.8.5
              - 10.128.8.8
        mac:
          type: string
          description: Interface mac.
          readOnly: true
          example: 00:90:e8:70:a9:74
    AllEthernetInformation:
      title: All ethernet interfaces configuration
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EthernetItem'
        count:
          type: integer
          description: Array length.
          example: 1
    EthernetInformation:
      title: Ethernet interface configuration
      properties:
        data:
          $ref: '#/components/schemas/EthernetItem'
    EthernetDhcp:
      title: Ethernet setting for dynamic ip.
      required:
        - enable
        - enableDhcp
        - wan
      properties:
        id:
          type: integer
          description: Identifier of an Ethernet interface.
          minimum: 1
        enable:
          type: boolean
          description: Set interface UP.
        enableDhcp:
          type: boolean
          description: Enable (`true`) the dhcp client.
        wan:
          type: boolean
          description: Define the interface type is WAN (`true`) or LAN (`false`)
    EthernetStaticIP:
      title: Ethernet setting for static ip.
      required:
        - enable
        - ip
        - netmask
        - enableDhcp
        - wan
      properties:
        id:
          type: integer
          description: Identifier of an Ethernet interface.
          minimum: 1
        enable:
          type: boolean
          description: Set interface UP.
        ip:
          type: string
          description: IP address for the Ethernet interface.
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
        netmask:
          type: string
          description: Interface netmask.
          pattern: >-
            ^(?:(?:254|252|248|240|224|192|128)\.0\.0\.0|255\.(?:254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(?:254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(?:254|252|248|240|224|192|128|0))$
        gateway:
          type: string
          description: Gateway is a router or a proxy server that routes between networks.
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
        dns:
          type: array
          description: |
            The Domain Name System (DNS) is a hierarchical distributed naming
            system for computers, services, or any resource connected to the
            Internet or a private network.
          items:
            type: string
            pattern: >-
              ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
        enableDhcp:
          type: boolean
          description: Using the static IP (`false`).
        wan:
          type: boolean
          description: Define the interface type is WAN (`true`) or LAN (`false`)
    Capability:
      title: Serial hardware capability
      properties:
        mode:
          type: array
          description: list supported modes.
          items:
            type: string
          example:
            - rs232
            - rs422
            - rs4852w
            - rs4854w
          readOnly: true
        baudRate:
          type: object
          properties:
            special:
              type: boolean
              description: support moxa special baud rate
              default: false
            range:
              type: array
              description: list supported baud rate.
              items:
                type: integer
              example:
                - 300
                - 600
                - 1200
                - 1800
                - 2400
                - 4800
                - 9600
                - 19200
                - 38400
                - 57600
                - 115200
                - 230400
                - 460800
                - 921600
              readOnly: true
        parities:
          type: array
          description: list supported parities.
          items:
            type: string
          example:
            - none
            - odd
            - even
            - space
            - mark
          readOnly: true
        dataBits:
          type: array
          description: list supported data bits.
          items:
            type: integer
          example:
            - 5
            - 6
            - 7
            - 8
          readOnly: true
        stopBits:
          type: array
          description: list supported stop bits.
          items:
            type: number
          example:
            - 1
            - 2
            - 1.5
          readOnly: true
        flowControl:
          type: array
          description: list supported flow controls.
          items:
            type: string
          example:
            - none
            - hardware
            - software
          readOnly: true
    SerialItem:
      title: Serial Information
      properties:
        type:
          type: string
          description: Interface type.
          example: serials
          readOnly: true
        id:
          type: integer
          description: Interface id.
          example: 1
          readOnly: true
        device:
          type: string
          description: Device path.
          readOnly: true
        mode:
          type: string
          description: Serial interface mode.
          enum:
            - rs232
            - rs422
            - rs4852w
            - rs4854w
          example: rs232
        displayName:
          type: string
          description: Serial port display name.
          readOnly: true
          example: P1
        baudRate:
          type: integer
          description: baud rate
          example: 9600
        parity:
          type: string
          description: parity
          example: none
        dataBits:
          type: integer
          description: data bits
          example: 8
        stopBits:
          type: number
          description: stop bits
          example: 1
        flowControl:
          type: string
          description: flow control
          example: software
        capabilities:
          $ref: '#/components/schemas/Capability'
    AllSerialInformation:
      title: All serial interfaces configuration
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SerialItem'
        count:
          type: integer
          description: Array length.
          example: 1
    SerialConfiguration:
      title: Serial setting.
      properties:
        id:
          type: integer
          description: Interface id.
          example: 1
        device:
          type: string
          description: Device path.
          readOnly: true
        mode:
          type: string
          description: Serial interface mode.
          enum:
            - rs232
            - rs422
            - rs4852w
            - rs4854w
          example: rs232
        displayName:
          type: string
          description: Serial port display name.
          readOnly: true
          example: P1
        baudRate:
          type: integer
          description: baud rate
          example: 9600
        parity:
          type: string
          description: parity
          example: none
        dataBits:
          type: integer
          description: data bits
          example: 8
        stopBits:
          type: number
          description: stop bits
          example: 1
        flowControl:
          type: string
          description: flow control
          example: software
    SerialInformation:
      title: Serial interface configuration
      properties:
        data:
          $ref: '#/components/schemas/SerialItem'
    CellularCapabilities:
      title: Cellular Capabilities
      readOnly: true
      properties:
        sim:
          description: Numbers of SIM slots provided
          type: integer
          readOnly: true
          example: 1
        carriers:
          description: Provided carriers for switch
          type: array
          items:
            type: string
          readOnly: true
          example: []
    CellularProfile:
      title: Cellular Profile
      type: object
      required:
        - name
        - pdpContext
      properties:
        id:
          type: integer
          description: Identifier for an Cellular interface.
          readOnly: true
          example: 1
        name:
          type: string
          description: Alias name for the profile.
          minLength: 1
          maxLength: 100
          example: TWM
        pdpContext:
          type: object
          description: PDP context data for dialing up to Cellular Network.
          required:
            - static
          properties:
            static:
              type: boolean
              description: Use static APN or dynamic.
              default: true
            id:
              type: integer
              description: Specifies PDP context id.
              minimum: 1
              maximum: 16
              example: 1
            apn:
              type: string
              description: Edit APN of the specified PDP context.
              default: internet
              minLength: 1
              maxLength: 100
              pattern: >-
                (?=^.{1,100}$)(?:^(?!\.|-)[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9])(?:\.(?!\.|\-)[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9])*$
              example: internet
            type:
              type: string
              description: Indicate the PDP type to use.
              enum:
                - ipv4
                - ipv6
                - ipv4v6
              default: ipv4
              example: ipv4
            auth:
              type: object
              description: The negotiated authentication.
              required:
                - protocol
              properties:
                protocol:
                  type: string
                  description: The negotiated authentication protocol.
                  enum:
                    - none
                    - chap
                    - pap
                    - both
                  default: none
                  example: none
                username:
                  type: string
                  description: Username for PAP and/or CHAP.
                  minLength: 0
                  maxLength: 255
                  example: ''
                password:
                  type: string
                  description: Password for PAP and/or CHAP.
                  minLength: 0
                  maxLength: 255
                  example: ''
        pinCode:
          type: string
          description: >-
            PIN code of SIM card. Takes no effect when SIM card PIN weren't not
            set.
          minLength: 0
          maxLength: 8
          pattern: ^(|[0-9]{4,8})$
          example: '0000'
        init:
          type: array
          description: |
            Initialize process before executing the profile.
            - sim:\<sim-slot\>
            - carrier:\<carrier\>
          items:
            type: string
            pattern: ^(sim:[1-2]|carrier:[\S\s]{1,100})$
          example:
            - sim:1
    CellularKeepalive:
      title: Keepalive Settings
      type: object
      required:
        - enable
      properties:
        enable:
          type: boolean
          description: Enable/disable Cellular connection keep-alive by ping.
        targetHost:
          type: string
          description: IPv4 address or domain name to ping.
          minLength: 2
          maxLength: 253
          default: 8.8.8.8
          example: 8.8.8.8
        intervalSec:
          type: integer
          minimum: 10
          maximum: 86400
          description: Check alive interval.
          default: 60
          example: 60
        reboot:
          type: object
          description: Keepalive with reboot policy
          properties:
            enable:
              type: boolean
              description: Enable/disable Cellular connection keep-alive by reboot.
            intervalMin:
              type: integer
              description: Check alive interval with minutes.
              minimum: 10
              maximum: 1440
              default: 20
              example: 20
    CellularItem:
      title: Cellular Information
      required:
        - enable
      properties:
        type:
          type: string
          description: Interface type.
          example: cellulars
          readOnly: true
        displayName:
          type: string
          description: Interface display name.
          readOnly: true
          example: Cellular1
        name:
          type: string
          description: Interface name.
          readOnly: true
          example: wwan0
        capabilities:
          $ref: '#/components/schemas/CellularCapabilities'
        carrier:
          type: string
          description: Current carrier (if carrier is supported)
          readOnly: true
          example: ATT
        currentProfileId:
          type: integer
          description: Current used profile Id.
          readOnly: true
          example: 1
        mode:
          type: string
          description: Given cellular connection mode. Could be one of `"umts"`, `"lte"`.
          readOnly: true
          example: lte
        signal:
          type: object
          readOnly: true
          description: Cellular RF signal strength, include RSSI and EcIo.
          properties:
            csq:
              type: integer
              description: >-
                Signal quality, Only shows the first part of the response,
                RSSI(Received signal strength indicator).
              example: 16
            rssi:
              type: integer
              description: >-
                Cellular RF signal strength, in `dbm`. Value `0` indicates no
                SIM card found.
              example: -67
            ecio:
              type: integer
              description: >-
                The ratio of the received energy per chip (= code bit) and the
                interference level, given in `dBm`.
            rsrq:
              type: integer
              description: |
                Reference Signal Received Quality, a C/I type of measurement and
                it indicates the quality of the received reference signal
        operatorName:
          type: string
          description: Indicate current operator name if exist.
          readOnly: true
          example: TWM
        lac:
          type: string
          description: Location area code.
          readOnly: true
          example: 11114
        tac:
          type: string
          description: Tracking area code (LTE).
          readOnly: true
          example: ''
        nid:
          type: string
          description: Network ID (CDMA).
          readOnly: true
          example: ''
        cellId:
          type: string
          description: Cell ID.
          readOnly: true
          example: 6326
        bid:
          type: string
          description: Base station ID (CDMA).
          readOnly: true
          example: ''
        iccId:
          type: string
          description: ICC ID of SIM card.
          readOnly: true
          example: 89886971410730170000
        imsi:
          type: string
          description: IMSI of SIM card.
          readOnly: true
          example: 466977300046885
        imei:
          type: string
          description: IMEI of cellular module.
          readOnly: true
          example: 359841080332053
        esn:
          type: string
          description: ESN of cellular module.
          readOnly: true
          example: 80AF33D7
        pinRetryRemain:
          type: integer
          description: PIN Retry remaining.
          readOnly: true
          example: 3
        status:
          type: string
          description: >
            Indicate current status of cellular connection.

            - initializing: get module and SIM card info, unlock SIM card if
            necessary

            - nosim: no SIM card or unknown error with SIM card status

            - pin: SIM card is locked with a PIN code

            - ready: SIM card is ready for connect (unlocked or lock is
            disabled)

            - connecting: during connect state

            - connect_failure: connect failed or keepalive failed (if keepalive
            enabled)

            - connected: connect success with keepalive success or success with
            keepalive disabled

            - power_cycle: power cycle the module to recover issues

            - service_searching: roaming

            - service_attached: attached with a base station

            - pin_error: PIN code error

            - switching_carrier: module is switching carrier
          enum:
            - initializing
            - nosim
            - pin
            - puk
            - ready
            - connecting
            - connect_failure
            - connected
            - power_cycle
            - service_searching
            - service_attached
            - pin_error
            - switching_carrier
          readOnly: true
          example: ready
        mac:
          type: string
          readOnly: true
          description: The identical MAC address.
          example: '00:00:11:12:13:14'
        ip:
          type: string
          description: IP address. `""` when not connected.
          readOnly: true
          example: ''
        netmask:
          type: string
          description: Subnet mask. `""` when not connected.
          readOnly: true
          example: ''
        gateway:
          type: string
          description: Gateway IP address. `""` when not connected.
          readOnly: true
          example: ''
        dns:
          type: array
          description: A list of DNS IP addresses. `[]` when not connected.
          items:
            type: string
          readOnly: true
          example: []
        enable:
          type: boolean
          description: Enable Cellular Networking.
        available:
          type: boolean
          description: Shows Cellular is available or not.
          readOnly: true
          example: true
        autoDetect:
          type: boolean
          description: Auto detect SIM slot, carrier and APN to create profiles
          example: true
        profileTimeout:
          type: integer
          description: Retry timeout in seconds for switch profiles.
          minimum: 60
          maximum: 3600
          example: 300
        profiles:
          type: array
          description: Profiles for redundancy
          items:
            $ref: '#/components/schemas/CellularProfile'
        keepalive:
          $ref: '#/components/schemas/CellularKeepalive'
    CellularItemWithId:
      allOf:
        - type: object
          properties:
            id:
              type: integer
              description: Interface id.
              example: 1
        - $ref: '#/components/schemas/CellularItem'
    AllCellularInformation:
      title: All cellular interfaces configuration
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CellularItemWithId'
        count:
          type: integer
          description: Array length.
          example: 1
    CellularInformation:
      title: Cellular interface configuration
      properties:
        data:
          $ref: '#/components/schemas/CellularItemWithId'
    GpsLocation:
      type: object
      description: Location information, with `latitude` and `longitude` data.
      properties:
        lat:
          type: number
          format: float
          description: latitude
          default: 0
          example: 23.5
        lng:
          type: number
          format: float
          description: longitude
          default: 0
          example: 121.2
    schemas-Capability:
      title: Gps capability
      properties:
        interface:
          type: array
          description: list supported gps interfaces.
          items:
            type: string
          example:
            - /dev/ttyUSB0
            - /dev/ttyUSB1
          readOnly: true
    GpsItem:
      title: GPS Information
      properties:
        type:
          type: string
          description: Interface type.
          example: gps
          readOnly: true
        interface:
          type: string
          description: Device path.
          readOnly: true
          example: /dev/ttyM0
        mode:
          type: string
          description: gps mode.
          enum:
            - manual
            - auto
          example: manual
        location:
          $ref: '#/components/schemas/GpsLocation'
        capabilities:
          $ref: '#/components/schemas/schemas-Capability'
    GpsInformation:
      title: GPS interface configuration
      properties:
        data:
          $ref: '#/components/schemas/GpsItem'
    GpsSetManualMode:
      title: Set GPS manual mode.
      required:
        - mode
      properties:
        mode:
          type: string
          example: manual
        location:
          $ref: '#/components/schemas/GpsLocation'
    WifiClientNetworksItem:
      type: object
      properties:
        uuid:
          type: string
          pattern: '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
          description: Wi-Fi client network UUID
        ssid:
          type: string
          description: Wi-Fi client network SSID
          readOnly: true
        bssid:
          type: string
          description: Wi-Fi client network BSSID
          readOnly: true
        security:
          type: object
          properties:
            mode:
              type: string
              description: Wi-Fi client network security mode
              enum:
                - wpa2-personal
                - none
            encryption:
              type: string
              description: Wi-Fi client network encryption protocol
              enum:
                - aes
                - tkip
            password:
              type: string
              description: ASCII passphrase (8 ~ 63).
        signal:
          type: integer
          description: >-
            Wi-Fi client network signal strength(dBm), <br/>0\~\-50:High
            quality, <br/>\-50\~\-70:Medium quality, <br/>\-70\~\-90:Low
            quality, <br/>\-90\~\-100:Unusable quality
          readOnly: true
        band:
          type: string
          description: Wi-Fi client network band mode.
          readOnly: true
          enum:
            - band24
            - band50
    WifiItem:
      title: Wifi Information
      required:
        - type
        - enable
        - mode
      properties:
        type:
          type: string
          description: Interface type.
          readOnly: true
          example: wifi
        id:
          type: integer
          description: Interface id
        available:
          type: boolean
          description: Wi-Fi Interface is available
          readOnly: true
        name:
          type: string
          description: Interface name
          readOnly: true
        displayName:
          type: string
          description: Interface display name.
          readOnly: true
        mode:
          type: string
          description: Given Wi-Fi interface mode. Could be one of `"ap"`, `"client"`
        capabilities:
          type: object
          description: Indicate current capability that module supports
          readOnly: true
          properties:
            mode:
              type: array
              items:
                type: string
                enum:
                  - ap
                  - client
            band:
              type: array
              items:
                type: string
                enum:
                  - band24
                  - band50
        regions:
          type: array
          description: regions information
          readOnly: true
          items:
            type: object
            properties:
              name:
                type: string
                description: region display name
              countryCode:
                type: string
                description: region country code to query supported channels
              band24:
                type: array
                items:
                  type: integer
              band50:
                type: array
                items:
                  type: integer
        enable:
          type: boolean
          description: Enable Wi-Fi Networking.
        status:
          type: boolean
          description: Wi-Fi connection status.
        ap:
          type: object
          description: Configuration of Wi-Fi AP mode.
          required:
            - mode
            - ssid
            - channel
            - security
          properties:
            broadcastSsid:
              type: boolean
            band:
              type: string
              description: Wi-Fi band mode.
              enum:
                - band24
                - band50
            ssid:
              type: string
              description: SSID of a Wi-Fi AP.
            channel:
              type: integer
            security:
              type: object
              required:
                - mode
              properties:
                mode:
                  type: string
                  description: Wi-Fi AP security mode
                  enum:
                    - wpa2
                encryption:
                  type: string
                  description: Wi-Fi AP encryption protocol
                  enum:
                    - aes
                password:
                  type: string
                  description: ASCII passphrase (8 ~ 63).
            clients:
              type: array
              description: Ap connected clients information
              readOnly: true
              items:
                type: object
                properties:
                  Mac:
                    type: string
                    description: Mac address
        client:
          type: object
          description: Configuration of Wi-Fi Client mode.
          properties:
            connectState:
              type: string
              description: Current connect state
              readOnly: true
              enum:
                - initializing
                - connecting
                - connected
                - authentication failed
                - disconnect
            currentAp:
              type: string
              description: Uuid of current connect Wi-Fi client network
              readOnly: true
            priority:
              type: array
              items:
                type: string
                description: Wi-Fi client networks uuid of priority
            networks:
              type: array
              items:
                $ref: '#/components/schemas/WifiClientNetworksItem'
    AllWifiInformation:
      title: All Wi-Fi interfaces configuration
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WifiItem'
        count:
          type: integer
          description: Array length.
    AllWifiInformationForPatch:
      title: All Wi-Fi interfaces configuration
      properties:
        data:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/WifiItem'
              - required:
                  - id
        count:
          type: integer
          description: Array length.
    WifiInformation:
      title: Wi-Fi interface configuration
      properties:
        data:
          $ref: '#/components/schemas/WifiItem'
    AllWifiClientNetworksItem:
      title: Current Wi-Fi list settings
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WifiClientNetworksItem'
    NewWifiClientNetworksItem:
      title: Add  a Wi-Fi client network to networks list
      type: object
      required:
        - ssid
        - password
      properties:
        ssid:
          type: string
          description: Wi-Fi client network SSID
        password:
          type: string
          description: Wi-Fi client network password
    ScanList:
      title: Wi-Fi client networks results
      properties:
        scanlist:
          type: array
          items:
            type: object
            properties:
              ssid:
                type: string
                description: Wi-Fi client network SSID
              security:
                type: object
                properties:
                  mode:
                    type: string
                    description: Wi-Fi client network security mode
                    enum:
                      - wpa2-personal
                      - wpa2-enterprise
                      - wpa-personal
                      - wpa-enterprise
                      - none
                  encryption:
                    type: string
                    description: Wi-Fi client network encryption protocol
                    enum:
                      - aes
                      - tkip
                      - none
                  support:
                    type: boolean
                    description: Current Wi-Fi module support
              signal:
                type: integer
                description: >-
                  Wi-Fi client network signal strength(dBm), <br/>0\~\-50:High
                  quality, <br/>\-50\~\-70:Medium quality, <br/>\-70\~\-90:Low
                  quality, <br/>\-90\~\-100:Unusable quality
              band:
                type: string
                description: Wi-Fi client network band mode.
                enum:
                  - band24
                  - band50
    DhcpServerItem:
      title: DHCP Server Configuration
      type: object
      required:
        - id
      properties:
        type:
          description: Service type
          type: string
          readOnly: true
        id:
          description: Identifier of a DHCP Server
          type: integer
          minimum: 1
        status:
          description: DHCP is enabled (`true`) for the interface or not
          type: boolean
          readOnly: true
        available:
          description: |
            DHCP server is available or not (the interface must be "static IP"
            and/or worked as a WiFi AP), default should be false.
          type: boolean
          readOnly: true
        name:
          description: Interface name for DHCP Server
          type: string
          readOnly: true
        displayName:
          description: Display interface name for DHCP Server
          type: string
          readOnly: true
        enable:
          description: Enable (`true`) or disable (`false`) DHCP Server
          type: boolean
        startIp:
          description: Range IP start
          type: string
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
        endIp:
          description: Range IP end
          type: string
          pattern: >-
            ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
        netmask:
          description: Netmask of DHCP Server
          type: string
          pattern: >-
            ^(?:(?:254|252|248|240|224|192|128)\.0\.0\.0|255\.(?:254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(?:254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(?:254|252|248|240|224|192|128|0))$
        domainNameServers:
          description: Domain name servers
          type: array
          items:
            type: string
            pattern: >-
              ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
        domainName:
          description: Domain name, empty is allowed
          type: string
          minLength: 2
          maxLength: 253
          pattern: >-
            (?=^.{2,253}$)(?:^(?!\.|-)[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9])(?:\.(?!\.|\-)[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9])*$
        leaseTime:
          description: Lease time of DHCP pool
          type: integer
          minimum: 60
          maximum: 2592000
    AllDhcpServerItems:
      title: Response of DHCP Servers Configuration
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DhcpServerItem'
        count:
          type: integer
    SingleDhcpServerItem:
      title: Response of DHCP Server Configuration
      properties:
        data:
          $ref: '#/components/schemas/DhcpServerItem'
    Inbound:
      title: Firewall inbound configuration
      required:
        - name
        - protocol
        - action
      properties:
        id:
          type: integer
          description: Inbound rule id
        name:
          type: string
          description: rule name
          minLength: 1
          maxLength: 255
        description:
          type: string
          description: rule description
          minLength: 1
          maxLength: 255
        priority:
          type: integer
          description: >
            Inbound rule priority. 1-500 are system reserved priority rule, api
            access is not allowed. 501-1000 is for inbound forward rule, and
            1001-1500 is for inbound filter rule. Auto-increasement will apply
            when api payload doesn't specify the priority
          default: 501
          minimum: 501
        gatewayPort:
          type: string
          description: >
            Public port in device firewall inbound. It stand for packet
            destination port of filter, or external port of portforward.
            Support:
              * 502
              * empty string
          default: ''
        protocol:
          type: string
          description: |
            Rule handles the specified protocol
          enum:
            - any
            - tcp
            - udp
            - icmp
          default: any
        sourceIp:
          type: string
          description: |
            Packet soruce IP. Support:
              * 192.168.0.1
              * 192.168.0.1/24
              * empty string
          default: ''
        sourcePort:
          type: string
          description: |
            Packet soruce port. Support:
              * 502
              * 502-505
              * empty string
          default: ''
        destinationIp:
          type: string
          description: >
            Packet destination IP. In forward case, it stand for internal child
            device ip(or private ip). Support:
              * 192.168.0.1
              * 192.168.0.1/24
              * empty string
          default: ''
        destinationPort:
          type: string
          description: Required in forward case only. e.g. internal child device port.
          default: ''
        action:
          type: string
          description: |
            TPE device outbound policy deny all by default.
             * Set packet action as `allow` for whitelist. Gateway Port is necessary for TCP and UDP protocol to allow specific port
             * Set packet action as `forward` for accessing internal service or child device. Gateway Port, Destination IP, and Destionation Port are necessary
          enum:
            - allow
            - forward
    Tag:
      type: object
      properties:
        prvdName:
          type: string
        srcName:
          type: string
        tagName:
          type: string
        ts:
          type: integer
          format: int64
        dataType:
          type: string
          enum:
            - uint8
            - uint16
            - uint32
            - uint64
            - int16
            - int32
            - int64
            - float32
            - float64
            - string
            - boolean
            - bytearray
        dataValue:
          type: object
    TagList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
    platformTag:
      description: scanner tag information for platform
      type: object
      properties:
        prvdName:
          description: provider name for full tag name used
          type: string
        srcName:
          description: source name for full tag name used
          type: string
        tagName:
          description: Tag name for full tag name used
          type: string
        dataType:
          description: Data type of tag
          type: string
          enum:
            - boolean
            - int8
            - int16
            - int32
            - int64
            - uint8
            - uint16
            - uint32
            - uint64
            - float
            - double
            - raw
          default: raw
        access:
          description: |
            Tag access for publish or subscribe
            * 'r' - Read data from device, T->O
            * 'w' - Write data to device, O->T
          type: string
          enum:
            - r
            - w
          default: r
        dataSize:
          description: Data size of tag(bytes), only used when dataType is "raw"
          type: integer
        dataUnit:
          description: Real unit description of tag (Ex ms, s, A, mA, etc...)
          type: string
      example:
        prvdName: system
        srcName: device1
        tagName: voltage
        dataType: int32
        access: w
        dataUnit: '%'
    platformTags:
      description: scanner tag list for platform
      type: array
      items:
        $ref: '#/components/schemas/platformTag'
    error:
      required:
        - message
      properties:
        error:
          type: object
          properties:
            message:
              type: string
  examples:
    NtpDisabled:
      value:
        data:
          type: time
          lastUpdateTime: '-'
          time: '2015-03-26T16:27:48+08:00'
          timezone: Asia/Taipei
          ntp:
            enable: false
            source: timeserver
            server: pool.ntp.org
            gpsLongJump: true
            interval: 86400
    NtpTimeServerEnabled:
      value:
        data:
          type: time
          lastUpdateTime: '-'
          time: '2015-03-26T16:27:48+08:00'
          timezone: Asia/Taipei
          ntp:
            enable: true
            source: timeserver
            server: pool.ntp.org
            gpsLongJump: true
            interval: 86400
    NtpTimeServerEnabledAndSynced:
      value:
        data:
          type: time
          lastUpdateTime: '2015-03-26T16:00:00+08:00'
          time: '2015-03-26T16:27:48+08:00'
          timezone: Asia/Taipei
          ntp:
            enable: true
            source: timeserver
            server: pool.ntp.org
            gpsLongJump: true
            interval: 86400
    NtpGpsEnabled:
      value:
        data:
          type: time
          lastUpdateTime: '-'
          time: '2015-03-26T16:27:48+08:00'
          timezone: Asia/Taipei
          ntp:
            enable: true
            source: gps
            server: ''
            gpsLongJump: true
            interval: 86400
    NtpGpsEnabledAndSynced:
      value:
        data:
          type: time
          lastUpdateTime: '2015-03-26T16:00:00+08:00'
          time: '2015-03-26T16:27:48+08:00'
          timezone: Asia/Taipei
          ntp:
            enable: true
            source: gps
            server: ''
            gpsLongJump: true
            interval: 86400
    AllCellularInformation:
      summary: all cellular information
      value:
        count: 1
        data:
          - currentProfileId: 1
            carrier: ATT
            ip: ''
            tac: ''
            type: cellular
            operatorName: ''
            keepalive:
              intervalSec: 60
              enable: true
              targetHost: 8.8.8.8
              reboot:
                enable: true
                intervalMin: 20
            capabilities:
              sim: 1
              carriers:
                - ATT
                - SPRINT
            id: 1
            gateway: ''
            autoDetect: false
            profileTimeout: 120
            esn: 80AF33D7
            imsi: '466977300046885'
            status: ready
            enable: false
            available: true
            dns: []
            bid: ''
            nid: ''
            lac: '11114'
            mac: '00:00:11:12:13:14'
            imei: '359841080332053'
            cellId: '6326'
            name: wwan0
            displayName: wwan0
            signal:
              rssi: -67
              rsrq: 0
              csq: 16
              ecio: 0
            pinRetryRemain: -1
            netmask: ''
            profiles:
              - pinCode: '0000'
                init:
                  - sim:1
                  - carrier:ATT
                id: 1
                name: SIM1
                pdpContext:
                  static: true
                  apn: internet
                  id: 1
                  auth:
                    protocol: none
                    username: ''
                    password: ''
                  type: ipv4
            mode: lte
            iccId: '89886971410730170000'
    AllCellularInformationNotAvailable:
      summary: all cellular information not available
      value:
        count: 1
        data:
          - currentProfileId: 1
            carrier: ATT
            ip: ''
            tac: ''
            type: cellular
            operatorName: ''
            keepalive:
              intervalSec: 60
              enable: true
              targetHost: 8.8.8.8
              reboot:
                enable: true
                intervalMin: 20
            capabilities:
              sim: 1
              carriers:
                - ATT
                - SPRINT
            id: 1
            gateway: ''
            autoDetect: false
            profileTimeout: 120
            esn: 80AF33D7
            imsi: '466977300046885'
            status: ready
            enable: false
            available: false
            dns: []
            bid: ''
            nid: ''
            lac: '11114'
            mac: '00:00:11:12:13:14'
            imei: '359841080332053'
            cellId: '6326'
            name: wwan0
            displayName: wwan0
            signal:
              rssi: -67
              rsrq: 0
              csq: 16
              ecio: 0
            pinRetryRemain: -1
            netmask: ''
            profiles:
              - pinCode: '0000'
                init:
                  - sim:1
                  - carrier:ATT
                id: 1
                name: SIM1
                pdpContext:
                  static: true
                  apn: internet
                  id: 1
                  auth:
                    protocol: none
                    username: ''
                    password: ''
                  type: ipv4
            mode: lte
            iccId: '89886971410730170000'
    PatchMultipleCellulars:
      summary: patch multiple cellulars settings
      value:
        - id: 1
          enable: true
          keepalive:
            intervalSec: 60
            enable: true
            targetHost: 8.8.8.8
            reboot:
              enable: true
              intervalMin: 20
          autoDetect: false
          profileTimeout: 120
          profiles:
            - pinCode: '0000'
              init:
                - sim:1
                - carrier:ATT
              name: SIM1
              pdpContext:
                static: true
                apn: internet
                id: 1
                auth:
                  protocol: none
                  username: ''
                  password: ''
                type: ipv4
    PatchMultipleCellularsAuto:
      summary: patch multiple cellulars settings with auto detect
      value:
        - id: 1
          enable: true
          keepalive:
            intervalSec: 60
            enable: true
            targetHost: 8.8.8.8
            reboot:
              enable: true
              intervalMin: 20
          autoDetect: true
          profileTimeout: 120
    CellularInformation:
      summary: cellular information
      value:
        currentProfileId: 1
        carrier: ATT
        ip: ''
        tac: ''
        type: cellular
        operatorName: ''
        keepalive:
          intervalSec: 60
          enable: true
          targetHost: 8.8.8.8
          reboot:
            enable: true
            intervalMin: 20
        capabilities:
          sim: 1
          carriers:
            - ATT
            - SPRINT
        id: 1
        gateway: ''
        autoDetect: false
        profileTimeout: 120
        esn: 80AF33D7
        imsi: '466977300046885'
        status: ready
        enable: false
        available: true
        dns: []
        bid: ''
        nid: ''
        lac: '11114'
        mac: '00:00:11:12:13:14'
        imei: '359841080332053'
        cellId: '6326'
        name: wwan0
        displayName: wwan0
        signal:
          rssi: -67
          rsrq: 0
          csq: 16
          ecio: 0
        pinRetryRemain: -1
        netmask: ''
        profiles:
          - pinCode: '0000'
            init:
              - sim:1
              - carrier:ATT
            id: 1
            name: SIM1
            pdpContext:
              static: true
              apn: internet
              id: 1
              auth:
                protocol: none
                username: ''
                password: ''
              type: ipv4
        mode: lte
        iccId: '89886971410730170000'
    CellularInformationNotAvailable:
      summary: cellular information not available
      value:
        currentProfileId: 1
        carrier: ATT
        ip: ''
        tac: ''
        type: cellular
        operatorName: ''
        keepalive:
          intervalSec: 60
          enable: true
          targetHost: 8.8.8.8
          reboot:
            enable: true
            intervalMin: 20
        capabilities:
          sim: 1
          carriers:
            - ATT
            - SPRINT
        id: 1
        gateway: ''
        autoDetect: false
        profileTimeout: 120
        esn: 80AF33D7
        imsi: '466977300046885'
        status: ready
        enable: false
        available: false
        dns: []
        bid: ''
        nid: ''
        lac: '11114'
        mac: '00:00:11:12:13:14'
        imei: '359841080332053'
        cellId: '6326'
        name: wwan0
        displayName: wwan0
        signal:
          rssi: -67
          rsrq: 0
          csq: 16
          ecio: 0
        pinRetryRemain: -1
        netmask: ''
        profiles:
          - pinCode: '0000'
            init:
              - sim:1
              - carrier:ATT
            id: 1
            name: SIM1
            pdpContext:
              static: true
              apn: internet
              id: 1
              auth:
                protocol: none
                username: ''
                password: ''
              type: ipv4
        mode: lte
        iccId: '89886971410730170000'
    PatchCellular:
      summary: patch a cellular settings
      value:
        enable: true
        keepalive:
          intervalSec: 60
          enable: true
          targetHost: 8.8.8.8
          reboot:
            enable: true
            intervalMin: 20
        autoDetect: false
        profileTimeout: 120
        profiles:
          - pinCode: '0000'
            init:
              - sim:1
              - carrier:ATT
            name: SIM1
            pdpContext:
              static: true
              apn: internet
              id: 1
              auth:
                protocol: none
                username: ''
                password: ''
              type: ipv4
    PatchCellularAuto:
      summary: patch a cellular settings with auto detect
      value:
        enable: true
        keepalive:
          intervalSec: 60
          enable: true
          targetHost: 8.8.8.8
          reboot:
            enable: true
            intervalMin: 20
        autoDetect: true
        profileTimeout: 120
    GetAPMode:
      value:
        data:
          - type: wifi
            id: 1
            name: wlan0
            displayName: Wi-Fi1
            available: true
            mode: ap
            enable: false
            status: false
            capabilities:
              mode:
                - ap
                - client
              band:
                - band24
                - band50
            regions:
              - name: North America
                countryCode: US
                band24:
                  - 1
                  - 2
                  - 3
                  - 4
                  - 5
                  - 6
                  - 7
                  - 8
                  - 9
                  - 10
                  - 11
                band50:
                  - 36
                  - 38
                  - 40
                  - 42
                  - 44
                  - 46
                  - 48
                  - 149
                  - 153
                  - 157
                  - 161
                  - 165
              - name: Europe
                countryCode: GB
                band24:
                  - 1
                  - 2
                  - 3
                  - 4
                  - 5
                  - 6
                  - 7
                  - 8
                  - 9
                  - 10
                  - 11
                  - 12
                  - 13
                band50:
                  - 36
                  - 38
                  - 40
                  - 42
                  - 44
                  - 46
                  - 48
              - name: Taiwan
                countryCode: TW
                band24:
                  - 1
                  - 2
                  - 3
                  - 4
                  - 5
                  - 6
                  - 7
                  - 8
                  - 9
                  - 10
                  - 11
                  - 12
                  - 13
                band50:
                  - 34
                  - 36
                  - 38
                  - 40
                  - 42
                  - 44
                  - 46
                  - 48
                  - 149
                  - 153
                  - 157
                  - 161
                  - 165
            ap:
              band: band24
              broadcastSsid: true
              ssid: moxa-test-ap-1
              security:
                mode: wpa2-personal
                encryption: aes
                password: ''
              channel: 6
              region: TW
              clients: []
        count: 1
    GetClientMode:
      value:
        data:
          - type: wifi
            id: 1
            name: wlan0
            displayName: Wi-Fi1
            available: true
            mode: client
            enable: true
            status: true
            capabilities:
              mode:
                - ap
                - client
              band:
                - band24
                - band50
            client:
              connectState: connected
              currentAp: bzLJpU7MR
              priority:
                - bzLJpU7MR
              networks:
                - uuid: bzLJpU7MR
                  ssid: moxa-test-ap-1
                  bssid: 10:c3:7b:c6:47:f8
                  security:
                    mode: wpa2-personal
                    encryption: aes
                    password: '!2345678'
                  signal: -17
                  band: band50
                - uuid: kcpJpUnMR
                  ssid: moxa-ap-2
                  bssid: ''
                  security:
                    mode: wpa2-personal
                    encryption: aes
                    password: '!2345678'
                  signal: null
                  band: band24
        count: 1
    PatchAPMode:
      value:
        - type: wifi
          id: 1
          name: wlan0
          displayName: Wi-Fi1
          mode: ap
          enable: true
          ap:
            band: band24
            broadcastSsid: true
            ssid: moxa-test-ap-1
            security:
              mode: personal
              encryption: aes
              password: ''
            channel: 6
            region: US
    PatchClientMode:
      value:
        - type: wifi
          id: 1
          name: wlan0
          displayName: Wi-Fi1
          mode: client
          enable: true
    PatchResultAPMode:
      value:
        data:
          - type: wifi
            id: 1
            name: wlan0
            displayName: Wi-Fi1
            mode: ap
            enable: true
            ap:
              band: band24
              broadcastSsid: true
              ssid: moxa-test-ap-1
              security:
                mode: wpa2
                encryption: aes
                password: ''
              channel: 11
              region: US
        count: 1
    PatchResultClientMode:
      value:
        data:
          - type: wifi
            id: 1
            name: wlan0
            displayName: Wi-Fi1
            available: true
            mode: client
            enable: true
            status: true
            capabilities:
              mode:
                - ap
                - client
              band:
                - band24
                - band50
            client:
              connectState: connected
              currentAp: bzLJpU7MR
              priority:
                - bzLJpU7MR
              networks:
                - uuid: bzLJpU7MR
                  ssid: moxa-test-ap-1
                  bssid: 10:c3:7b:c6:47:f8
                  security:
                    mode: wpa2-personal
                    encryption: aes
                    password: '!2345678'
                  signal: -17
                  band: band50
                - uuid: kcpJpUnMR
                  ssid: moxa-ap-2
                  bssid: ''
                  security:
                    mode: wpa2-personal
                    encryption: aes
                    password: '!2345678'
                  signal: null
                  band: band24
        count: 1
    GetAPModeByID:
      value:
        data:
          type: wifi
          id: 1
          name: wlan0
          displayName: Wi-Fi1
          available: true
          mode: ap
          enable: false
          status: false
          capabilities:
            mode:
              - ap
              - client
            band:
              - band24
              - band50
          regions:
            - name: North America
              countryCode: US
              band24:
                - 1
                - 2
                - 3
                - 4
                - 5
                - 6
                - 7
                - 8
                - 9
                - 10
                - 11
              band50:
                - 36
                - 38
                - 40
                - 42
                - 44
                - 46
                - 48
                - 149
                - 153
                - 157
                - 161
                - 165
            - name: Europe
              countryCode: GB
              band24:
                - 1
                - 2
                - 3
                - 4
                - 5
                - 6
                - 7
                - 8
                - 9
                - 10
                - 11
                - 12
                - 13
              band50:
                - 36
                - 38
                - 40
                - 42
                - 44
                - 46
                - 48
            - name: Taiwan
              countryCode: TW
              band24:
                - 1
                - 2
                - 3
                - 4
                - 5
                - 6
                - 7
                - 8
                - 9
                - 10
                - 11
                - 12
                - 13
              band50:
                - 34
                - 36
                - 38
                - 40
                - 42
                - 44
                - 46
                - 48
                - 149
                - 153
                - 157
                - 161
                - 165
          ap:
            band: band24
            broadcastSsid: true
            ssid: moxa-test-ap-1
            security:
              mode: wpa2
              encryption: aes
              password: ''
            channel: 6
            region: TW
            clients: []
    GetClientModeByID:
      value:
        data:
          type: wifi
          id: 1
          name: wlan0
          displayName: Wi-Fi1
          available: true
          mode: client
          enable: true
          status: true
          capabilities:
            mode:
              - ap
              - client
            band:
              - band24
              - band50
          client:
            connectState: connected
            currentAp: bzLJpU7MR
            priority:
              - bzLJpU7MR
            networks:
              - uuid: bzLJpU7MR
                ssid: moxa-test-ap-1
                bssid: 10:c3:7b:c6:47:f8
                security:
                  mode: wpa2
                  encryption: aes
                  password: '!2345678'
                signal: -17
                band: band50
              - uuid: kcpJpUnMR
                ssid: moxa-ap-2
                bssid: ''
                security:
                  mode: wpa2-personal
                  encryption: aes
                  password: '!2345678'
                signal: null
                band: band24
    PatchAPModeByID:
      value:
        type: wifi
        id: 1
        name: wlan0
        displayName: Wi-Fi1
        mode: ap
        enable: true
        ap:
          band: band24
          broadcastSsid: true
          ssid: moxa-test-ap-1
          security:
            mode: wpa2
            encryption: aes
            password: ''
          channel: 6
          region: US
    PatchClientModeByID:
      value:
        type: wifi
        id: 1
        name: wlan0
        displayName: Wi-Fi1
        mode: client
        enable: true
    PatchResultAPModeByID:
      value:
        data:
          type: wifi
          id: 1
          name: wlan0
          displayName: Wi-Fi1
          mode: ap
          enable: true
          ap:
            band: band24
            broadcastSsid: true
            ssid: moxa-test-ap-1
            security:
              mode: wpa2
              encryption: aes
              password: ''
            channel: 11
            region: US
    PatchResultClientModeByID:
      value:
        data:
          type: wifi
          id: 1
          name: wlan0
          displayName: Wi-Fi1
          available: true
          mode: client
          enable: true
          status: true
          capabilities:
            mode:
              - ap
              - client
            band:
              - band24
              - band50
          client:
            connectState: connected
            currentAp: bzLJpU7MR
            priority:
              - bzLJpU7MR
            networks:
              - uuid: bzLJpU7MR
                ssid: moxa-test-ap-1
                bssid: 10:c3:7b:c6:47:f8
                security:
                  mode: wpa2-personal
                  encryption: aes
                  password: '!2345678'
                signal: -17
                band: band50
              - uuid: kcpJpUnMR
                ssid: moxa-ap-2
                bssid: ''
                security:
                  mode: wpa2-personal
                  encryption: aes
                  password: '!2345678'
                signal: null
                band: band24
    DhcpServerMultipleItemsRsp:
      value:
        data:
          - type: dhcpservers
            id: 1
            status: true
            available: true
            name: eth0
            displayName: LAN1
            enable: true
            startIp: 192.168.3.100
            endIp: 192.168.3.200
            netmask: 255.255.255.0
            domainNameServers:
              - 8.8.8.8
            domainName: example.com
            leaseTime: 2592000
          - type: dhcpservers
            id: 2
            status: true
            available: true
            name: eth1
            displayName: LAN2
            enable: true
            startIp: 192.168.4.100
            endIp: 192.168.4.200
            netmask: 255.255.255.0
            domainNameServers:
              - 8.8.8.8
            domainName: example.com
            leaseTime: 2592000
        count: 2
    DhcpServerSingleItemReq:
      value:
        - id: 1
          enable: true
          startIp: 192.168.3.100
          endIp: 192.168.3.200
          netmask: 255.255.255.0
          domainNameServers:
            - 8.8.8.8
          domainName: example.com
          leaseTime: 2592000
    DhcpServerMultipleItemsReq:
      value:
        - id: 1
          enable: true
          startIp: 192.168.3.100
          endIp: 192.168.3.200
          netmask: 255.255.255.0
          domainNameServers:
            - 8.8.8.8
          domainName: example.com
          leaseTime: 2592000
        - id: 2
          enable: true
          startIp: 192.168.4.100
          endIp: 192.168.4.200
          netmask: 255.255.255.0
          domainNameServers:
            - 8.8.8.8
          domainName: example.com
          leaseTime: 2592000
    DhcpServerSinglePartialItemReq:
      value:
        - id: 1
          enable: true
    DhcpServerMultiplePartialItemsReq:
      value:
        - id: 1
          enable: true
        - id: 2
          startIp: 192.168.4.100
    DhcpServerSingleItemRsp:
      value:
        data:
          - type: dhcpservers
            id: 1
            status: true
            available: true
            enable: true
            name: eth0
            displayName: LAN1
            startIp: 192.168.3.100
            endIp: 192.168.3.200
            netmask: 255.255.255.0
            domainNameServers:
              - 8.8.8.8
            domainName: example.com
            leaseTime: 2592000
        count: 1
    DhcpServerItemRsp:
      value:
        data:
          type: dhcpservers
          id: 1
          status: true
          available: true
          name: eth0
          displayName: LAN1
          enable: true
          startIp: 192.168.3.100
          endIp: 192.168.3.200
          netmask: 255.255.255.0
          domainNameServers:
            - 8.8.8.8
          domainName: example.com
          leaseTime: 2592000
    DhcpServerItemReq:
      value:
        id: 1
        enable: true
        startIp: 192.168.3.100
        endIp: 192.168.3.200
        netmask: 255.255.255.0
        domainNameServers:
          - 8.8.8.8
        domainName: example.com
        leaseTime: 2592000
    DhcpServerPartialItemReq:
      value:
        id: 1
        enable: true
  responses:
    UnexpectedError:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
paths:
  /device/general:
    get:
      description: Get device general configuration.
      tags:
        - device
        - general
      responses:
        '200':
          description: Device general configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralInformation'
              example:
                data:
                  type: general
                  description: This is My Thingspro Edge.
                  hostName: Moxa
                  modelName: UC-8112A-ME-T-LX-EU
                  serialNumber: IMOXA1234567
                  firmwareVersion: 1.0.0
                  biosVersion: 1.0.0S01
                  lastRebootTime: '2019-06-27T10:10:16+08:00'
                  memorySize: 1056120832
                  cpu: ARMv7 Processor rev 2 (v7l)
                  disk:
                    - name: System
                      mount: /
                      device: /dev/root
                      total: 3206059008
                      free: 1905097752
                      used: 1138657820
                      percent: 35.5
                      tags:
                        used: systemDiskUsed
                        free: systemDiskFree
                        percent: systemDiskPercent
    patch:
      tags:
        - device
        - general
      description: Update device general configuration.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                description:
                  type: string
                  description: This is My Thingspro Edge.
                  maximum: 512
                  example: MyThingsproEdge
                hostName:
                  type: string
                  description: >-
                    device hostname. <br> - Hostname must be between 1 and 64
                    octets inclusive.<br> - Each label in the hostname
                    (component separated by ".") must be between 1 and 63 octets
                    inclusive. <br> - Each label must start with an ASCII
                    alphabet character (a-z, A-Z), end with an ASCII
                    alphanumeric character (a-z, A-Z, 0-9), and must contain
                    only ASCII alphanumeric characters or hyphens (a-z, A-Z,
                    0-9, "-").
                  minimum: 1
                  maximum: 64
                  pattern: >-
                    ^[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$
                  example: Moxa
            examples:
              update device display name:
                value:
                  description: This is My Thingspro Edge.
              update device hostname:
                value:
                  hostName: MyHost
      responses:
        '200':
          description: Device general configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralInformation'
              example:
                data:
                  type: general
                  description: This is My Thingspro Edge.
                  hostName: MyHost
                  modelName: UC-8112A-ME-T-LX-EU
                  serialNumber: IMOXA1234567
                  firmwareVersion: 1.0.0
                  biosVersion: 1.0.0S01
                  lastRebootTime: '2019-06-27T10:10:16+08:00'
                  memorySize: 1056120832
                  cpu: ARMv7 Processor rev 2 (v7l)
                  disk:
                    - name: System
                      mount: /
                      device: /dev/root
                      total: 3206059008
                      free: 1905097752
                      used: 1138657820
                      percent: 35.5
                      tags:
                        used: systemDiskUsed
                        free: systemDiskFree
                        percent: systemDiskPercent
  /device/time:
    get:
      description: Get device time configuration.
      tags:
        - device
        - time
      responses:
        '200':
          description: Device time configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeInformation'
              examples:
                NtpDisabled:
                  $ref: '#/components/examples/NtpDisabled'
                NtpTimeServerEnabled:
                  $ref: '#/components/examples/NtpTimeServerEnabled'
                NtpTimeServerEnabledAndSynced:
                  $ref: '#/components/examples/NtpTimeServerEnabledAndSynced'
                NtpGpsEnabled:
                  $ref: '#/components/examples/NtpGpsEnabled'
                NtpGpsEnabledAndSynced:
                  $ref: '#/components/examples/NtpGpsEnabledAndSynced'
    patch:
      tags:
        - device
        - time
      description: Update device time configuration.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimeInformation'
            examples:
              update time:
                value:
                  time: '2015-03-26T16:27:48+08:00'
              update timezone:
                value:
                  timezone: Asia/Taipei
              sync time from time server:
                value:
                  ntp:
                    enable: true
                    source: timeserver
                    server: tock.stdtime.gov.tw
                    gpsLongJump: true
                    interval: 6000
              sync time by gps:
                value:
                  ntp:
                    enable: true
                    source: gps
                    server: ''
                    gpsLongJump: true
                    interval: 6000
      responses:
        '200':
          description: Device time configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeInformation'
              examples:
                NtpDisabled:
                  $ref: '#/components/examples/NtpDisabled'
                NtpTimeServerEnabled:
                  $ref: '#/components/examples/NtpTimeServerEnabled'
                NtpTimeServerEnabledAndSynced:
                  $ref: '#/components/examples/NtpTimeServerEnabledAndSynced'
                NtpGpsEnabled:
                  $ref: '#/components/examples/NtpGpsEnabled'
                NtpGpsEnabledAndSynced:
                  $ref: '#/components/examples/NtpGpsEnabledAndSynced'
  /device/zoneinfo:
    get:
      tags:
        - device
        - zoneinfo
      description: Get current timezone information
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimezoneInfo'
  /device/dns:
    get:
      description: Get device's current DNS settings.
      tags:
        - device
        - dns
      responses:
        '200':
          description: Device DNS settings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DnsInformation'
              example:
                data:
                  - 10.128.8.8
                  - 8.8.8.8
  /device/route:
    get:
      description: Get device route configuration.
      tags:
        - device
        - route
      responses:
        '200':
          description: Device route configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteInformation'
              example:
                data:
                  type: route
                  default: LAN1
                  priorityList:
                    - LAN1
                    - Cellular1
                    - LAN2
    patch:
      tags:
        - device
        - route
      description: Update device route configuration.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteInformation'
            example:
              priorityList:
                - LAN2
                - Cellular1
                - LAN1
      responses:
        '200':
          description: Device route configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteInformation'
              example:
                data:
                  type: route
                  default: LAN2
                  priorityList:
                    - LAN2
                    - Cellular1
                    - LAN1
  /device/network/wan:
    get:
      description: Get device route configuration of wan.
      tags:
        - device
        - network
        - wan
      responses:
        '200':
          description: Device route configuration of wan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WANInformation'
              example:
                data:
                  name: eth0
                  displayName: LAN1
                  ip: 192.168.3.127
                  netmask: 255.255.255.0
                  gateway: 192.168.3.254
                  dns:
                    - 192.168.3.1
  /device/ethernets:
    get:
      description: Get ethernet interfaces configuration.
      tags:
        - device
        - ethernets
      responses:
        '200':
          description: All ethernet interfaces configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllEthernetInformation'
              example:
                data:
                  - type: ethernets
                    id: 1
                    displayName: LAN1
                    name: eth0
                    wan: true
                    enable: true
                    status: connected
                    enableDhcp: false
                    ip: 192.168.3.100
                    netmask: 255.255.255.0
                    subnet: 192.168.3.0
                    broadcast: 192.168.3.255
                    gateway: 192.168.3.254
                    dns:
                      - 8.8.8.8
                      - 4.4.4.4
                    mac: 00:90:e8:12:34:56
                count: 1
  /device/ethernets/{id}:
    parameters:
      - name: id
        in: path
        description: Ethernet interface id.
        schema:
          type: integer
        required: true
        example: 1
    get:
      description: Get ethernet interface configuration.
      tags:
        - device
        - ethernets
      responses:
        '200':
          description: Ethernet interface configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EthernetInformation'
              example:
                data:
                  type: ethernets
                  id: 1
                  displayName: LAN1
                  name: eth0
                  wan: true
                  enable: true
                  status: connected
                  enableDhcp: false
                  ip: 192.168.3.100
                  netmask: 255.255.255.0
                  subnet: 192.168.3.0
                  broadcast: 192.168.3.255
                  gateway: 192.168.3.254
                  dns:
                    - 8.8.8.8
                    - 4.4.4.4
                  mac: 00:90:e8:12:34:56
    patch:
      description: Update ethernet interface configuration.
      tags:
        - device
        - ethernets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/EthernetDhcp'
                - $ref: '#/components/schemas/EthernetStaticIP'
            examples:
              dhcp:
                value:
                  enable: true
                  enableDhcp: true
                  wan: true
              static:
                value:
                  enable: true
                  ip: 192.168.4.100
                  netmask: 255.255.255.0
                  gateway: 192.168.4.254
                  dns:
                    - 1.1.1.1
                    - 2.2.2.2
                  enableDhcp: false
                  wan: true
      responses:
        '200':
          description: Ethernet interface configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EthernetInformation'
              examples:
                dhcp:
                  value:
                    data:
                      type: ethernets
                      id: 1
                      displayName: LAN1
                      name: eth0
                      wan: true
                      enable: true
                      status: connected
                      enableDhcp: true
                      ip: 192.168.3.100
                      netmask: 255.255.255.0
                      subnet: 192.168.3.0
                      broadcast: 192.168.3.255
                      gateway: 192.168.3.254
                      dns:
                        - 8.8.8.8
                        - 4.4.4.4
                      mac: 00:90:e8:12:34:56
                static:
                  value:
                    data:
                      type: ethernets
                      id: 1
                      displayName: LAN1
                      name: eth0
                      wan: true
                      enable: true
                      status: connected
                      enableDhcp: false
                      ip: 192.168.4.100
                      netmask: 255.255.255.0
                      subnet: 192.168.4.0
                      broadcast: 192.168.4.255
                      gateway: 192.168.4.254
                      dns:
                        - 1.1.1.1
                        - 2.2.2.2
                      mac: 00:90:e8:12:34:56
  /device/serials:
    get:
      description: Get serial interfaces configuration.
      tags:
        - device
        - serials
      responses:
        '200':
          description: All serial configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllSerialInformation'
              example:
                data:
                  - type: serials
                    id: 1
                    mode: rs232
                    displayName: P1
                    device: /dev/ttyM0
                    baudRate: 9600
                    parity: none
                    dataBits: 8
                    stopBits: 1
                    flowControl: hardware
                    capabilities:
                      mode:
                        - rs232
                        - rs422
                        - rs4852w
                        - rs4854w
                      baudRate:
                        special: false
                        range:
                          - 300
                          - 600
                          - 1200
                          - 1800
                          - 2400
                          - 4800
                          - 9600
                          - 19200
                          - 38400
                          - 57600
                          - 115200
                          - 230400
                          - 460800
                          - 921600
                      parities:
                        - none
                        - odd
                        - even
                        - space
                        - mark
                      dataBits:
                        - 5
                        - 6
                        - 7
                        - 8
                      stopBits:
                        - 1
                        - 2
                        - 1.5
                      flowControl:
                        - none
                        - hardware
                        - software
                  - type: serials
                    id: 2
                    mode: rs422
                    displayName: P2
                    device: /dev/ttyM1
                    baudRate: 115200
                    parity: none
                    dataBits: 8
                    stopBits: 1
                    flowControl: software
                    capabilities:
                      mode:
                        - rs232
                        - rs422
                        - rs4852w
                        - rs4854w
                      baudRate:
                        special: false
                        range:
                          - 300
                          - 600
                          - 1200
                          - 1800
                          - 2400
                          - 4800
                          - 9600
                          - 19200
                          - 38400
                          - 57600
                          - 115200
                          - 230400
                          - 460800
                          - 921600
                      parities:
                        - none
                        - odd
                        - even
                        - space
                        - mark
                      dataBits:
                        - 5
                        - 6
                        - 7
                        - 8
                      stopBits:
                        - 1
                        - 2
                        - 1.5
                      flowControl:
                        - none
                        - hardware
                        - software
                count: 2
    patch:
      description: Update serial interfaces configuration.
      tags:
        - device
        - serials
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/SerialConfiguration'
            example:
              - id: 1
                mode: rs232
              - id: 2
                mode: rs4852w
                baudRate: 19200
                parity: none
                dataBits: 8
                stopBits: 1
                flowControl: none
      responses:
        '200':
          description: All serial configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllSerialInformation'
              example:
                data:
                  - type: serials
                    id: 1
                    mode: rs232
                    displayName: P1
                    device: /dev/ttyM0
                    baudRate: 9600
                    parity: none
                    dataBits: 8
                    stopBits: 1
                    flowControl: hardware
                  - type: serials
                    id: 2
                    mode: rs4852w
                    displayName: P2
                    device: /dev/ttyM1
                    baudRate: 19200
                    parity: none
                    dataBits: 8
                    stopBits: 1
                    flowControl: none
                count: 2
  /device/serials/{id}:
    parameters:
      - name: id
        in: path
        description: Serial interface id.
        schema:
          type: integer
        required: true
        example: 1
    get:
      description: Get serial interface configuration.
      tags:
        - device
        - serials
      responses:
        '200':
          description: Serial interface configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SerialInformation'
              example:
                data:
                  type: serials
                  id: 1
                  mode: rs232
                  displayName: P1
                  device: /dev/ttyM0
                  baudRate: 9600
                  parity: none
                  dataBits: 8
                  stopBits: 1
                  flowControl: hardware
                  capabilities:
                    mode:
                      - rs232
                      - rs422
                      - rs4852w
                      - rs4854w
                    baudRate:
                      special: false
                      range:
                        - 300
                        - 600
                        - 1200
                        - 1800
                        - 2400
                        - 4800
                        - 9600
                        - 19200
                        - 38400
                        - 57600
                        - 115200
                        - 230400
                        - 460800
                        - 921600
                    parities:
                      - none
                      - odd
                      - even
                      - space
                      - mark
                    dataBits:
                      - 5
                      - 6
                      - 7
                      - 8
                    stopBits:
                      - 1
                      - 2
                      - 1.5
                    flowControl:
                      - none
                      - hardware
                      - software
    patch:
      description: Update serial interface configuration.
      tags:
        - device
        - serials
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SerialConfiguration'
            example:
              mode: rs422
              flowControl: software
      responses:
        '200':
          description: Serial interface configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SerialInformation'
              example:
                data:
                  type: serial
                  id: 1
                  mode: rs422
                  displayName: P1
                  device: /dev/ttyM0
                  baudRate: 115200
                  parity: none
                  dataBits: 8
                  stopBits: 1
                  flowControl: software
  /device/cellulars:
    get:
      description: Get cellular interfaces configuration.
      tags:
        - device
        - cellulars
      responses:
        '200':
          description: All cellular interfaces
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllCellularInformation'
              examples:
                AllCellularInformation:
                  $ref: '#/components/examples/AllCellularInformation'
                AllCellularInformationNotAvailable:
                  $ref: '#/components/examples/AllCellularInformationNotAvailable'
    patch:
      tags:
        - device
        - cellulars
      description: Update cellular interfaces configuration.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CellularItemWithId'
            examples:
              PatchMultipleCellular:
                $ref: '#/components/examples/PatchMultipleCellulars'
              PatchMultipleCellularAuto:
                $ref: '#/components/examples/PatchMultipleCellularsAuto'
      responses:
        '200':
          description: Device cellular configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllCellularInformation'
              examples:
                AllCellularInformation:
                  $ref: '#/components/examples/AllCellularInformation'
                AllCellularInformationNotAvailable:
                  $ref: '#/components/examples/AllCellularInformationNotAvailable'
  /device/cellulars/{id}:
    parameters:
      - name: id
        in: path
        description: Cellular interface id.
        schema:
          type: integer
        required: true
    get:
      description: Get cellular interface configuration.
      tags:
        - device
        - cellulars
      responses:
        '200':
          description: Cellular interface configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CellularInformation'
              examples:
                CellularInformation:
                  $ref: '#/components/examples/CellularInformation'
                CellularInformationNotAvailable:
                  $ref: '#/components/examples/CellularInformationNotAvailable'
    patch:
      description: Update cellular configuration.
      tags:
        - device
        - cellulars
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CellularItem'
            examples:
              PatchCellular:
                $ref: '#/components/examples/PatchCellular'
              PatchCellularAuto:
                $ref: '#/components/examples/PatchCellularAuto'
      responses:
        '200':
          description: Cellular interface configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CellularInformation'
              examples:
                CellularInformation:
                  $ref: '#/components/examples/CellularInformation'
                CellularInformationNotAvailable:
                  $ref: '#/components/examples/CellularInformationNotAvailable'
  /device/gps:
    get:
      description: Get gps configuration.
      tags:
        - device
        - gps
      responses:
        '200':
          description: gps configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GpsInformation'
              example:
                data:
                  type: gps
                  mode: manual
                  interface: ''
                  location:
                    lat: 23.5
                    lng: 121.2
                  capabilities:
                    interface:
                      - /dev/ttyUSB0
                      - /dev/ttyUSB1
    patch:
      description: Patch gps configuration.
      tags:
        - device
        - gps
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GpsSetManualMode'
            examples:
              set manual mode with lat/lng value:
                value:
                  mode: manual
                  location:
                    lat: 23.5
                    lng: 121.2
              set auto mode with interface:
                value:
                  mode: auto
                  interface: /dev/ttyUSB0
      responses:
        '200':
          description: All gps configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GpsInformation'
              examples:
                manual:
                  value:
                    data:
                      type: gps
                      mode: manual
                      interface: ''
                      location:
                        lat: 23.5
                        lng: 121.2
                auto:
                  value:
                    data:
                      type: gps
                      mode: auto
                      interface: /dev/ttyUSB0
                      location:
                        lat: 0
                        lng: 0
  /device/wifi:
    get:
      description: Get Wi-Fi interfaces configuration.
      tags:
        - device
        - wifi
      responses:
        '200':
          description: All Wi-Fi interfaces configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllWifiInformation'
              examples:
                APMode:
                  $ref: '#/components/examples/GetAPMode'
                ClientMode:
                  $ref: '#/components/examples/GetClientMode'
    patch:
      description: Update Wi-Fi interface configuration.
      tags:
        - device
        - wifi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllWifiInformationForPatch'
            examples:
              APMode:
                $ref: '#/components/examples/PatchAPMode'
              ClientMode:
                $ref: '#/components/examples/PatchClientMode'
      responses:
        '200':
          description: All Wi-Fi interfaces configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllWifiInformation'
              examples:
                APMode:
                  $ref: '#/components/examples/PatchResultAPMode'
                ClientMode:
                  $ref: '#/components/examples/PatchResultClientMode'
  /device/wifi/{id}:
    parameters:
      - name: id
        in: path
        description: Interface id.
        schema:
          type: integer
        required: true
    get:
      description: Get Wi-Fi interface configuration.
      tags:
        - device
        - wifi
      responses:
        '200':
          description: Wi-Fi interface configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WifiInformation'
              examples:
                APMode:
                  $ref: '#/components/examples/GetAPModeByID'
                ClientMode:
                  $ref: '#/components/examples/GetClientModeByID'
    patch:
      description: Update Wi-Fi interface configuration.
      tags:
        - device
        - wifi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WifiInformation'
            examples:
              APMode:
                $ref: '#/components/examples/PatchAPModeByID'
              ClientMode:
                $ref: '#/components/examples/PatchClientModeByID'
      responses:
        '200':
          description: Wi-Fi interface configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WifiInformation'
              examples:
                APMode:
                  $ref: '#/components/examples/PatchResultAPModeByID'
                ClientMode:
                  $ref: '#/components/examples/PatchResultClientModeByID'
  /device/wifi/{id}/client/networks:
    parameters:
      - name: id
        in: path
        description: Interface id.
        schema:
          type: integer
        required: true
    get:
      description: Get Wi-Fi client networks list
      tags:
        - device
        - wifi
      responses:
        '200':
          description: Get Wi-Fi client networks list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllWifiClientNetworksItem'
              example:
                data:
                  - uuid: bzLJpU7MR
                    ssid: moxa-test-ap-1
                    bssid: 10:c3:7b:c6:47:f8
                    security:
                      mode: wpa2-personal
                      encryption: aes
                      password: '!2345678'
                    signal: -17
                    band: band50
    post:
      description: Post a new Wi-Fi client network to list
      tags:
        - device
        - wifi
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewWifiClientNetworksItem'
            example:
              ssid: moxa-ap-2
              password: '!2345678'
      responses:
        '200':
          description: Post a new Wi-Fi client network to list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllWifiClientNetworksItem'
              example:
                data:
                  - uuid: bzLJpU7MR
                    ssid: moxa-test-ap-1
                    bssid: 10:c3:7b:c6:47:f8
                    security:
                      mode: wpa2-personal
                      encryption: aes
                      password: '!2345678'
                    signal: -17
                    band: band50
                  - uuid: kcpJpUnMR
                    ssid: moxa-ap-2
                    bssid: ''
                    security:
                      mode: wpa2-personal
                      encryption: aes
                      password: '!2345678'
                    signal: null
                    band: band24
  /device/wifi/{id}/client/networks/{uuid}:
    parameters:
      - name: id
        in: path
        description: Interface id.
        schema:
          type: integer
        required: true
      - name: uuid
        in: path
        description: uuid of Wifi client network
        schema:
          type: string
        required: true
    patch:
      description: Update Wi-Fi client network password
      tags:
        - device
        - wifi
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewWifiClientNetworksItem'
            example:
              password: '*7654321'
      responses:
        '200':
          description: Update Wi-Fi client network password
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WifiClientNetworksItem'
              example:
                data:
                  uuid: kcpJpUnMR
                  ssid: moxa-test-ap-1
                  bssid: 10:c3:7b:c6:47:f8
                  security:
                    mode: wpa2-personal
                    encryption: aes
                    password: '*7654321'
                  signal: -17
                  band: band50
    delete:
      description: Delete Wi-Fi client network
      tags:
        - device
        - wifi
      responses:
        '204':
          description: success
        '400':
          description: fail to delete
        '404':
          description: Wifi client network not found
  /device/wifi/{id}/client/scan:
    parameters:
      - name: id
        in: path
        description: Interface id.
        schema:
          type: integer
        required: true
      - name: event
        in: query
        description: >-
          Get runtime scan, ex: {[{ssid: moxa-test-ap-1, security:{mode:
          wpa2-personal, encryption: aes, support: true}, signal: -17, band:
          band50},{...}]}
        schema:
          type: boolean
    get:
      description: Get Wi-Fi client networks scan results
      tags:
        - device
        - wifi
      responses:
        '200':
          description: Get Wi-Fi client networks results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanList'
              example:
                data:
                  - ssid: moxa-test-ap-1
                    security:
                      mode: wpa2-personal
                      encryption: aes
                      support: true
                    signal: -17
                    band: band50
                  - ssid: D-k
                    security:
                      mode: none
                      encryption: none
                      support: true
                    signal: -43
                    band: band24
                  - ssid: TP-k
                    security:
                      mode: wpa2-enterprise
                      encryption: aes
                      support: false
                    signal: -58
                    band: band50
                  - ssid: ASOS
                    security:
                      mode: wpa-personal
                      encryption: aes
                      support: false
                    signal: -69
                    band: band24
                  - ssid: Wow
                    security:
                      mode: wpa2-personal
                      encryption: tkip
                      support: true
                    signal: -72
                    band: band24
                  - ssid: Mom
                    security:
                      mode: wpa-personal
                      encryption: tkip
                      support: false
                    signal: -75
                    band: band24
        '405':
          description: Wi-Fi interface mode isn't in client mode
  /device/dhcpservers:
    get:
      description: |
        Get all DHCP Server configuration
      tags:
        - device
        - dhcpservers
      responses:
        '200':
          description: DHCP Servers configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDhcpServerItems'
              examples:
                All DHCP Servers Configuration:
                  $ref: '#/components/examples/DhcpServerMultipleItemsRsp'
    patch:
      description: |
        Patch DHCP Server configuration
      tags:
        - device
        - dhcpservers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/DhcpServerItem'
            examples:
              Single DHCP Server Configuration with Full Setting:
                $ref: '#/components/examples/DhcpServerSingleItemReq'
              Multiple DHCP Servers Configuration with Full Setting:
                $ref: '#/components/examples/DhcpServerMultipleItemsReq'
              Single DHCP Server Configuration with Partial Setting:
                $ref: '#/components/examples/DhcpServerSinglePartialItemReq'
              Multiple DHCP Servers Configuration with Partial Setting:
                $ref: '#/components/examples/DhcpServerMultiplePartialItemsReq'
      responses:
        '200':
          description: DHCP Servers configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDhcpServerItems'
              examples:
                Single DHCP Server Configuration with Full Setting:
                  $ref: '#/components/examples/DhcpServerSingleItemRsp'
                Multiple DHCP Servers Configuration with Full Setting:
                  $ref: '#/components/examples/DhcpServerMultipleItemsRsp'
                Single DHCP Server Configuration with Partial Setting:
                  $ref: '#/components/examples/DhcpServerSingleItemRsp'
                Multiple DHCP Servers Configuration with Partial Setting:
                  $ref: '#/components/examples/DhcpServerMultipleItemsRsp'
  /device/dhcpservers/{id}:
    parameters:
      - name: id
        in: path
        description: DHCP Server ID
        required: true
        schema:
          type: integer
    get:
      description: |
        Get DHCP Server configuration
      tags:
        - device
        - dhcpservers
      responses:
        '200':
          description: DHCP Server configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleDhcpServerItem'
              examples:
                DHCP Server Configuration:
                  $ref: '#/components/examples/DhcpServerItemRsp'
    patch:
      description: |
        Patch DHCP Server configuration
      tags:
        - device
        - dhcpservers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DhcpServerItem'
            examples:
              DHCP Server Configuration with Full Setting:
                $ref: '#/components/examples/DhcpServerItemReq'
              DHCP Server Configuration with Partial Setting:
                $ref: '#/components/examples/DhcpServerPartialItemReq'
      responses:
        '200':
          description: DHCP Server configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleDhcpServerItem'
              examples:
                DHCP Server Configuration with Full Setting:
                  $ref: '#/components/examples/DhcpServerItemRsp'
                DHCP Server Configuration with Partial Setting:
                  $ref: '#/components/examples/DhcpServerItemRsp'
  /device/firewall/inbounds:
    get:
      description: Get device firewall inbound status overview.
      tags:
        - device
        - firewall
        - inbounds
      responses:
        '200':
          description: firewall inbound configuration.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Inbound'
              examples:
                Enable SSH:
                  value:
                    data:
                      - id: 1
                        name: Port_SSH
                        description: ssh port
                        priority: 1000
                        gatewayPort: '22'
                        protocol: tcp
                        sourceIp: ''
                        sourcePort: ''
                        destinationIp: ''
                        action: allow
                    count: 1
                Enable SSH and Ping:
                  value:
                    data:
                      - id: 1
                        name: Port_SSH
                        description: ssh port
                        priority: 1000
                        gatewayPort: '22'
                        protocol: tcp
                        sourceIp: ''
                        sourcePort: ''
                        destinationIp: ''
                        action: allow
                      - id: 2
                        name: Port_ICMP
                        description: icmp port for ping
                        priority: 1001
                        gatewayPort: ''
                        protocol: icmp
                        sourceIp: ''
                        sourcePort: ''
                        destinationIp: ''
                        action: allow
                    count: 2
                Enable SSH, and Port Forward:
                  value:
                    data:
                      - id: 1
                        name: Port_SSH
                        description: ssh port
                        priority: 1000
                        gatewayPort: '22'
                        protocol: tcp
                        sourceIp: ''
                        sourcePort: ''
                        destinationIp: ''
                        action: allow
                      - id: 2
                        name: Port_8080
                        description: 8080 port for forward
                        priority: 500
                        gatewayPort: '8080'
                        protocol: any
                        sourceIp: ''
                        sourcePort: ''
                        destinationIp: 192.168.4.123
                        destinationPort: '8080'
                        action: forward
                    count: 2
    post:
      description: Add a device firewall inbound configuration
      tags:
        - device
        - firewall
        - inbounds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Inbound'
            examples:
              Enable SSH:
                value:
                  - name: Port_ssh
                    description: Ssh port
                    priority: 1001
                    gatewayPort: '22'
                    protocol: tcp
                    action: allow
              Enable 8881 port forward:
                value:
                  - name: Port_8881
                    description: 8881 port forward
                    priority: 501
                    gatewayPort: '8881'
                    destinationIp: 192.168.4.123
                    destinationPort: '8881'
                    protocol: tcp
                    action: forward
      responses:
        '200':
          description: Add inbound configuration result with rule id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inbound'
              examples:
                Enable SSH:
                  value:
                    data:
                      id: 83
                      name: Port_SSH
                      description: ssh port
                      priority: 1001
                      gatewayPort: '22'
                      protocol: tcp
                      sourceIp: ''
                      sourcePort: ''
                      destinationIp: ''
                      action: allow
                Enable 8881 port forward:
                  value:
                    data:
                      id: 84
                      name: Port_8881
                      description: 8881 port forward
                      priority: 501
                      gatewayPort: '8881'
                      destinationIp: 192.168.4.123
                      destinationPort: '8881'
                      protocol: tcp
                      action: forward
    put:
      description: Update a device firewall inbound configuration
      tags:
        - device
        - firewall
        - inbounds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Inbound'
            examples:
              Update HTTPS:
                value:
                  - id: 15
                    name: Port_https
                    description: https port
                    priority: 1002
                    gatewayPort: '8443'
                    protocol: tcp
                    action: allow
      responses:
        '200':
          description: Update inbound configuration result
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Inbound'
              examples:
                Enable SSH:
                  value:
                    data:
                      - id: 15
                        name: Port_HTTPS
                        description: https port
                        priority: 1002
                        gatewayPort: '8443'
                        protocol: tcp
                        sourceIp: ''
                        sourcePort: ''
                        destinationIp: ''
                        action: allow
    patch:
      description: Patch device firewall inbound configuration
      tags:
        - device
        - firewall
        - inbounds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Inbound'
            examples:
              Partial Edit SSH Port:
                value:
                  - id: 83
                    gatewayPort: '8022'
      responses:
        '200':
          description: Patch result
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Inbound'
              examples:
                Partial Edit SSH Port:
                  value:
                    data:
                      - id: 83
                        name: Port_SSH
                        description: ssh port
                        priority: 1001
                        gatewayPort: '8022'
                        protocol: tcp
                        sourceIp: ''
                        sourcePort: ''
                        destinationIp: ''
                        action: allow
    delete:
      description: Delete device firewall inbound configuration
      tags:
        - device
        - firewall
        - inbounds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: integer
            examples:
              Delete ID 83,84:
                value:
                  - 83
                  - 84
      responses:
        '200':
          description: Delete succeed
          content:
            application/json:
              schema:
                type: array
                items:
                  type: integer
              examples:
                Delete ID 10:
                  value:
                    data:
                      - 83
                      - 84
  /tags/monitor/system/status:
    get:
      description: Get data of system status tags.
      tags:
        - device
        - systemtags
      parameters:
        - in: query
          name: streamInterval
          description: stream interval with msec
          required: true
          schema:
            type: integer
          example: 1000
        - in: query
          name: tags
          description: >
            tag name(s).

            for cellular signal, it could be `cellular1Signal` for cellular
            module 1,

            `cellular2Signal` for cellular module 2.
          required: true
          schema:
            type: array
            items:
              type: string
              enum:
                - cpuUser
                - cpuSystem
                - cpuIdle
                - cpuNice
                - cpuIowait
                - cpuIrq
                - cpuSoftirq
                - cpuSteal
                - cpuUsage
                - memoryTotal
                - memoryUsed
                - memoryFree
                - memoryShared
                - memoryBuffers
                - memoryCached
                - memoryUsage
                - gpsSignal
                - cellular1Signal
          explode: false
          examples:
            multipleTags:
              summary: example of multiple tags
              value:
                - cpuUsage
                - memoryTotal
                - memoryUsage
      responses:
        '200':
          description: The request has succeeded.
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/TagList'
              examples:
                multipleTags:
                  summary: example of multiple tags
                  value:
                    - prvdName: system
                      srcName: status
                      tagName: cpuUsage
                      ts: 1590135215774
                      dataType: int64
                      dataValue: 44
                    - prvdName: system
                      srcName: status
                      tagName: memoryTotal
                      ts: 1590135211806
                      dataType: uint64
                      dataValue: 2116034560
                    - prvdName: system
                      srcName: status
                      tagName: memoryUsage
                      ts: 1590135214896
                      dataType: uint64
                      dataValue: 26
  /tags/monitor/system/storage:
    get:
      description: Get data of system storage tags.
      tags:
        - device
        - systemtags
      parameters:
        - in: query
          name: streamInterval
          description: stream interval with msec
          required: true
          schema:
            type: integer
          example: 1000
        - in: query
          name: tags
          description: >
            tag name(s).

            for SD card inserted and enabled, `sd1-1DiskUsed`, `sd1-1DiskFree`,
            `sd1-1DiskPercent` will be available.
          required: true
          schema:
            type: array
            items:
              type: string
              enum:
                - systemDiskUsed
                - systemDiskFree
                - systemDiskPercent
                - sd1-1DiskUsed
                - sd1-1DiskFree
                - sd1-1DiskPercent
          explode: false
          examples:
            multipleTags:
              summary: example of multiple tags
              value:
                - systemDiskPercent
                - sd1-1DiskPercent
      responses:
        '200':
          description: The request has succeeded.
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/TagList'
              examples:
                multipleTags:
                  summary: example of multiple tags
                  value:
                    - prvdName: system
                      srcName: storage
                      tagName: systemDiskPercent
                      ts: 1590135558356
                      dataType: double
                      dataValue: 26.705404330196146
                    - prvdName: system
                      srcName: storage
                      tagName: sd1-1DiskPercent
                      ts: 1590135558363
                      dataType: double
                      dataValue: 10.081168276727597
  /tags/monitor/system/network:
    get:
      description: Get data of system network usage tags.
      tags:
        - device
        - systemtags
      parameters:
        - in: query
          name: streamInterval
          description: stream interval with msec
          required: true
          schema:
            type: integer
          example: 1000
        - in: query
          name: tags
          description: >
            tag name(s).

            for WAN interface use `networkUsage`, `networkTx`, `networkRx`.

            for cellular module inserted and enabled, `cellular1NetworkUsage`,
            `cellular1NetworkTx`, `cellular1NetworkRx` will be available.
          required: true
          schema:
            type: array
            items:
              type: string
              enum:
                - networkUsage
                - networkTx
                - networkRx
                - cellular1NetworkUsage
                - cellular1NetworkTx
                - cellular1NetworkRx
                - lan1NetworkUsage
                - lan1NetworkTx
                - lan1NetworkRx
          explode: false
          examples:
            multipleTags:
              summary: example of multiple tags
              value:
                - networkUsage
                - networkTx
                - networkRx
      responses:
        '200':
          description: The request has succeeded.
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/TagList'
              examples:
                multipleTags:
                  summary: example of multiple tags
                  value:
                    - prvdName: system
                      srcName: network
                      tagName: networkUsage
                      ts: 1590135784561
                      dataType: uint64
                      dataValue: 64842809
                    - prvdName: system
                      srcName: network
                      tagName: networkTx
                      ts: 1590135784567
                      dataType: uint64
                      dataValue: 4107946
                    - prvdName: system
                      srcName: network
                      tagName: networkRx
                      ts: 1590135784573
                      dataType: uint64
                      dataValue: 60734927
  /device/platform/device-tags:
    get:
      summary: Get tag list of device app
      tags:
        - device
        - platform
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/platformTags'
              example:
                data:
                  - prvdName: system
                    srcName: storage
                    tagName: systemDiskFree
                    dataType: uint64
                    access: r
                    dataUnit: ''
                  - prvdName: system
                    srcName: storage
                    tagName: systemDiskPercent
                    dataType: double
                    access: r
                    dataUnit: ''
        '400':
          $ref: '#/components/responses/UnexpectedError'
