- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on ‎12-31-2020 12:33 PM
Introduction
This article contains a recently developed and anonymized update set containing the following:
- A custom Script Include containing the Cisco Prime API functions to query the Cisco Prime system for Wireless Access Point(s) (WAP) and the associated WAP Controllers for these aforementioned Access Points (APs). The programming logic includes the steps to configure the JSON payload for the IRE API call to create both the WAP Controller(s) and APs. Also the AP's reference to its parent WAP Controller is configured as part of the programming logic.
- New Wireless AP Controller table (u_cmdb_ci_wap_controller) is extended from the 'Network Gear' table with the added attribute: Active Access Points (u_active_access_points)
- Added WAP Controller (u_wap_controller) reference (CI) attribute to the Wireless Access Point table
- Outbound REST messages for the integration:
- GET WLAN Controllers
- GET WLAN Controller Details
- GET Access Points
- GET Access Point Details
Note: Use this example to possibly extend the attributes for the Wireless Access Point or WAP Controller tables. Add the associated logic in the script include to configure these additional attributes for the JSON payload prior to the IRE invocation.
Required Manual Configuration (post Update Set Installation)
Create the custom 'Discovery Source':
/*A new discovery_source value for 'CiscoPrimeAPI' is required for the IRE call
(don't manually edit the sys_choice table)...
From System Definition -> Scripts - Background execute the below*/
var dsUtil = new global.CMDBDataSourceUtil();
dsUtil.addDataSource("CiscoPrimeAPI");
Discovery Source (sys_choice.list > match discovery_source) for the cmdb_ci Table:
Create authentication profile:
A default anonymized configuration is provided as an example.
Identify Cisco Prime End Point and MID Server
A default anonymized configuration is provided as an example. All 'end point' records must be modified for the particular site.
Create the scheduled job:
The main function in the script include can be 'called' from a scheduled job, i.e.
new CiscoPrimeIntegration().run();
//new CiscoPrimeIntegration().getWANControllers();
//new CiscoPrimeIntegration().getWirelessAPs();
Example Screen Captures
Log File Entries:
WAP Controller Log Entries (includes IRE input JSON payload):
Wireless Access Point Log Entries (includes IRE input JSON payload):
System Web Services > Outbound > REST Message Records:
REST Message Main Record
REST Message Main Record (default all payloads from Cisco Prime to JSON)
HTTP Methods - GET WLAN Controllers
HTTP Methods - GET WLAN Controller Details
HTTP Methods - GET Access Points (with pagination)
HTTP Methods - GET Access Points (with pagination) #2
HTTP Methods - GET Access Point Details
HTTP Methods - GET Access Point Details #2
Example Cisco Prime JSON payloads:
GET WLAN Controllers Payload (0 to 29 count of EntityIds): An EntityId is required for the WAN Controller Details method.
Note: A similar logic is also applied for a 'page' (1000 EntityIds) of Access Points (APs) whereas each AP EntityId us used to query for the AP's 'full' details. The APs are 'paginated' at 1000 entries per 'Get Access Points' method until all AP EntityIds from the Cisco Prime AP EntityIds table are exhausted.
Resultant JSON payload to create WAP Controller CI via IRE call (script include):
Resultant JSON payload to create Wireless Access Point CI via IRE call and the relation/reference to the AP's WAP Controller (script include):
- 6,160 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi
You list the version as Paris, is there anything in your integration example that is dependent on that version or could this be done on older versions of SN like Orlando or NewYork ?
Thanks
Leland.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi John,
Script Include 'IdentificationEngineScriptableApi' is neither available OOB nor in the provided Update Set. Kindly provide the XML file for the same.
Appreciate your help.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi John, Thanks for this and I have got it up and running.
I have come across one small issue though. The Json im getting back has the following for IP Address and Mac Address:
"ipAddress":{"address":"<IP HERE>"},
"macAddress":{"octets":"<MAC HERE>"},
As such, the data that is added to the ci is as follows: [object Object]
So it would suggest that it is unable to read it from the array.
Have I missed something here, or maybe the Cisco API has changed since you authored this?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Figured it out. Needed to update the script:
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi John!
Thanks a lot.
Question about your 2 screenshots related to log entries: is it the logs of the connection/sync or of the logfile of the Cisco Prime itself (what I'm expecting for Event Management)
Best regards!!
Cedric