Command Reference
  • 25 Sep 2024
  • PDF

Command Reference

  • PDF

Article summary

REST interface

The documentation of the REST interface can be used as command reference. The REST API (application programming interface) is documented in a JSON file in compliance with the OpenAPI specification 3.0.
You can download the REST API documentation in the Administration → Config access menu in the Command line section.

Please note!

The REST API documentation contains all commands that are available in the various configurations and equipment variants of the router. Not all commands contained will be supported by your router.
It is only applicable for routers with the same firmware.

The commands and available options easily be determined using the REST API documentation by opening this documentation file using an OpenAPI-tool.

The proceeding for this is described in this Configuration Guide using the examples of the tools Swagger and Postman.

Command Line Interface (CLI)

The available sections and parameters of a router can easily be shown using auto-complete via tabulator key in the CLI. Pressing the tabulator key shows all available sections of the first level (corresponds to the menus in the classic web interface). Entering the first letter(s) of a section fallowed by the tabulator key completes the section and pressing the tabulator key again shows all available sections of the next level (corresponds to the pages of this menu in the web interface). Pressing the tabulator key again shows possible further sections or available parameters. In case of lists, the opening square bracket ([) will be output automatically. If this is replaced by a full stop, another click on the tabulator key will output the available list functions.

The following describes the proceeding for determining the commands for manually enabling the Info LED. Below listed sections and parameters depend on the router and the version of the application and may differ.

  1. Open a CLI session

  2. Press the Tab key

    >
    exit
    status
    interfaces
    wan
    routing
    netfilter
    services
    events
    administration
    help 

    All available sections from the first level are displayed (comparable to the main menu entries in the web interface).

  3. Enter h and press the Tab key

    > help.
  4. Press the Tab key

    > help.
    debug
    support
    oss_licenses 

    All available sections from the second level are displayed (only one here, comparable to the sub-menu entries in the web interface).

  5. Enter d and press the Tab key

    > help.debug.
  6. Press the Tab key

    > help.debug.
    ntp_sync
    reboot
    info_led
    message
    sms
    email
    wan_chain
    modem_state
    container_state
    auto_update
    firmware
    profile
    ascii
    timer
    counter
    output
    serge
    port_mirror
    tool 

    All available manual actions are displayed.

  7. Enter i and press the Tab key

    > help.debug.info_led.
  8. Press the Tab key

    > help.debug.info_led.
    info_led
    submit 

    All available parameters for manual setting of the Info LED are displayed. The parameter submit is only relevant for CLI operation since it serves for triggering the command.

  9. Enter i, press the Tab key, append an = and press the Tab key twice

    > help.debug.info_led.info_led=
    flash
    off
    on 

    All available options for setting the Info LED are displayed.

Therefore, the following syntax results for enabling of the Info LED via the REST interface:

POST /api/v2_0/operation
{
 "method" : "manual_action",
 "params" : {
  "type" : "info_led",
  "options" : {
   "info_led" : "on"
  }
 }
}

Then, the CLI commands for enabling of the Info LED have the following syntax:

> help.debug.info_led.info_led=on   
> help.debug.info_led.submit


Was this article helpful?