29.04.2019 Views

OS6860(E)_AOS_8.1.1.R01_Switch_Management_Guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Web Services Overview<br />

Web Services, CLI Scripting, and OpenFlow<br />

nation of Protocol + Server address[:port] constitutes the Web Service's endpoint.<br />

Domain - This this is the first element the <strong>AOS</strong> REST web service will look at. It indicates in what<br />

domain the resource being accessed is located as listed below:<br />

• MIB - Used to denote accessing MIB variables.<br />

• CLI - Used to ask the web service to run CLI commands.<br />

• INFO - Used to return information on a MIB variable.<br />

URN - A Unified Resource Name represents the resource to be accessed.. For instance, when reading<br />

information from the 'mib' domain, URNs are MIB variables names; in most instances, tables.The<br />

URN is accessed using the following verbs: GET, PUT, POST, DELETE.<br />

Variables - A list of variables that are dependant on the domain being accessed. When reading from<br />

the 'mib' domain, this is a list of variables to be retrieved from a MIB table.<br />

Output format<br />

The output format can be encoded using either XML or JSON. The Accept request-header can be used to<br />

specify a given media type and leveraged to specify what the output type will be:<br />

• application/vnd.alcatellucentaos+json<br />

• application/vnd.alcatellucentaos+xml<br />

Caching<br />

Due to the volatile nature of the content being returned, the producer will instruct any system sitting<br />

between the producer and the consumer (included) not to cache its output. The following headers are sent<br />

by the producer:<br />

• Cache-Control: no-cache, no-store<br />

• Pragma: no-cache<br />

• Vary: Content-Type<br />

The first two headers indicate that caching should not take place. The last header is intended for proxy<br />

servers, informing them that the Content-Type header is a variable not to cache. Should a proxy server<br />

decide not to respect the latter header it’s possible to have unexpected behaviors such as retrieving JSONencoded<br />

data after specifically requesting XML-encoded data.<br />

page 10-4 Omni<strong>Switch</strong> <strong>AOS</strong> Release 8 <strong>Switch</strong> <strong>Management</strong> <strong>Guide</strong> May 2014

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!