How can I use Java Webservices REST API to see connectivity information for devices?

Document ID : KB000044372
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

This is a tech doc detailing how Java Webservices REST API can be used to see connectivity information for devices.

Question:

How can I use Java Webservices REST API to see connectivity information for devices?

Environment:

Any

Answer:

Use of REST API for topology:

1.                 You can get connectivity information from the Java Webservices REST API is use the following URL:

http://localhost/spectrum/restful/connectivity/<ip_address>

Note: If the port is not the default HTTP port of 80 you will need to add that for example: 

http://localhost:81/spectrum/restful/connectivity/<ip_address>

This uses the GET http method.

2.                 Where the IP address would be the ip address of a device. This will show you the connectivity for that device.

3.                 You can also use the following URL to get the network address attribute:

http://localhost/spectrum/restful/devices?attr=0x1006e&attr=0x102d7f

This URL uses the GET method as well. This will return the model name and network address for each device. Then you can take each device IP and use the connectivity URL to get the connectivity for each device.