Owner's Manual
REST API | 173
REST API Framework to Execute the CLIs
REST CLI is an alternative approach for Telnet and SSH to send the Dell Networking
OS commands to the system. The command is sent as an XML payload and the
corresponding output or error message of the command is returned in an unstructured
format in the XML response. There are three sets of XML commands:
• config-commands — to send the
configuration commands to the system.
Commands with sub-modes are allowed within a single XML tag by using the
separator
\r\n.
• show-command — to send the
show commands to the system. The keyword
show is not required explicitly in the tag (for show version, use version).
• exec-command — to configure the
exec commands on the system.
The HTTP username and password need appropriate privilege to execute REST-CLI
on the device. The REST-CLI request returns HTTP/1.1 200 OK on a successful
completion. All the other HTTP error codes are treated as failure. Multiple command
tags are not allowed inside the <input> tag.
The tree structure of the REST CLI is as follows:
module: ftos
+--rw ftos?
|
+---x cli
+--ro input
| +--ro config-commands? string
| +--ro show-command? ftos:show-cmd-str
| +--ro exec-command? ftos:cli-cmd-str
+--ro output
+--ro command string
Following is the sample output of config-commands:
To configure IP address:
Input.xml:
<input>
<config-commands>
interface vlan 100\r\n
ip address 1.2.3.4/24
</config-commands>
</input>
Note: Interactive CLIs (like clear counters, reload and so on) are not supported via
the REST API framework. The commands sent in XML payload is restricted to a
maximum of 1000 characters length.