Retrieving resource groups – Brocade Network Advisor REST API Guide (Supporting Network Advisor 12.3.0) User Manual
Page 21

Brocade Network Advisor REST API Guide
7
53-1003160-01
Retrieving resource groups
2
The JSON content of the response should look like the following:
{
serverName: "DCM-x3650-103"
serverIp: "10.24.48.103"
}
This response returns the name of the Network Advisor and its IP address.
NOTE
Different tools may display the JSON or XML responses differently.
5. Record the value of the WStoken response header.
In this example, the value of the WStoken field is ghe/4Q//I0EJcxD6UPdO9/fvI94=. You need
this token for all subsequent Network Advisor REST API requests.
NOTE
A client session has a default idle timeout of 10 minutes after which the token is no longer
valid. If you try to use an invalid token, an error message is returned:
errorCode=4009, errorMsg=Invalid token in header
.
Retrieving resource groups
To retrieve resource groups defined in Network Advisor, complete the following steps.
1. Enter the following URI in the URL field:
http://
2. Define the following HTTP request headers.
3. Set the HTTP request method to GET.
4. Send the request.
The following is an example of resource groups returned by Network Advisor:
{
resourceGroups: [16]
0: {
key: "10:00:00:05:33:A6:B6:17"
name: "10:00:00:05:33:A6:B6:17"
type: "FC_FABRIC"
}
1: {
key: "10:00:00:05:1E:DB:1E:1E"
name: "10:00:00:05:1E:DB:1E:1E"
type: "FC_FABRIC"
...
}
TABLE 2
Request headers
Header name
Value
WStoken
The session token header returned after a successful login.
Accept
application/vnd.brocade.networkadvisor+json;version=v1