CLI Guide

Table Of Contents
"time-stamp-numeric":1501151266
}
]
}
XML API optimization
For the XML API only, the following are two ways to optimize performance:
Use embedded objects. This allows one object to contain not only properties but also other objects. In general, parsing a
structure such as this is easier as the association between objects is simpler. This is an alternative to using COMP elements.
Use brief mode. In brief mode, which is disabled by default, returns a subset of attributes of object properties. The name
and type attributes are always returned. Other properties can be obtained by using the meta command with the basetype of
the object. This optimization reduces the number of bytes transmitted for each request and allows caching of CLI metadata.
Brief mode can be enabled or disabled by using the set cli-parameters command.
The following example shows brief mode output, in which a subset of attributes is returned, and use of embedded objects:
# show ports
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RESPONSE VERSION="L100" REQUEST="show ports">
<OBJECT basetype="port" name="ports" oid="1" format="rows">
<PROPERTY name="durable-id" type="string">hostport_A0</PROPERTY>
<PROPERTY name="controller" key="true" type="string">A</PROPERTY>
<PROPERTY name="controller-numeric" key="true" type="string">1</PROPERTY>
<PROPERTY name="port" key="true" type="string">A0</PROPERTY>
<PROPERTY name="port-type" type="string">FC</PROPERTY>
...
<OBJECT basetype="fc-port" name="port-details" oid="2" format="rows">
<PROPERTY name="configured-topology" type="string">PTP</PROPERTY>
<PROPERTY name="primary-loop-id" type="string">N/A</PROPERTY>
<PROPERTY name="sfp-status" type="string">Not present</PROPERTY>
...
</OBJECT>
</OBJECT>
...
<OBJECT basetype="status" name="status" oid="17">
<PROPERTY name="response-type" type="string">Success</PROPERTY>
...
</OBJECT>
</RESPONSE>
For the JSON API, embedding objects is the only way to show relationships and brief mode is not applicable.
Command syntax
General rules for specifying commands
Command names and parameter names are not case sensitive.
Parameters enclosed in square brackets ([ ]) are optional. Do not type the bracket characters.
Parameter values separated by | characters are options. Enter only one of the values. Unless specified otherwise, enumerated
values are not case sensitive.
Parameter values in italics are variables. Substitute text that is appropriate for the task you want to perform. Unless specified
otherwise, variable values such as names of users and volumes are case sensitive and have a maximum length in bytes. When
encoded in UTF-8, a single character can occupy multiple bytes. Typically:
1 byte per character for English, French, German, and Spanish
3 bytes per character for Chinese, Japanese, and Korean
Unless otherwise specified, a parameter value can include spaces and printable UTF-8 characters except: " , < > \
A parameter value that includes a space must be enclosed in double quotes. Unless specified otherwise, if you include leading or
trailing spaces with a value (such as a name) in double quotes, those spaces are treated as part of the value.
Using the CLI
17