Sample json response – Brocade Network Advisor REST API Guide (Supporting Network Advisor 12.3.0) User Manual
Page 55

Brocade Network Advisor REST API Guide
41
53-1003160-01
Getting Traffic Flow Performance Data
4
System.out.println("CALLING GET
http://10.24.48.103/rest/resourcegroups/All/fcswitches/10:00:00:05:1E:40:40:00/fl
ows");
/**
* Make the HTTP call
*/
int responseCode = con.getResponseCode();
System.out.println("Response code is " + responseCode);
if (HttpURLConnection.HTTP_SUCCESS != responseCode) {
PRINT_ERROR(con);
assert false : "REST FAILED, responseCode = " + responseCode;
}
} catch (IOException ie) {
System.out.println(ie.toString());
} finally {
if (null != con) {
con.disconnect();
}
}
Sample JSON response
The following is the JSON response.
/**
* Getting the list of flows on a specific switch
*/
CALLING GET
http://10.24.48.103/rest/resourcegroups/All/fcswitches/10:00:00:05:33:13:78:7E/fl
ows
REQUEST HTTPSTATUS = 200
{"flows":[{"key":"fldbid-7","flowDefinitionName":"web_server_flow","featureType":
"MONITOR","srcDevicePorts":["031900"],"destDevicePorts":["011a00"],"srcSwitchPort
":"0/25","destSwitchPort":"","bidirectional":false,"sfid":"","dfid":"","lunIds":[
],"frameSize":0,"framePattern":"","subFlowMd5hash":"","mirrorPort":""},{"key":"fl
dbid-11","flowDefinitionName":"traffic_flow","featureType":"MONITOR","srcDevicePo
rts":["aa01e2"],"destDevicePorts":["031900"],"srcSwitchPort":"","destSwitchPort":
"0/25","bidirectional":false,"sfid":"","dfid":"","lunIds":[],"frameSize":0,"frame
Pattern":"","subFlowMd5hash":"","mirrorPort":""},{"key":"fldbid-8","flowDefinitio
nName":"traffic_flow","featureType":"MONITOR","srcDevicePorts":["aa01e4"],"destDe
vicePorts":["031900"],"srcSwitchPort":"","destSwitchPort":"0/25","bidirectional":
false,"sfid":"","dfid":"","lunIds":[],"frameSize":0,"framePattern":"","subFlowMd5
hash":"","mirrorPort":""},{"key":"fldbid-9","flowDefinitionName":"traffic_flow","
featureType":"MONITOR","srcDevicePorts":["aa01e8"],"destDevicePorts":["031900"],"
srcSwitchPort":"","destSwitchPort":"0/25","bidirectional":false,"sfid":"","dfid":
"","lunIds":[],"frameSize":0,"framePattern":"","subFlowMd5hash":"","mirrorPort":"
"},{"key":"fldbid-12","flowDefinitionName":"traffic_flow","featureType":"MONITOR"
,"srcDevicePorts":["011a00"],"destDevicePorts":["031900"],"srcSwitchPort":"","des
tSwitchPort":"0/25","bidirectional":false,"sfid":"","dfid":"","lunIds":[],"frameS
ize":0,"framePattern":"","subFlowMd5hash":"","mirrorPort":""},{"key":"fldbid-13",
"flowDefinitionName":"traffic_flow","featureType":"MONITOR","srcDevicePorts":["01
1b00"],"destDevicePorts":["031900"],"srcSwitchPort":"","destSwitchPort":"0/25","b
idirectional":false,"sfid":"","dfid":"","lunIds":[],"frameSize":0,"framePattern":
"","subFlowMd5hash":"","mirrorPort":""},{"key":"fldbid-15","flowDefinitionName":"
traffic_flow","featureType":"MONITOR","srcDevicePorts":["fffcaa"],"destDevicePort
s":["031900"],"srcSwitchPort":"","destSwitchPort":"0/25","bidirectional":false,"s
fid":"","dfid":"","lunIds":[],"frameSize":0,"framePattern":"","subFlowMd5hash":""