How can I get neighbour IPs using REST call with Spectrum
book
Article ID: 104959
calendar_today
Updated On:
Products
CA Spectrum
Issue/Introduction
How can I get neighbour IPs using REST call with Spectrum
Environment
Release: Any Component: SPCCSS
Resolution
There are a couple of options:
1. A GET of associations will return associations for a specific relation and model.
URL http://<hostname><:portnumber>/spectrum/restful/associations/relation/<rel_handle>/model/<model_handle>?side={left | right} HTTP Method GET Body None Body Content Not Used Header application/xml, application/json Output XML or JSON listing alarms in the SpectroSERVER or distributed SpectroSERVER
URL Parameters rel_handle Specifies the relation handle. model_handle Specifies the handle of the model in the relation.
2. Use the Connectivity resource to retrieve connectivity information for a specified IP address.
Base URL http://<hostname><:portnumber>/spectrum/restful/connectivity
GET connectivity A connectivity request returns XML describing all the connectivity from a requested end point. URL http://<hostname><:portnumber>/spectrum/restful/connectivity/<ip_address> HTTP Method GET Body None Body Content application/xml, application Header application/xml, application/json Output XML describing the connectivity URL Parameters ip_address Specifies the IP address to retrieve connectivity information for.
Example:
The following URL requests connectivity information for the specified IP address:
The following is returned for the request: ?xml version="1.0" encoding="UTF-8"?> <connection-response-list xmlns="http://www.ca.com/spectrum/restful/schema/response"> <connection-response> <connection-element-left> <ipaddress>172.22.94.134</ipaddress> <mh>0x400538</mh> <name>Stack</name> <type>ExtrDevice</type> <class>Switch-Router</class> </connection-element-left> <connection-element-left> <ipaddress>172.22.94.134</ipaddress> <mh>0x400c52</mh> <name>Stack_1:1</name> <type>ExtrIfPort</type> <class>Port</class> </connection-element-left>