User guide

Web Services Overview Web Services, CLI Scripting and OpenFlow
page 11-4 OmniSwitch AOS Release 7 Switch Management Guide March 2015
HTTPS is encrypted and HTTP is clear-text.
Server address[:port] - Server address: the IP address typically used to access the switch’s WebView
interface. If the listening port was changed, the port number should be appended after ':' The combi-
nation of Protocol + Server address[:port] constitutes the Web Service's endpoint.
Domain - This this is the first element the AOS REST web service will look at. It indicates in what
domain the resource being accessed is located as listed below:
MIB - Used to denote accessing MIB variables.
CLI - Used to ask the web service to run CLI commands.
INFO - Used to return information on a MIB variable.
URN - A Unified Resource Name represents the resource to be accessed.. For instance, when reading
information from the 'mib' domain, URNs are MIB variables names; in most instances, tables.The
URN is accessed using the following verbs: GET, PUT, POST, DELETE.
Variables - A list of variables that are dependant on the domain being accessed. When reading from
the 'mib' domain, this is a list of variables to be retrieved from a MIB table.
Output format
The output format can be encoded using either XML or JSON. The Accept request-header can be used to
specify a given media type and leveraged to specify what the output type will be:
application/vnd.alcatellucentaos+json
application/vnd.alcatellucentaos+xml
Caching
Due to the volatile nature of the content being returned, the producer will instruct any system sitting
between the producer and the consumer (included) not to cache its output. The following headers are sent
by the producer:
Cache-Control: no-cache, no-store
Pragma: no-cache
Vary: Content-Type
The first two headers indicate that caching should not take place. The last header is intended for proxy
servers, informing them that the Content-Type header is a variable not to cache. Should a proxy server
decide not to respect the latter header it’s possible to have unexpected behaviors such as retrieving JSON-
encoded data after specifically requesting XML-encoded data.