(Supporting Network Advisor 12.3.0)
Table Of Contents
- Contents
- About This Document
- Overview of the Network Advisor REST API
- Getting Started
- Using the Brocade Network Advisor REST API
- Introduction
- Logging in and out
- Specifying content type
- Versioning (backward compatibility)
- Using the Topology API
- Using the SAN Fabric Discovery API
- Using the Traffic Flow API
- Using the Summary Data API
- Using the Events API
- Using the Zoning API
- Using the Historical Performance Data API
- Fibre Channel Routing
- Handling errors
- Use Cases
- API Reference
- Request and Response Schemas
- Topology
- SAN fabric discovery
- Summary data
- SummaryResponse
- StatusSummary
- AssetClassificationSummary
- NetworkObjectCountSummary
- EventsSummary
- BottleneckViolationsSummary
- OutOfRangeViolationsSummary
- PortHealthViolationsSummary
- VmViolationsSummary
- SummariesResponse
- PortsMonitorSummaryData
- MonitorDistributionData
- ProductsMonitorSummaryData
- FlowMonitorSummaryData
- Events
- Zoning
- Historical performance data
- Authentication and session management

Brocade Network Advisor REST API Guide 45
53-1003160-01
SAN fabric discovery
4
• XML file (DiscoverFabricRequest.xml) containing the payload DiscoverFabricRequest object.
The payload object specifies the parameters that are needed for FC fabric discovery
(for example, user name, password, and the seed switch IP address. For more information
about the parameters defined by the DiscoverFabricRequest object, refer to
DiscoverFabricRequest.
NOTE
The REST XML schema for DiscoverFabricRequest is published in the directory
<INSTALL-DIR>/conf/rest-schema, where <INSTALL-DIR> is the installation directory of Network
Advisor. The schema for DiscoverFabricRequest provides more details on the default values for
some of the properties.
Sample DiscoverFabricRequest.xml file contents
The following is an example of XML payload for SAN fabric discovery.
<tns:DiscoverFabricRequest
xmlns:tns="http://www.brocade.com/networkadvisor/webservices/v1/discoveryservice/
request">
<switchIpAddress>10.24.45.92</switchIpAddress>
<userName>admin</userName>
<password>password</password>
<fabricName>ApsFabric</fabricName>
</tns:DiscoverFabricRequest>
Sample SAN fabric discovery code (Java)
The following is an example of Java code for SAN fabric discovery. This sample code assumes that
some tool has been used to generate the required code for the requests (refer to “Binding the
schema”)
HttpURLConnection con = null;
try {
/**
* Create the HTTP connection object with the URI, method, and headers
*/
URL obj = new
URL("http://10.24.48.103/rest/resourcegroups/All/discoverfabric");
con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.addRequestProperty("WStoken", "wppCy/NGdC4o5gGFJjXRMv7blhc=");
con.addRequestProperty("Accept",
"application/vnd.brocade.networkadvisor+json;version=v1");
con.addRequestProperty("Content-type",
"application/vnd.brocade.networkadvisor+xml;version=v1");
/**
* Unmarshal the XML data into the Java content object
*/
JAXBContext jaxbContext = JAXBContext.newInstance(DiscoverFabricRequest.class);
Unmarshaller u = jaxbContext.createUnmarshaller();
Object element = u.unmarshal(new File("./DiscoverFabricRequest.xml"));
/**
* Marshal the java object into the connection o/p stream
*/