Hi,
To get the interface model handles, you would first need to query the device model:
http://spock:8080/spectrum/restful/associations/relation/0x10004/model/0xdevHandle?side=left
This will list all the model handles of the 'has_members' relation to the device (interfaces)
You will then need to iterate through the list of model handles and use that to query the interface info.
I found the easiest way to do this is to use the VNM Shell to find out what the attribute id's are:
./opt/spectrum/vnmsh/connect
./opt/spectrum/vnmsh/show attributes mh=0x70029d4
If the model handle you show is an interface model you should get a long list of attributes with their values:
[spectboy@speccy vnmsh]$ ./show attributes mh=0x211591
Id Name Iid Value
0x10000 Modeltype_Name Gen_IF_Port
0x10001 Modeltype_Handle 0x220011
0x10004 Contact_Status 1
0x10009 Security_String SEC1
0x1000a Condition 0
0x1000b Condition_Value 0
0x1000c Value_When_Yellow 1
0x1000d Value_When_Orange 3
0x1000e Value_When_Red 7
0x1000f Composite_Condition 0
0x10010 Yellow_Threshold 3
0x10011 Orange_Threshold 6
0x10012 Red_Threshold 10
0x10013 Rollup_Condition 0
0x10023 Agent_Port 161
0x10024 Community_Name #v2/c0mmStr1n9
The list is a log longer but if you find an attribute you like you can just add '&attr=<val1>&attr=<val2>' etc
just keep adding '&attr=<val>' for each attribute you want to add in the URL you feed the REST API.
You should get something similar to:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<model-response-list xmlns="http://www.ca.com/spectrum/restful/schema/response" error="EndOfResults" throttle="1" total-models="1">
<model-responses>
<model mh="0x211591">
<attribute id="0x10004">1</attribute>
<attribute id="0x129e0">FastEthernet0</attribute>
<attribute id="0x11f7e"></attribute>
<attribute id="0x110df">00:11:22:33:44:55</attribute>
<attribute id="0x12d7f">1.1.100.79</attribute>
<attribute id="0x11990">100000000</attribute>
</model>
</model-responses>
</model-response-list>
Hope this helps!
Regards,
Frank