02-03-2014 05:08 AM
Hi,
we are using Cisco Prime Infrastructure 2.0 as our central device discovery and inventory for all network equipment. Then we export the database to multiple other systems, primary through the REST API. My question is if anyone have used the PI API to retrive a device interface descriptions?
Looking at the documentation at https://[prime IP]/webacs/api/v1/data/InventoryDetails?_docs you'll see under the value PhysicalPort[] a description field, but it seems like it only get the port name i.e. FastEthernet1/1. Basically the same as the Name field.
Do anyone know how to get the description on an interface through the Cisco PI 2.0 API?
Cheers // Mattias
Solved! Go to Solution.
11-11-2014 02:26 AM
If you haven't found it by now you can use the "Interface Details" API to get the description from a port.
11-12-2014 12:35 AM
Try specifing the full name of the interface, so instead of Gi0/8 write GigabitEthernet0/8 and also no " " in the URL:
https://[URL]/webacs/api/v1/op/statisticsService/interface/details?ipAddress=143.237.147.22&ifName=GigabitEthernet0/8
02-10-2014 10:28 PM
Anyone? Is this the right place to ask about Cisco PI API? If not, do anyone know where to get any good answers?
Because the information is obviously in the database, as i can see it in the GUI.
Cheers!
02-10-2014 10:33 PM
You can access the API information from your own appliance using this link:
https://your-ip-address/webacs/api/v1/
Or download Cisco Prime Infrastructure 2.0 API Reference Guide here :
http://www.cisco.com/en/US/docs/net_mgmt/prime/infrastructure/2.0/APIRef/PI-2.0.zip
-Thanks
Vinod
**Rating Encourages contributors, and its really free. **
02-10-2014 10:40 PM
Thanks for the reply. Of course i have red the manual... But i cant seem to find how to extract the interface description. So i was wondering if anyone have tried this and found a way. But if i do not get any reply i assume that it is not implemented at the moment.
02-10-2014 10:42 PM
Device Interface description was an issue in LMS as well, I am not sure, but it mostly seems not present on the PI as well, so far.
-Thanks
Vinod
**Rating Encourages contributors, and its really free. **
02-10-2014 11:00 PM
Because you would think that GET InventoryDetails -> PhysicalPort -> Description would be it... but no, it shows exactly the same thing as "name"!?
PhysicalPort[] | physicalPort | This nested field provides information about the physical ports associated with this device. | |||||||||||||||||||||
|
03-02-2014 09:02 PM
We have the same problem. Will we get this feature in 2.1?
Thanks.
Alexander
05-21-2014 01:29 AM
Nope, just upgraded to 2.1 and its the same problem. Here is an example output from our Cisco Prime:
11-11-2014 02:26 AM
If you haven't found it by now you can use the "Interface Details" API to get the description from a port.
11-12-2014 12:23 AM
Thanks for the reply. Haven't had much time to look into this in more detail. Im trying to use the "Interface Details" API, but i only get a HTTP 500 return. Looking at the documentation this should be enough:
https://[URL]/webacs/api/v1/op/statisticsService/interface/details?ipAddress="143.237.147.22"&ifName="Gi0/8"
But im not able to get anything back, am i missing something?
11-12-2014 12:35 AM
Try specifing the full name of the interface, so instead of Gi0/8 write GigabitEthernet0/8 and also no " " in the URL:
https://[URL]/webacs/api/v1/op/statisticsService/interface/details?ipAddress=143.237.147.22&ifName=GigabitEthernet0/8
11-12-2014 02:50 AM
This made the trick, and i can see the description. Thanks again! Strange that the documentation includes "".
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide