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

Document created by Declan_Dempsey Employee on Jul 28, 2016Last modified by Declan_Dempsey Employee on Dec 17, 2016
Version 2Show Document
  • View in full screen mode

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

 

Document ID:  TEC1450665

 

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.

3 people found this helpful

Attachments

    Outcomes