openapi: 3.0.1
info:
  description: These REST APIs provide several remote control and management operations
    on the H200 Enable Enterprise Media Player.
  title: Enable Enterprise Local Management Server
  version: 3.7.0
servers:
- url: "http://{host}:8090/api/v2"
  variables:
    host:
      default: api.aminocom.com
- url: "https://{host}:10444/api/v2"
  variables:
    host:
      default: api.aminocom.com
tags:
- description: List current available APIs in YAML format
  name: API
- description: Control the screen of device currently connected via serial port interface.
    Only `LG TV` is supported at the moment. Details can be found at `https://www.lg.com/ca_en/support/product-support/troubleshoot/help-library/cs-CT52001643-20153058982994/`
  name: Screen control
- description: Manage user applications
  name: System - Application Management
- description: Query and control audio status from system
  name: System - Audio Settings
- description: Query status of device lock. Locking or unlocking the device
  name: System - Device Lock control
- description: Retrieve diagnostic information of the STB
  name: System - Diagnostic API
- description: Fetch all network info on STB
  name: System - Network API
- description: Manage power control state
  name: System - Power State
- description: Capture and download screenshot from the system. Only unencrypted video
    can be screenshotted.
  name: System - Screenshot
- description: Return storage information
  name: System - Storage Info API
- description: System information query and system control
  name: System - General Operation
paths:
  /commandScheduler/schedule:
    post:
      description: "Schedule command(s) for one-shot or recurring execution.Omit the\
        \ `recurrence` block for a single run; set `recurrence.intervalMinutes` >=\
        \ 1 (with optional iterations) for repeats.`iterations` of 0 or null means\
        \ infinite; a positive value is the total runs including the first.`execTs`\
        \ defaults to now + 10s, scheduling with an `execTs` in the past returns 400."
      operationId: schedule
      requestBody:
        content:
          application/json:
            examples:
              one-shot:
                description: one-shot
                value:
                  apiBaseUrl: http://localhost:8090/api/v2
                  execTs: 1758085812
                  inSeq: false
                  commands:
                  - method: GET
                    url: /device/serialNumber
                    timeout: 10
              recurring:
                description: recurring
                value:
                  apiBaseUrl: http://localhost:8090/api/v2
                  execTs: 1758085812
                  inSeq: false
                  commands:
                  - method: POST
                    url: /system/reboot
                    timeout: 30
                  recurrence:
                    intervalMinutes: 10
                    iterations: 4
            schema:
              $ref: '#/components/schemas/CommandScheduler'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandSchedulerId'
          description: OK
        "400":
          description: Bad request
      summary: Schedule command(s) to be executed on the device
      tags:
      - Command Scheduler
  /commandScheduler/schedule/{id}:
    delete:
      description: "Cancel the scheduled command(s) on the device. When the underlying\
        \ scheduler confirms the cancellation, the stored recurrence metadata is updated\
        \ so that `nextRunTs` is cleared (no further runs) while `remainingRuns` keeps\
        \ reflecting the number of executions still outstanding (or `-1` for infinite\
        \ recurrences). "
      operationId: cancel
      parameters:
      - description: "Cancel the scheduled command(s) if it is not executed. If the\
          \ schedule id does not exist, an error will be returned."
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "400":
          description: Bad request
        "404":
          description: Invalid input
      summary: Cancel scheduled command(s)
      tags:
      - Command Scheduler
    get:
      description: "Return the current snapshot of a scheduled run, including per-command\
        \ status/payload, the execTs (execution time), and recurrence progress metadata.Recurrence\
        \ responses surface remainingRuns/nextRunTs/lastRunTs and reuse statusPayload\
        \ transitions such as `pending`, `success_waiting_next`, or `fail_waiting_next`\
        \ while future executions are queued;once runs complete the final `success`/`fail`\
        \ state is retained."
      operationId: getCommandStatus
      parameters:
      - description: Schedule id
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandScheduler'
          description: OK
        "400":
          description: Bad request
        "404":
          description: Invalid input
      summary: Get status of the scheduled command(s).
      tags:
      - Command Scheduler
  /commandScheduler/schedules:
    get:
      description: get the list of schedule id
      operationId: getScheduleList
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CommandSchedulerId'
          description: OK
      summary: Get the list of scheduled command(s).
      tags:
      - Command Scheduler
  /debug/bugreports:
    get:
      description: "Returns an array of bug reports, including the date created, filename,\
        \ size and status. Returns an empty array if no bug reports exist."
      operationId: getReportList
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BugReport'
          description: OK
      summary: Get list of bug reports
      tags:
      - Debug Utilities
  /debug/bugreports/generate:
    post:
      description: Start generating a new bug report
      operationId: generate
      responses:
        "200":
          description: OK
      summary: Initiate bugreport generation
      tags:
      - Debug Utilities
  /debug/bugreports/{name}:
    get:
      description: Returns the bug report with the specified filename as a ZIP file.
        Returns a 404 error if the bug report does not exist.
      operationId: getReportZip
      parameters:
      - in: path
        name: name
        required: true
        schema:
          type: string
          description: The filename of the bug report to download.
          example: bugreport-H200-QTT8.201201.002-2023-06-13-09-51-59.zip
      responses:
        "200":
          description: OK
        "400":
          description: Bug report is still generating
        "404":
          description: Bug report not found
      summary: Download generated bug report
      tags:
      - Debug Utilities
  /debug/logcat:
    get:
      description: Retrieves the complete current logcat circular buffer.
      operationId: logcat
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
                example: "03-29 03:10:15.145  3559  3559 I vold    : Vold 3.0 (the\
                  \ awakening) firing up"
          description: OK
      summary: Get logcat buffer.
      tags:
      - Debug Utilities
  /debug/tcpdump/start:
    post:
      description: "Starts a `tcpdump` process with the provided parameters (e.g.,\
        \ interface, packet count, verbosity). The capture file is saved to external\
        \ storage. **Note:** Do not use the `-w` argument, as the output file path\
        \ is not configurable and is set by the system. This is an advanced debugging\
        \ tool. Use only if you are familiar with `tcpdump` and network capture. Improper\
        \ use may impact system performance. Please ensure only one SD card or USB\
        \ drive is inserted to avoid write conflicts. Supported external storage formats\
        \ are **exFAT** and **FAT32**. **Syntax Tip:** When using `curl`, ensure quoting\
        \ the parameters after `-d` (e.g., `curl <H200_IP_address>:8090/api/v2/debug/tcpdump/start\
        \ -d '-i eth0 -c 100'`)."
      operationId: startTcpdump
      requestBody:
        content:
          text/plain:
            schema:
              type: string
              example: ' -i eth0 -c 100'
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
                example: capturing
          description: OK - Tcpdump started successfully.
        "400":
          description: "Bad Request - Invalid or missing parameters, or `-w` argument\
            \ was provided, or more than one SD card or USB drive is inserted."
      summary: Initiate network capture
      tags:
      - Debug Utilities
  /debug/tcpdump/status:
    get:
      description: "Retrieves the current status of the `tcpdump` process, including\
        \ whether it’s capturing, completed, or aborted, and the output file path\
        \ if available."
      operationId: getTcpdumpStatus
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
                example: "completed\n/mnt/media_rw/D39B-EFD4/2025-03-03_03-54-59.pcap\n\
                  tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture\
                  \ size 262144 bytes\n1000 packets captured\n1074 packets received\
                  \ by filter\n0 packets dropped by kernel\n\n"
          description: "OK - Returns the status (e.g., `not_started`, `capturing`,\
            \ `completed`, or `aborted`) and optionally the path to the generated\
            \ `.pcap` file."
      summary: Get tcpdump status
      tags:
      - Debug Utilities
  /debug/tcpdump/stop:
    post:
      description: Stops the currently running `tcpdump` process and finalizes the
        capture file.
      operationId: stopTcpdump
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
                example: "tcpdump: listening on eth0, link-type EN10MB (Ethernet),\
                  \ capture size 262144 bytes\n1000 packets captured\n1074 packets\
                  \ received by filter\n0 packets dropped by kernel\n"
          description: OK - Tcpdump stopped successfully.
        "400":
          description: Bad Request - No active `tcpdump` process to stop.
      summary: Stop network capture
      tags:
      - Debug Utilities
  /device/hardwareModel:
    get:
      description: Retrieves hardware model in number.
      operationId: getHardwareModel
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HardwareModelResponse'
          description: OK
      summary: Get hardware model of STB.
      tags:
      - Device Information
  /device/hdmi:
    get:
      description: "Returns HDMI Information, refer to schema of returned data below"
      operationId: getHdmiInfo
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HdmiInfo'
          description: Returns HDMI Information
      summary: Get HDMI Information
      tags:
      - Device Information
  /device/hdmiCec/standbyMode:
    get:
      description: "The standby mode to retrieve. Valid values are `off`, `tv2stb`,\
        \ `stb2tv`, or `both`"
      operationId: getStandbyMode
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HdmiStandbyMode'
          description: OK
      summary: Get the HDMI CEC standby mode of the device
      tags:
      - Device HDMI CEC control
    put:
      description: "This API endpoint allows you to set the `HDMI CEC` standby mode\
        \ of the device. Setting the standby mode to `both` , `tv2stb` or `stb2tv`\
        \ will enable `HDMI CEC`."
      operationId: setStandbyMode
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HdmiStandbyMode'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Set the HDMI CEC standby mode of the device
      tags:
      - Device HDMI CEC control
  /device/hdmiCec/tv:
    get:
      description: "The device is an array of name for all connected devices. Empty\
        \ String for no device connected or that device does not support `HDMI CEC`.\
        \ `active_port` will be 0 if failed to get active source of TV, e.g. TV not\
        \ support `CEC` or not connect with `HDMI`. `active_port` may not reporting\
        \ correctly until TV switching input when multiple devices connected.400 Bad\
        \ request will be returned if `STB` does not enable `HDMI CEC`."
      operationId: getConnectedDevices
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TVStatus'
          description: OK
        "400":
          description: "Bad Request, `HDMI CEC` is not enabled"
      summary: Get TV status via HDMI CEC
      tags:
      - Device HDMI CEC control
    put:
      description: "Update the power mode of the TV. Set the value to `true` to turn\
        \ on the TV or `false` to turn it off. Set power mode of TV to `true` will\
        \ switch the active input of `HDMI` port to `STB`.Switch the active input\
        \ of `HDMI` port for the TV. Note that this action can only be performed if\
        \ a device is currently connected to the specified `HDMI` port.If `HDMI CEC`\
        \ is not enabled, this action will enable it."
      operationId: setTV
      requestBody:
        content:
          application/json:
            examples:
              Update TV output:
                description: Update TV output
                value:
                  active_port: 4
              Update TV power status:
                description: Update TV power status
                value:
                  power_on: false
              Update both TV output and power status together:
                description: Update both TV output and power status together
                value:
                  active_port: 1
                  power_on: true
            schema:
              anyOf:
              - $ref: '#/components/schemas/HdmiPort'
              - $ref: '#/components/schemas/HdmiPowerMode'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Update power mode and active HDMI port for TV via HDMI CEC
      tags:
      - Device HDMI CEC control
  /device/hdmiCec/tv/cycleInput:
    post:
      operationId: cycleTVInput
      responses:
        "200":
          description: OK
      summary: "Cycle through the available inputs on the TV. If HDMI CEC is not enabled,\
        \ this action will enable it."
      tags:
      - Device HDMI CEC control
  /device/hdmiCec/tv/volumeDown:
    post:
      description: "If `HDMI CEC` is not enabled, this action will enable it."
      operationId: volumeDown
      responses:
        "200":
          description: OK
      summary: Simulate pressing the 'volume down' button on the TV 5 times to reduce
        the volume.
      tags:
      - Device HDMI CEC control
  /device/hdmiCec/tv/volumeUp:
    post:
      description: "If `HDMI CEC` is not enabled, this action will enable it."
      operationId: volumeUp
      responses:
        "200":
          description: OK
      summary: Simulate pressing the 'volume up' button on the TV 5 times to increase
        the volume.
      tags:
      - Device HDMI CEC control
  /device/macAddress:
    get:
      description: Retrieves mac address in the format of `XX:XX:XX:XX:XX:XX`.
      operationId: getMacAddress
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacAddressResponse'
          description: OK
      summary: Get MAC address of STB.
      tags:
      - Device Information
  /device/screen-control/brightness:
    get:
      description: Get the current brightness level of the screen
      operationId: getScreenBrightness
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenBrightnessData'
          description: Current screen brightness level
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Get screen brightness level
      tags:
      - Screen control
    put:
      description: Set the screen brightness level (0-100%)
      operationId: setScreenBrightness
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenBrightnessData'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenBrightnessData'
          description: Brightness updated successfully
        "400":
          description: Bad Request - Brightness value out of range (0-100)
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Set screen brightness level
      tags:
      - Screen control
  /device/screen-control/channel/down:
    post:
      description: "Change to the previous channel, same as pressing the channel down\
        \ button on the remote control"
      operationId: channelDown
      responses:
        "200":
          description: Channel decreased successfully
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Change to previous channel
      tags:
      - Screen control
  /device/screen-control/channel/up:
    post:
      description: "Change to the next channel, same as pressing the channel up button\
        \ on the remote control"
      operationId: channelUp
      responses:
        "200":
          description: Channel increased successfully
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Change to next channel
      tags:
      - Screen control
  /device/screen-control/config:
    get:
      description: "Retrieve the current configuration of the screen, including details\
        \ such as the brand, baud rate, and whether it is operating in binary mode."
      operationId: getScreenConfig
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenConfigData'
          description: Current `RS232` configuration
      summary: Get screen configuration
      tags:
      - Screen control
    put:
      description: "Configure the `RS232` settings, including parameters such as the\
        \ brand, baud rate, and whether binary mode is enabled. System will try to\
        \ detect the screen brand and apply the appropriate settings. This is useful\
        \ for overriding default settings or when the screen is not recognized automatically."
      operationId: setScreenConfig
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenConfigData'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenConfigData'
          description: '`RS232` configuration updated successfully'
        "400":
          description: Bad Request - Invalid configuration data
        "500":
          description: Internal Server Error. Please reboot and retry.
      summary: Set RS232 configuration
      tags:
      - Screen control
  /device/screen-control/input:
    get:
      description: Get the current input source of the screen
      operationId: getScreenInputSource
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenInputData'
          description: Current screen input source
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Get current screen input source
      tags:
      - Screen control
    put:
      description: "Set the screen input source, e.g., `HDMI1`, `HDMI2`, etc."
      operationId: setScreenInputSource
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenInputData'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenInputData'
          description: Input source changed successfully
        "400":
          description: Bad Request - Invalid input source
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports `RS232` commands.
      summary: Set screen input source
      tags:
      - Screen control
  /device/screen-control/input/raw:
    put:
      description: "Send a raw hex value to select input of the screen (supports Ex-link\
        \ or `LG` hex identifiers), for example, `90` for `HDMI1`, `91` for `HDMI2`,\
        \ etc."
      operationId: setScreenInputSourceByRaw
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenRawRequest'
      responses:
        "200":
          description: Raw input command sent successfully
        "400":
          description: "Bad Request - Invalid format. Expected format: `XX` (hex)"
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Select screen input by given raw hex value
      tags:
      - Screen control
  /device/screen-control/key:
    post:
      description: "Send a remote control key to screen by the given hex code. The\
        \ hex code should be in the format `XX` (e.g., `43` for Menu or Settings,\
        \ `28` for Return(Back), etc.)."
      operationId: sendScreenKeyCommand
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenRawRequest'
      responses:
        "200":
          description: Key command sent successfully
        "400":
          description: "Bad Request. Invalid format. Expected format: `XX` (hex)"
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Send a remote control key to screen
      tags:
      - Screen control
  /device/screen-control/power:
    get:
      description: Get the current power status of the screen
      operationId: getScreenPowerStatus
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenPowerData'
          description: Current screen power status
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Get screen power status
      tags:
      - Screen control
    put:
      description: Set the screen power status (on or off). Some TVs may need longer
        time to respond commands when the screen is powered off
      operationId: setScreenPower
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenPowerData'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenPowerData'
          description: Updated screen power status
        "400":
          description: Bad Request. Expected JSON body with 'power' field set to true
            or false
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Set screen power status
      tags:
      - Screen control
  /device/screen-control/volume:
    get:
      description: Get the current volume level of the screen
      operationId: getScreenVolume
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenVolumeData'
          description: Current screen volume level
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Get screen volume level
      tags:
      - Screen control
    put:
      description: Set the screen volume level (0-100%)
      operationId: setScreenVolume
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenVolumeData'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenVolumeData'
          description: Updated screen volume level
        "400":
          description: Bad Request - Volume value out of range (0-100)
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Set screen volume level
      tags:
      - Screen control
  /device/screen-control/volume/down:
    post:
      description: "Decrease screen volume, same as pressing the volume down button\
        \ on the remote control"
      operationId: decreaseScreenVolume
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenVolumeData'
          description: Volume decreased successfully
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Decrease screen volume
      tags:
      - Screen control
  /device/screen-control/volume/mute:
    get:
      description: Get the current mute status of the screen
      operationId: getScreenMuteStatus
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenMuteData'
          description: Current screen mute status
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports `RS232` commands.
      summary: Get screen mute status
      tags:
      - Screen control
    put:
      description: Set the screen mute status
      operationId: setScreenMute
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenMuteData'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenMuteData'
          description: Updated screen mute status
        "400":
          description: Bad Request. Expected JSON body with 'mute' field set to true
            or false
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Set screen mute status
      tags:
      - Screen control
  /device/screen-control/volume/up:
    post:
      description: "Increase screen volume, same as pressing the volume up button\
        \ on the remote control"
      operationId: increaseScreenVolume
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenVolumeData'
          description: Volume increased successfully
        "500":
          description: Internal Server Error or timeout. Please verify the connection
            and ensure that the screen supports RS232 commands.
      summary: Increase screen volume
      tags:
      - Screen control
  /device/serialNumber:
    get:
      description: "Retrieves serial number in the format of `{product number}-{device\
        \ serial}`."
      operationId: getSerialNumber
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SerialNumberResponse'
          description: OK
      summary: Get serial number of STB.
      tags:
      - Device Information
  /discovery/devices:
    get:
      description: "Returns list of discovered devices, optionally filtered by timestamp"
      operationId: getDevices
      parameters:
      - description: "Optional `UNIX` timestamp (milliseconds). Only return devices\
          \ whose `lastSeen` value is after this time. Defaults to 0, which returns\
          \ all devices."
        example: 1625097600000
        in: query
        name: since
        schema:
          type: integer
          format: int64
          default: 0
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceListResponse'
          description: Devices retrieved successfully
        "400":
          description: Invalid 'since' parameter
        "500":
          description: Internal server error
      summary: Get discovered devices
      tags:
      - Device Discovery and Management
  /discovery/start:
    post:
      description: "Starts the device discovery service, allowing other devices on\
        \ the network to register themselves. To be discoverable, those devices must\
        \ have `eelm.discovery.enable=true` set in their configuration."
      operationId: startDiscovery
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryStatusResponse'
          description: Discovery started successfully or already running
        "500":
          description: Internal server error
      summary: Start device discovery
      tags:
      - Device Discovery and Management
  /discovery/status:
    get:
      description: "Returns current discovery service status including enabled state,\
        \ start time, and device count"
      operationId: getStatus
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryStatusResponse'
          description: Status retrieved successfully
        "500":
          description: Internal server error
      summary: Get discovery status
      tags:
      - Device Discovery and Management
  /discovery/stop:
    post:
      description: "Stops the device discovery service and switches to resolver mode,\
        \ where it can be discovered by other nodes."
      operationId: stopDiscovery
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryStatusResponse'
          description: Discovery stopped successfully
        "500":
          description: Internal server error
      summary: Stop device discovery
      tags:
      - Device Discovery and Management
  /firmware/upgrade:
    post:
      description: Upgrade the device from the specified `URI`.
      operationId: upgrade
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradeRequest'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Initiate upgrade from URI.
      tags:
      - Firmware Management
  /input/irControl:
    get:
      description: Retrieves status that enable or not
      operationId: getIrControlStatus
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IrControlResponse'
          description: OK
      summary: Get current IR control status
      tags:
      - Input
    put:
      description: Enable or disable IR control
      operationId: putIrControlStatus
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IrControlRequest'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Set current IR control status
      tags:
      - Input
  /input/key:
    post:
      description: Inject keycode(s) into Android Input Subsystem. Will be forward
        to either global or local handler depending on the keycode and any key remap.
        See `https://developer.android.com/reference/android/view/KeyEvent`
      operationId: sendKey
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Key'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Inject keycode(s).
      tags:
      - Input
  /openapi.yaml:
    get:
      operationId: getOpenAPIFile
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
                example: string
          description: OK
      summary: Get API document in yaml format.
      tags:
      - API
  /system:
    get:
      description: Returns system uptime in milliseconds
      operationId: getSystemInfoResponse
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemInfo'
          description: Return system uptime in milliseconds
      summary: Query system uptime
      tags:
      - System - General Operation
  /system/application:
    get:
      description: Retrieves array of information of `Android` applications installed.
      operationId: getApplicationList
      parameters:
      - description: "Possible value: running, stopped, and paused"
        example: running
        in: query
        name: state
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Application'
          description: OK
        "400":
          description: Bad Request
      summary: Get list of Android applications installed.
      tags:
      - System - Application Management
  /system/application/install:
    post:
      description: "Install / Re-Install / Downgrade `APK` on the device.Downgrading\
        \ Android apps without clearing data can lead to failures. Always proceed\
        \ with `caution`, ensure compatibility, and uninstall/reinstall if issues\
        \ occur."
      operationId: installPackageByUpload
      parameters:
      - description: "Possible value: reinstall, downgrade\n- reinstall, install the\
          \ package without clear package data\n- downgrade, downgrade the package\
          \ and clear package data.\n- downgrade_keep_data, downgrade the package\
          \ without clear package data\n- (empty), install the package if package\
          \ is not installed, or the installed version is higher"
        example: reinstall
        in: query
        name: option
        schema:
          type: string
      requestBody:
        content:
          application/vnd.android.package-archive:
            schema:
              type: string
              format: binary
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Install / Re-Install / Downgrade APK on the device.
      tags:
      - System - Application Management
  /system/application/install-via-url:
    post:
      description: "Install / Re-Install / Downgrade `APK` on the device.Downgrading\
        \ Android apps without clearing data can lead to failures. Always proceed\
        \ with `caution`, ensure compatibility, and uninstall/reinstall if issues\
        \ occur."
      operationId: installPackageByUrl
      parameters:
      - description: "Possible value: reinstall, downgrade\n- reinstall, install the\
          \ package without clear package data\n- downgrade, downgrade the package\
          \ and clear package data\n- downgrade_keep_data, downgrade the package without\
          \ clear package data\n- (empty), install the package if package is not installed,\
          \ or the installed version is higher"
        example: downgrade
        in: query
        name: option
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemApplicationInstallRequestBody'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Install / Re-Install / Downgrade APK on the device.
      tags:
      - System - Application Management
  /system/application/{app}:
    get:
      description: Retrieves information of the installed `Android` package.
      operationId: getApplication
      parameters:
      - description: package name
        in: path
        name: app
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Application'
          description: OK
        "404":
          description: Not Found
      summary: Get the information of a installed Android package.
      tags:
      - System - Application Management
  /system/application/{app}/clear:
    post:
      description: Clear all data of the installed `Android` package.
      operationId: clearPackageDataByName
      parameters:
      - description: package name
        in: path
        name: app
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
      summary: Clear the data of a installed Android package.
      tags:
      - System - Application Management
  /system/application/{app}/force-stop:
    post:
      description: Forcing the installed `Android` package to stop.
      operationId: forceStopPackageByName
      parameters:
      - description: package name
        in: path
        name: app
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
      summary: Forcing of a installed running Android package to stop
      tags:
      - System - Application Management
  /system/application/{app}/uninstall:
    post:
      description: Uninstall `Android` package from the device.
      operationId: uninstallPackageByName
      parameters:
      - description: package name
        in: path
        name: app
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Uninstall a installed Android package.
      tags:
      - System - Application Management
  /system/audio/mute:
    get:
      description: Returns current mute status.
      operationId: getMute
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mute'
          description: Return current mute status
      summary: Get mute status
      tags:
      - System - Audio Settings
    put:
      description: "Apply mute status from the request body.\n\nThe field, mute, is\
        \ a boolean.\n\n"
      operationId: applyMute
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Mute'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mute'
          description: Modify mute settings successful and return the current mute
            status
        "400":
          description: 'Bad request due to:<br>1. <b>mute</b> cannot be parsed into
            a boolean value '
      summary: Modify mute setting
      tags:
      - System - Audio Settings
  /system/audio/volume:
    get:
      description: |-
        Returns volume information.

        Note that return value is in percentage.
      operationId: getVolume
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Volume'
          description: Return volume information
      summary: Get volume
      tags:
      - System - Audio Settings
    put:
      description: "Apply volume settings from the request body.\n\nThe field, volume,\
        \ is a integer.\n\nthe valid volume range is between 0 to 100, inclusive.\n\
        \nNote that return value is in percentage.\n\n"
      operationId: applyVolume
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Volume'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Volume'
          description: Modify volume settings successful and return the current volume
            setting
        "400":
          description: Bad request due to:<br>1. <b>volume</b> is out of 0 to 100<br>2.
            <b>volume</b> cannot be parsed into a numeric value
      summary: Modify volume setting
      tags:
      - System - Audio Settings
  /system/deeplink:
    post:
      description: Send a intent for Android system to launch a new activity.
      operationId: sendIntent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LaunchIntent'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Send an Android launch intent.
      tags:
      - System - General Operation
  /system/diagnostic:
    get:
      description: "Currently returns information about general, interface, network,\
        \ Wifi, launcher, zero screen app, and rcu\n\nThe Diagnostic Info has no definitive\
        \ schema, but rather Engage display whatever info passed by the STB\n\nThe\
        \ format is defined as follows:\n\n- Each JSONObject in root level act as\
        \ a new section in the diagnostic panel\n\n  - Each field inside the object\
        \ has its own row\n\n  - The key act as the bold header for the row\n\n  -\
        \ The value can be:\n\n    - A String, representing a single column\n    -\
        \ An Array of String, representing multiple columns\n\n\nA common format for\
        \ a section of individual information (e.g. Network):\n\n{ \"Row Header 1\"\
        : \"Value\", \"Row Header 2\": \"Another Value\" }\n\n\nA common format for\
        \ a section of common objects (e.g. RCU):\n\n{ \"\": [\"Column Header 1\"\
        , \"Column Header 2\"], \"Row Header 1\": [\"Value 1\", \"Value 2\"], \"Row\
        \ Header 2\": [\"Value 1\", \"Value 2\"] }"
      operationId: getDiagnosticInfo
      responses:
        "200":
          description: Returns all diagnostic information
      summary: Get all diagnostic information
      tags:
      - System - Diagnostic API
  /system/lock:
    post:
      description: "Lock the device, and return the current device lock status.<br><br>If\
        \ empty request body is received, the lock message will be retrieved through\
        \ INI."
      operationId: lockDevice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceLockRequest'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceLockStatus'
          description: "Locking device succeed, returns device lock status"
        "400":
          description: Bad request due to:<br>1. invalid request body<br>2. fail to
            validate the image URL due to unreachable<br>3. fail to validate the image
            URL because its Content-Type header does not start with 'image/'<br>4.
            fail to validate the image URL because its Content-Length header is greater
            than 10 MB
      summary: Request to lock the device
      tags:
      - System - Device Lock control
  /system/lock_status:
    get:
      description: Returns device lock status
      operationId: getDeviceLockStatus
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceLockStatus'
          description: Returns device lock status
      summary: Query status of device lock
      tags:
      - System - Device Lock control
  /system/network:
    get:
      description: Retrieve detailed information of network(s) on the STB
      operationId: getNetworkInfo
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkInterfaceDetailsResponse'
          description: Returns Network Information
      summary: Get Network Information
      tags:
      - System - Network API
  /system/power:
    get:
      description: Get the current power status of the device.
      operationId: powerStatus
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PowerResponse'
          description: OK
      summary: Power Status
      tags:
      - System - Power State
  /system/power/activate:
    post:
      description: Set the device from standby mode to active mode
      operationId: powerActivate
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Power Activation
      tags:
      - System - Power State
  /system/power/standby:
    post:
      description: Set the device from active mode into standby mode
      operationId: powerStandby
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Power Standby
      tags:
      - System - Power State
  /system/prop:
    get:
      description: Returns `Android System Property` as specified by key.
      operationId: getProp
      parameters:
      - example: persist.sys.timezone
        in: query
        name: key
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
                example: persist.sys.timezone=Asia/Hong_Kong
          description: OK
        "400":
          description: Bad Request
      summary: Get system property.
      tags:
      - System - General Operation
    put:
      description: "Sets the provided value into the `Android Property` as specified\
        \ in key. There are limitations of property that can be set. It is limited\
        \ by SE policy. You can add new properties under the existing domain, e.g.\
        \ `persist.sys.`, `persist.vendor.amino`."
      operationId: setProp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyValuePair'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Set property value.
      tags:
      - System - General Operation
  /system/reboot:
    post:
      description: Reboots the device immediately without prompt.
      operationId: reboot
      responses:
        "200":
          description: OK
      summary: Reboot device.
      tags:
      - System - General Operation
  /system/rotation:
    get:
      description: Obtain the orientation of the device's screen
      operationId: getSystemOrientation
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RotationResponse'
          description: OK
      summary: Get system orientation
      tags:
      - System - General Operation
    put:
      description: Configure the orientation of the device's screen
      operationId: setSystemOrientation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RotationChangeRequest'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
        "409":
          description: Conflict
      summary: Set the system orientation
      tags:
      - System - General Operation
  /system/screenshot:
    get:
      description: Returns a list of all available screenshots.
      operationId: getImages
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Screenshot'
          description: OK
      summary: Get all available screenshots
      tags:
      - System - Screenshot
  /system/screenshot/capture:
    post:
      description: "Captures a new screenshot. If the number of screenshots exceeds\
        \ 10, the oldest screenshot will be automatically deleted."
      operationId: capture
      responses:
        "200":
          description: OK
        "500":
          description: Internal Server Error
        "503":
          description: Device or resource busy
      summary: Capture a new screenshot
      tags:
      - System - Screenshot
  /system/screenshot/snapshot:
    get:
      description: "Captures the latest screenshot and returns it as image data. The\
        \ image is returned in JPEG format. Note that this method does not save the\
        \ screenshot to the device, it only returns the image data directly.\n\n**Usage\
        \ Examples:**\n- Save to file: `curl \"http://{deviceIP}:8090/api/v2/system/screenshot/snapshot\"\
        \ -o screenshot.jpg`\n- View in browser: Open `http://{deviceIP}:8090/api/v2/system/screenshot/snapshot`\
        \ directly in a web browser\n- **Note:** Do not use curl without the `-o`\
        \ option as it will output binary image data to your terminal!"
      operationId: snapshot
      parameters:
      - description: "Width of the output image, optional"
        in: query
        name: width
        schema:
          type: integer
          format: int64
          default: 1280
      - description: "Height of the output image, optional"
        in: query
        name: height
        schema:
          type: integer
          format: int64
          default: 720
      - description: "JPEG quality (0-100), optional"
        in: query
        name: quality
        schema:
          type: integer
          format: int64
          default: 90
          maximum: 100
          minimum: 0
      responses:
        "200":
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
          description: OK
        "500":
          description: Internal Server Error
        "503":
          description: Device or resource busy
      summary: Capture and return the screenshot as image data
      tags:
      - System - Screenshot
  /system/screenshot/{id}:
    get:
      description: "Returns the screenshot with the specified ID. Use ID=0 to get\
        \ the latest screenshot, or ID=9 to get the oldest screenshot."
      operationId: getImage
      parameters:
      - description: ID of the screenshot to retrieve
        in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        "200":
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Screenshot'
          description: OK
        "404":
          description: Not found
      summary: Get information about a specific screenshot
      tags:
      - System - Screenshot
  /system/screenshot/{id}/image:
    get:
      description: "Returns the raw image data for a specific screenshot. Use ID=0\
        \ to get the latest screenshot, or ID=9 to get the oldest screenshot. The\
        \ image is returned in JPEG format.\n\n**Usage Examples:**\n- Save latest\
        \ screenshot: `curl \"http://{deviceIP}:8090/api/v2/system/screenshot/0/image\"\
        \ -o latest_screenshot.jpg`\n- Save specific screenshot: `curl \"http://{deviceIP}:8090/api/v2/system/screenshot/5/image\"\
        \ -o screenshot_5.jpg`\n- View in browser: Open `http://{deviceIP}:8090/api/v2/system/screenshot/0/image`\
        \ directly in a web browser\n- **Note:** Do not use curl without the `-o`\
        \ option as it will output binary image data to your terminal!"
      operationId: returnImage
      parameters:
      - description: ID of the screenshot to retrieve
        in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        "200":
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
          description: OK
        "404":
          description: Not found
      summary: Get the raw image data (image/jpeg) for a specific screenshot
      tags:
      - System - Screenshot
  /system/spacemgr:
    get:
      description: "Returns storage information, represented in bytes"
      operationId: getStorageInfo
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StorageInfo'
          description: Return storage information
      summary: Get storage information
      tags:
      - System - Storage Info API
  /system/storage/unmountAll:
    post:
      description: Unmounts all external storage devices. This prevents data loss
        when the device is powered off.
      operationId: unmountAll
      responses:
        "200":
          description: OK
      summary: Unmount all external storage
      tags:
      - System - Storage Info API
  /system/unlock:
    post:
      description: "Unlock the device, and return the current device lock status"
      operationId: unlockDevice
      responses:
        "200":
          content:
            application/json:
              example:
                locked: false
              schema:
                $ref: '#/components/schemas/DeviceLockStatus'
          description: "Unlocking device succeed, returns device lock status"
      summary: Request to unlock the device
      tags:
      - System - Device Lock control
  /zapper/cached/play:
    post:
      description: "**Instant Switching:** Cached streams provide zero-delay switching.\
        \ New streams load in background for smooth transition. <br>**Smart Decoder\
        \ Management:** Maintains pool of ready decoders (default: 3). Automatically\
        \ evicts least-used streams when pool is full. Dynamic pool sizing from 1-9\
        \ decoders. <br>**Automatic Resource Handling:** Audio management (only active\
        \ stream has audio). Z-order management (active stream on top). <br>**Recommended\
        \ Codecs:** H.264 and H.265 for optimal performance."
      operationId: play
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapperPlayRequest'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Play video URL with instant switching.
      tags:
      - Zapper
  /zapper/changeChannel:
    post:
      description: "Built-in Zapper Application will be restarted and attempt to tune\
        \ to the specified channel by name or desc. If the channel name or desc is\
        \ not found, it will tune to the channel configured from the Lineup File."
      operationId: changeChannel
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZapperChannelChange'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Change channel on zapper.
      tags:
      - Zapper
  /zapper/channels:
    get:
      description: "Complete channel lineup will be returns in `JSON` format or empty\
        \ json object `{}` if no channels have been provisioned."
      operationId: getAllChannels
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Channels'
          description: OK
      summary: Returns complete channel lineup.
      tags:
      - Zapper
    post:
      description: Add a new channel to the lineup. If the channel already exists
        then an error will be returned.
      operationId: addNewChannel
      requestBody:
        content:
          application/json:
            examples:
              minimal channel definition:
                description: minimal channel definition
                value:
                  name: "100"
                  desc: My Channel
                  url: udp://233.100.100.9:1234
            schema:
              oneOf:
              - $ref: '#/components/schemas/ChannelV2'
              - $ref: '#/components/schemas/ChannelV3_MultipleURLs'
              - $ref: '#/components/schemas/ChannelV1_Deprecated'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Adds new channel to the lineup.
      tags:
      - Zapper
  /zapper/channels/{name}:
    delete:
      operationId: deleteChannel
      parameters:
      - description: Delete the channel for number provided as name param. If the
          channel does not exist and error will be returned.
        in: path
        name: name
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Delete the channel.
      tags:
      - Zapper
    get:
      operationId: getChannelByName
      parameters:
      - description: Return the channel object for number provided as name param.
        in: path
        name: name
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ChannelV2'
                - $ref: '#/components/schemas/ChannelV3_MultipleURLs'
                - $ref: '#/components/schemas/ChannelV1_Deprecated'
          description: OK
        "400":
          description: Bad Request
      summary: Get the channel info.
      tags:
      - Zapper
    put:
      operationId: editChannelInfo
      parameters:
      - description: Update the channel object for number provided as name param.
          If the channel does not exist and error will be returned.
        in: path
        name: name
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            examples:
              channel with DRM:
                description: channel with DRM
                value:
                  name: "120"
                  desc: Widevine DASH Channel
                  url: https://www.example.com/dash.manifest
                  encrypting_server: http://demo.example.com/license
                  encryption_type: com.widevine.alpha
            schema:
              oneOf:
              - $ref: '#/components/schemas/ChannelV2'
              - $ref: '#/components/schemas/ChannelV3_MultipleURLs'
              - $ref: '#/components/schemas/ChannelV1_Deprecated'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Create or change the channel info of a channel.
      tags:
      - Zapper
  /zapper/last-channel:
    get:
      description: "Returns the cached last channel payload supplied via PUT in `JSON`\
        \ format along with the update timestamp. If nothing has been stored yet,\
        \ a 404 is returned."
      operationId: getLastChannel
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LastChannelState'
          description: OK
        "404":
          description: Last channel not available. Playback may not been initiated
            yet.
      summary: Get the last playing channel info of Zapper.
      tags:
      - Zapper
  /zapper/tuneToUrl:
    post:
      description: "Provide channel lineup entry and force tune the channel zapper\
        \ to tune to the entry without persisting. Upon `Ch+/-` the channel zapper\
        \ will continue going through the lineup if configured. If NO channel lineup\
        \ has been configured, `CH+/-` will have no effect and the Forced Tuned `URL`\
        \ will continue to play."
      operationId: tuneToUrl
      requestBody:
        content:
          application/json:
            examples:
              minimal channel definition:
                description: minimal channel definition
                value:
                  name: "110"
                  desc: Mp4 VOD
                  url: https://www.example.com/abc.mp4
            schema:
              oneOf:
              - $ref: '#/components/schemas/ChannelV2'
              - $ref: '#/components/schemas/ChannelV3_MultipleURLs'
              - $ref: '#/components/schemas/ChannelV1_Deprecated'
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
      summary: Force tune to video URL.
      tags:
      - Zapper
components:
  schemas:
    Application:
      type: object
      properties:
        app_label:
          type: string
          description: Display name of application.
          example: Browser
        in_system_image:
          type: boolean
          description: Whether the application is part of system image.
          example: true
        launch_intent:
          $ref: '#/components/schemas/LaunchIntent'
        package_name:
          type: string
          description: Package name of application.
          example: com.aminocom.browser
        state:
          type: string
          description: Running state of application
          enum:
          - running
          - stopped
          - paused
          example: running
        storage:
          $ref: '#/components/schemas/Storage'
        version:
          type: string
          description: Version number of application
          example: "1.0"
        version_code:
          type: integer
          format: int64
          description: Version code of application
          example: 123
    BugReport:
      type: object
      properties:
        date:
          type: string
          description: "The date and time when the bug report was taken, in ISO 8601\
            \ format."
          example: 2023-06-13T09:53:40Z
        name:
          type: string
          description: The filename of the bug report.
          example: bugreport-H200-QTT8.201201.002-2023-06-13-09-51-59.zip
        size:
          type: integer
          format: int64
          description: The size of the bug report file in bytes.
          example: 3828208
        status:
          type: string
          description: The status of the bug report.
          enum:
          - generating
          - available
          example: generating
    Channel:
      type: object
      oneOf:
      - $ref: '#/components/schemas/ChannelV2'
      - $ref: '#/components/schemas/ChannelV3_MultipleURLs'
      - $ref: '#/components/schemas/ChannelV1_Deprecated'
    ChannelBase:
      type: object
      oneOf:
      - $ref: '#/components/schemas/ChannelV2'
      - $ref: '#/components/schemas/ChannelV3_MultipleURLs'
      properties:
        desc:
          type: string
          example: UDP 1
        drm_session_type:
          type: string
          example: persistent
        encrypting_request_header:
          type: object
          additionalProperties:
            type: string
            example: "{'header_a':'a'}"
          example: "{'header_a':'a'}"
        encrypting_server:
          type: string
          example: http://demo.aminocom.com/license
        encryption_type:
          type: string
          example: com.widevine.alpha
        loop_on_end:
          type: boolean
          description: set true to replay the video upon video end.
          example: false
        name:
          type: string
          example: "101"
        retry_on_error:
          type: boolean
          description: "set true to re-tune the this channel when there is ERROR event,\
            \ set false to tune to the next channel upon error."
          example: false
        starting:
          type: boolean
          description: set true to specify the 1st channel being played after boot
          example: true
      required:
      - name
    ChannelV1_Deprecated:
      type: object
      description: "Zapper Channel definition (deprecated, use ChannelV2 or ChannelV3\
        \ instead)"
      properties:
        addr:
          type: string
          example: 233.22.133.1
        desc:
          type: string
          example: UDP 1
        drm_session_type:
          type: string
          example: persistent
        encrypting_request_header:
          type: object
          additionalProperties:
            type: string
            example: "{'header_a':'a'}"
          example: "{'header_a':'a'}"
        encrypting_server:
          type: string
          example: http://demo.aminocom.com/license
        encryption_type:
          type: string
          example: com.widevine.alpha
        igmpv3_addr_list:
          type: array
          items:
            type: string
            example: 198.51.100.42
        igmpv3_mode:
          type: string
          enum:
          - asm
          - include
          - exclude
          example: asm
        loop_on_end:
          type: boolean
          description: set true to replay the video upon video end.
          example: false
        name:
          type: string
          example: "101"
        port:
          type: integer
          format: int32
          example: 8110
          maximum: 65536
          minimum: 1
        retry_on_error:
          type: boolean
          description: "set true to re-tune the this channel when there is ERROR event,\
            \ set false to tune to the next channel upon error."
          example: false
        starting:
          type: boolean
          description: set true to specify the 1st channel being played after boot
          example: true
        type:
          type: string
          enum:
          - udp
          - igmpv3
          - nativedash
          - rtsp
          - http
          - srt
          - https
          example: udp
      required:
      - addr
      - name
      - type
    ChannelV2:
      type: object
      description: Zapper Channel definition with single URL
      properties:
        desc:
          type: string
          example: UDP 1
        drm_session_type:
          type: string
          example: persistent
        encrypting_request_header:
          type: object
          additionalProperties:
            type: string
            example: "{'header_a':'a'}"
          example: "{'header_a':'a'}"
        encrypting_server:
          type: string
          example: http://demo.aminocom.com/license
        encryption_type:
          type: string
          example: com.widevine.alpha
        loop_on_end:
          type: boolean
          description: set true to replay the video upon video end.
          example: false
        name:
          type: string
          example: "101"
        retry_on_error:
          type: boolean
          description: "set true to re-tune the this channel when there is ERROR event,\
            \ set false to tune to the next channel upon error."
          example: false
        starting:
          type: boolean
          description: set true to specify the 1st channel being played after boot
          example: true
        url:
          type: string
          description: Full URL as EnableJS API Player.setSource()
          example: udp://233.22.133.100:8110?prog_id=2&disable_av_sync=true
      required:
      - name
      - url
    ChannelV3_MultipleURLs:
      type: object
      description: Zapper Channel definition with multiple URLs (for Zapper splitting
        screens)
      properties:
        desc:
          type: string
          example: UDP 1
        drm_session_type:
          type: string
          example: persistent
        encrypting_request_header:
          type: object
          additionalProperties:
            type: string
            example: "{'header_a':'a'}"
          example: "{'header_a':'a'}"
        encrypting_server:
          type: string
          example: http://demo.aminocom.com/license
        encryption_type:
          type: string
          example: com.widevine.alpha
        loop_on_end:
          type: boolean
          description: set true to replay the video upon video end.
          example: false
        name:
          type: string
          example: "101"
        retry_on_error:
          type: boolean
          description: "set true to re-tune the this channel when there is ERROR event,\
            \ set false to tune to the next channel upon error."
          example: false
        starting:
          type: boolean
          description: set true to specify the 1st channel being played after boot
          example: true
        url:
          type: array
          items:
            type: string
            description: Array of String contains full URL as EnableJS API Player.setSource()
            example: "[\"udp://233.22.133.100:8110\",\"udp://233.22.133.101:8110\"\
              ]"
            maxLength: 4
            minLength: 1
      required:
      - name
      - url
    Channels:
      type: object
      properties:
        channels:
          type: array
          items:
            $ref: '#/components/schemas/Channel'
    Command:
      type: object
      properties:
        method:
          type: string
          description: Request method
          enum:
          - GET
          - POST
          - PUT
          - DELETE
          - PATCH
          - HEAD
          - OPTIONS
          - TRACE
          example: POST
        params:
          type: object
          description: command arguments
          example: "\"volume\":{\"left\":\"50\", \"right\":\"50\"}"
        payload:
          type: object
          example: "{\"locked\":false},"
          readOnly: true
        status:
          type: integer
          format: int32
          example: 200
          readOnly: true
        timeout:
          type: integer
          format: int32
          description: "the time in seconds to wait for the command to complete, default\
            \ is 10 seconds"
          example: 30
        url:
          type: string
          description: api url
          example: /system/audio
      required:
      - method
      - url
    CommandScheduler:
      type: object
      properties:
        apiBaseUrl:
          type: string
          description: Base url to be append to url of the command.
          example: http://localhost:8090/api/v2
        commands:
          type: array
          items:
            $ref: '#/components/schemas/Command'
        execTs:
          type: integer
          format: int64
          description: "epoch time to execute the command(s). The Execution Time will\
            \ add and minus a threshold (10 seconds) to become a time range, then\
            \ compare it with the system clock time to determine the actions."
          example: 1678430761
        inSeq:
          type: boolean
          description: execute the command(s) sequentially
          example: true
        recurrence:
          $ref: '#/components/schemas/Recurrence'
        status:
          type: integer
          format: int32
          example: 200
          readOnly: true
        statusPayload:
          type: string
          description: "High-level state emitted by the scheduler. Possible values:\
            \ `pending` (before first execution), `cancelling`, `cancel succeed`,\
            \ `success`/`fail` (final run completed with 200/400), and transitional\
            \ 206 variants `success_waiting_next` / `fail_waiting_next` while remaining\
            \ runs are queued."
          example: pending
          readOnly: true
      required:
      - apiBaseUrl
    CommandSchedulerId:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 100
    DeviceListResponse:
      type: object
      properties:
        count:
          type: integer
          format: int32
          description: Number of devices in the list
          example: 1
        devices:
          type: array
          description: List of discovered devices
          items:
            $ref: '#/components/schemas/DiscoveredDevice'
        since:
          type: integer
          format: int64
          description: Filter timestamp that was applied
          example: 1692105600000
          minimum: 0
    DeviceLockRequest:
      type: object
      properties:
        image:
          type: string
          description: The lock image URL.<br>Content-Type header shall start with
            'image/' and Content-Length header shall be smaller than or equal to 10
            MB.
          example: https://xxx/device_lock.png
        message:
          type: string
          description: "The lock message.<br>If the image field does not exist, the\
            \ lock screen will show message defined here.<br>If message = empty string,\
            \ the lock message will be retrieved through INI."
          example: Your device has been locked
    DeviceLockStatus:
      type: object
      properties:
        locked:
          type: boolean
    DiscoveredDevice:
      type: object
      description: List of discovered devices
      properties:
        deviceName:
          type: string
          description: Human-readable device name
          example: Living Room STB
        firmwareVersion:
          type: string
          description: Firmware version
          example: 25.6.2521.6R
        firstSeen:
          type: integer
          format: int64
          description: Timestamp when device was first seen
          example: 1692105600000
        ipAddress:
          type: string
          description: Device IP address
          example: 192.168.1.100
        lastSeen:
          type: integer
          format: int64
          description: Timestamp when device was last seen
          example: 1692105660000
        serialNumber:
          type: string
          description: Device serial number
          example: 107-12345678
    DiscoveryStatusResponse:
      type: object
      properties:
        advertisingEnabled:
          type: boolean
          description: Whether advertising this device as service to others is currently
            enabled
          example: true
        deviceCount:
          type: integer
          format: int32
          description: Number of discovered devices
          example: 5
        discoveryEnabled:
          type: boolean
          description: Whether this device is configured to be discovered by other
            devices
          example: false
        since:
          type: integer
          format: int64
          description: Timestamp when discovery was started (Unix timestamp)
          example: 1692105600000
    ExtrasConfig:
      type: object
      description: Additional parameters to be passed in JSON format.
      properties:
        configA:
          type: boolean
          example: true
        configB:
          type: string
          example: String
        configC:
          type: integer
          format: int32
          example: 123
    HardwareModelResponse:
      type: object
      properties:
        hardwareModel:
          type: string
          example: "107"
    HdmiInfo:
      type: object
      properties:
        cec_one_touch_play:
          type: string
          example: "off"
        cec_remote_control:
          type: string
          example: tv2stb
        cec_standby:
          type: string
          example: "off"
        connected:
          type: boolean
          example: true
        current_resolution:
          type: string
          example: 1920x1080
        hdcp_enabled:
          type: boolean
          example: true
        hdcp_success:
          type: string
          example: "Yes"
        hdcp_version:
          type: string
          example: V1
        max_audio_pcm_channels:
          type: integer
          format: int32
          example: 2
        monitor_name:
          type: string
          example: MStar
        preferred_resolution:
          type: string
          example: 2160p30hz
        supported_3D_resolution:
          type: array
          example:
          - '480i60hz TopBottom SidebySide '
          - '576i50hz TopBottom SidebySide '
          items:
            type: string
        supported_deep_color_formats:
          type: string
          example: --
        supported_eotf_formats:
          type: string
          example: --
        supported_resolution:
          type: array
          example:
          - 480i60hz
          - 576i50hz
          items:
            type: string
    HdmiPort:
      type: object
      properties:
        active_port:
          type: integer
          format: int32
          example: 1
      required:
      - active_port
    HdmiPowerMode:
      type: object
      properties:
        power_on:
          type: boolean
          example: false
      required:
      - power_on
    HdmiStandbyMode:
      type: object
      properties:
        mode:
          type: string
          description: The standby command communication between TV and STB
          enum:
          - tv2stb
          - stb2tv
          - both
          - "off"
      required:
      - mode
    IrControlRequest:
      type: object
      properties:
        enable:
          type: boolean
          example: true
      required:
      - enable
    IrControlResponse:
      type: object
      properties:
        ircontrol:
          type: boolean
          example: true
    Key:
      type: object
      properties:
        delay:
          type: integer
          format: int32
          example: 500
        keycode:
          type: integer
          format: int32
          example: 166
      required:
      - keycode
    KeyValuePair:
      type: object
      properties:
        key:
          type: string
          example: persist.sys.amino.hdmi.cec.one_touch_play
        value:
          type: string
          example: "on"
      required:
      - key
      - value
    LastChannelState:
      type: object
      description: Payload returned by the last-channel endpoint.
      properties:
        channel:
          $ref: '#/components/schemas/ChannelBase'
        updated_at:
          type: integer
          format: int64
          description: Epoch time in milliseconds when the cache was updated.
          example: 1712098765432
      required:
      - channel
      - updated_at
    LaunchIntent:
      type: object
      properties:
        action:
          type: string
          description: Action Name.
          example: android.intent.action.VIEW
        activity:
          type: string
          description: Classname inside of the application package.
          example: com.aminocom.browser.MainActivity
        data:
          type: string
          description: Data or uri.
          example: https://www.yahoo.com
        extras:
          $ref: '#/components/schemas/ExtrasConfig'
        package:
          type: string
          description: Explicit package id should be target to instead of broadcast.
          example: com.aminocom.browser
        packageName:
          type: string
          description: Deprecated. Keep for compatibility. Please use package.
    MacAddressResponse:
      type: object
      properties:
        macAddress:
          type: string
          example: 5C:0F:FB:11:F1:6E
    Mute:
      type: object
      properties:
        mute:
          type: boolean
    NetworkInterfaceDetails:
      type: object
      properties:
        active:
          type: boolean
        dhcp_server:
          type: string
          description: Only available for wlan / on Android R+
        dns:
          type: array
          items:
            type: string
        gateway:
          type: string
        ip_address:
          type: string
        ip_type:
          type: string
          description: Only available for wlan / on Android R+
        link_capability:
          type: boolean
        linking:
          type: string
        mac_address:
          type: string
        member_interfaces:
          type: array
          items:
            type: string
        netmask:
          type: string
        nic_name:
          type: string
        nic_type:
          type: string
        transmission_mode:
          type: string
    NetworkInterfaceDetailsResponse:
      type: object
      properties:
        current_active_wan:
          type: string
          description: Name of current active interface
        nic:
          type: array
          items:
            $ref: '#/components/schemas/NetworkInterfaceDetails'
        num_of_nic:
          type: integer
          format: int32
          description: Number of network interface in total
    PowerResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - active
          - standby
          example: active
    Recurrence:
      type: object
      description: "Defines recurring execution.\nRules: \n- intervalMinutes: required,\
        \ >= 1.\n- iterations: TOTAL executions including the first at execTs. Omit\
        \ or 0 => infinite.\nExamples: iterations=3 & intervalMinutes=5 => runs at\
        \ T, T+5m, T+10m (3 runs over 10 minutes span).\nIf infinite, remainingRuns\
        \ = -1 and nextRunTs always points to the upcoming execution.\nWhen a finite\
        \ sequence completes, remainingRuns = 0 and nextRunTs is null (omitted).\n\
        If a schedule is cancelled, nextRunTs is cleared while remainingRuns reflects\
        \ how many executions were still pending (or stays at -1 for infinite recurrences)."
      properties:
        intervalMinutes:
          type: integer
          format: int32
          description: Interval between executions in whole minutes. Must be >= 1.
          example: 5
          minimum: 1
        iterations:
          type: integer
          format: int32
          description: "Total number of executions INCLUDING the first. Omit or 0\
            \ => infinite recurrence. Example: 4 means exactly 4 runs (indices 0..3)\
            \ at execTs + n*intervalMinutes."
          example: 3
          minimum: 0
        lastRunTs:
          type: integer
          format: int64
          description: Most recent execution epoch seconds. Null if the first execution
            has not yet occurred.
          example: 1678430761
          readOnly: true
        nextRunTs:
          type: integer
          format: int64
          description: Next execution epoch seconds. Null when no further executions
            remain (finite sequence completed). For infinite recurrence always populated.
          example: 1678431061
          readOnly: true
        remainingRuns:
          type: integer
          format: int32
          description: "Remaining executions (including any future ones). For infinite\
            \ recurrence this is -1. For finite: starts at iterations, decrements\
            \ after each completion, reaches 0 when finished."
          example: 2
          readOnly: true
      required:
      - intervalMinutes
    RotationChangeRequest:
      type: object
      properties:
        rotation:
          type: integer
          format: int32
          description: "Degree in clockwise:<br/><br/>0: 0 degree<br/>1: 90 degree<br/>2:\
            \ 180 degree<br/>3: 270 degree"
          example: 0
      required:
      - rotation
    RotationResponse:
      type: object
      properties:
        rotation:
          type: integer
          format: int32
          description: "Degree in clockwise:<br/><br/>0: 0 degree<br/>1: 90 degree<br/>2:\
            \ 180 degree<br/>3: 270 degree"
          example: 0
    ScreenBrightnessData:
      type: object
      properties:
        brightness:
          type: integer
          format: int32
          description: Screen brightness level
          example: 50
          maximum: 100
          minimum: 0
      required:
      - brightness
    ScreenConfigData:
      type: object
      properties:
        baudRate:
          type: integer
          format: int32
          description: Baud rate for the screen communication protocol
          example: 9600
        binaryMode:
          type: boolean
          description: Binary mode for the screen communication protocol
          example: false
        brand:
          type: string
          description: brand of the screen
          example: LG
      required:
      - baudRate
      - binaryMode
      - brand
    ScreenInputData:
      type: object
      properties:
        input:
          type: string
          description: "Input source for the screen. Valid values are HDMI1, HDMI2,\
            \ AV, RGB, etc."
          enum:
          - CADTV
          - ATV
          - CATV
          - AV
          - AV1
          - AV2
          - COMPONENT1
          - COMPONENT2
          - RGB
          - HDMI1
          - HDMI2
          - HDMI3
          - HDMI4
          example: HDMI1
      required:
      - input
    ScreenMuteData:
      type: object
      properties:
        mute:
          type: boolean
          description: True indicates the screen is muted.
          example: true
      required:
      - mute
    ScreenPowerData:
      type: object
      properties:
        power:
          type: boolean
          description: True indicates the screen power is on.
          example: false
      required:
      - power
    ScreenRawRequest:
      type: object
      properties:
        hexCode:
          type: string
          description: Hex code to be sent to the screen
          example: "90"
          pattern: "^[0-9A-Fa-f]{2}$"
      required:
      - hexCode
    ScreenVolumeData:
      type: object
      properties:
        volume:
          type: integer
          format: int32
          description: Screen volume level
          example: 50
          maximum: 100
          minimum: 0
      required:
      - volume
    Screenshot:
      type: object
      properties:
        filename:
          type: string
          description: The filename of the screenshot resource.
          example: screenshot_2023-04-20_16-26-52-747.jpg
        timestamp:
          type: string
          description: "The timestamp when the screenshot was captured, in format:\
            \ EEE MMM dd HH:mm:ss zzz yyyy"
          example: Thu Apr 20 18:08:48 GMT+08:00 2023
        uri:
          type: string
          description: The URI of the screenshot resource.
          example: http://localhost:8090/api/v2/system/screenshot/0/image
    SerialNumberResponse:
      type: object
      properties:
        serialNumber:
          type: string
          example: 107-12345678
    Storage:
      type: object
      description: Storage used
      properties:
        app:
          type: integer
          format: int64
          description: The size of the app (in byte)
          example: 8192
        cache:
          type: integer
          format: int64
          description: The size of all cached data (int byte)
          example: 516096
        data:
          type: integer
          format: int64
          description: The size of all data (in byte)
          example: 1146881
    StorageInfo:
      type: object
      properties:
        free:
          type: string
          example: "2000000000"
        total:
          type: string
          example: "4000000000"
    SwapperPlayRequest:
      type: object
      properties:
        num_players:
          type: integer
          format: int32
          description: "Dynamically changes the total number of video players available.\
            \ Range: 1-9. Default: 3 (initial value). Increase: Creates new players\
            \ before switching streams. Decrease: Removes least-used players after\
            \ switching streams. LRU Preservation: Most recently used players are\
            \ kept when decreasing."
          example: 3
          maximum: 9
          minimum: 1
        url:
          type: string
          description: "Video stream URL to load/switch to. Supported Protocols: RTSP,\
            \ SRT, UDP, or any ENABLE.player compatible URL. Must be non-empty string."
          example: srt://www.example.com?streamid=output/live/h264sd
      required:
      - url
    SystemApplicationInstallRequestBody:
      type: object
      properties:
        url:
          type: string
          description: url of the application to be installed
          example: https://example.com/app.apk
      required:
      - url
    SystemInfo:
      type: object
      properties:
        uptime:
          type: integer
          format: int64
          description: System uptime in milliseconds
    TVStatus:
      type: object
      properties:
        active_port:
          type: integer
          format: int32
          description: "The HDMI port number is/to activate. 1 means HDMI 1, 0 for\
            \ unknown."
          example: 1
          maximum: 4
          minimum: 0
        device:
          type: array
          description: List of device names connected to TV
          example:
          - H200
          - ""
          - ""
          - ""
          items:
            type: string
            description: List of device names connected to TV
            example: "[\"H200\",\"\",\"\",\"\"]"
            readOnly: true
          readOnly: true
        power_status:
          type: integer
          format: int32
          description: "The power status of TV. 0: TV off, 1: TV on, 2: unknown (HDMI\
            \ not connected), 3: unknown (HDMI connected but STB standby), 4: unknown\
            \ (HDMI connected and STB not in standby, but no CEC data replied), 5:\
            \ unknown (others)"
          enum:
          - 0
          - 1
          - 2
          - 3
          - 4
          - 5
          readOnly: true
    UpgradeRequest:
      type: object
      properties:
        uri:
          type: string
          example: http://www.webstorage.com/25.5.2021.3.zip
      required:
      - uri
    Volume:
      type: object
      properties:
        volume:
          type: integer
          format: int32
          maximum: 100
          minimum: 0
    ZapperChannelChange:
      type: object
      example:
        name: "2"
      properties:
        desc:
          type: string
        name:
          type: string
