Prime Central for HCS Web Service

The Prime Central for HCS Web service provides SOAP APIs for subscribing to events and retrieving event related information.

You can find the details for working with the The Prime Central for HCS Web Service in the Prime Central for HCS Programmers Guide. Some of the supported APIs include:

  • authenticate
  • getActiveEventCount
  • getActiveEvents
  • getArchivedEvents
  • getArchivedEventsCount
  • getEvent
  • getOperationalData
  • subscribe
  • unSubscribe

Get the WSDL

The Prime Central for HCS Web Service WSDL is available at:
https://<prime-central-ip-address>:9090/EventManagement?wsdl

Details of the APIs are described in the programmer's guide.

Authentication

You must call the authenticate API to obtain a session token which will be used to authenticate the rest of your HCS Assurance API calls. Use the Prime Central admin username and password in the authenticate API call.

Here is an example request/response for the authenticate API.

authenticate Example Request/Response

Request Response
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<strong style="font:'Courier New', Courier, monospace; font-size:14px;">
<table class="tablesorter" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border-right-color:#6ce26c; border-right-width:thick; border-left-style:none; border-bottom-style:none; border-top-style:none "><span style="color:#999;">1</span>
<span style="color:#999;">2</span>
<span style="color:#999;">3</span>
<span style="color:#999;">4</span>
<span style="color:#999;">5</span>
<span style="color:#999;">6</span>
<span style="color:#999;">7</span>
<span style="color:#999;">8</span>
<span style="color:#999;">9</span>
</td>
<td style="border-right-style: none; border-left-style:none; border-bottom-style:none; border-top-style:none "><<span style="color:#009;">soapenv:Envelope</span> <span style="color:#999;">xmlns:soapenv</span>=<span style="color:#09F;">"http://schemas.xmlsoap.org/soap/envelope/" </span> <span style="color:#999;">xmlns:fron</span>=<span style="color:#09F;">"http://fronthandler.hcm.cisco.com/"</span>>
<<span style="color:#009;">soapenv:Header</span>/>
<<span style="color:#009;">soapenv:Body</span>>
<<span style="color:#009;">fron:authenticate</span>>
<<span style="color:#009;">username</span>>admin</<span style="color:#009;">username</span>>
<<span style="color:#009;">password</span>>password</<span style="color:#009;">password</span>>
</<span style="color:#009;">fron:authenticate</span>>
</<span style="color:#009;">soapenv:Body</span>>
</<span style="color:#009;">soapenv:Envelope</span>></td></tr></tbody></table></strong>

Using the Where Clause for Filters

Many of the Prime Central for HCS Web Service APIs including the subscribe API allow you to use a where clause to create a filter. For example:

getArchivedEventCount Example Request/Response

Request Response
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<strong style="font:'Courier New', Courier, monospace; font-size:14px;">
<table class="tablesorter" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border-right-color:#6ce26c; border-right-width:thick; border-left-style:none; border-bottom-style:none; border-top-style:none "><span style="color:#999;">1</span>
<span style="color:#999;">2</span>
<span style="color:#999;">3</span>
<span style="color:#999;">4</span>
<span style="color:#999;">5</span>
<span style="color:#999;">6</span>
<span style="color:#999;">7</span>
<span style="color:#999;">8</span>
<span style="color:#999;">9</span>
</td>
<td style="border-right-style: none; border-left-style:none; border-bottom-style:none; border-top-style:none "><<span style="color:#009;">soapenv:Envelope</span> <span style="color:#999;">xmlns:soapenv</span>=<span style="color:#09F;">"http://schemas.xmlsoap.org/soap/envelope/"</span><span style="color:#999;">xmlns:fron</span>=<span style="color:#009;">"http://fronthandler.hcm.cisco.com/"</span>>
<<span style="color:#009;">soapenv:Header</span>/>
<<span style="color:#009;">soapenv:Body</span>/>
<<span style="color:#009;">fron:getArchivedEventCount</span>>
<<span style="color:#009;">whereClause</span>>type=1</<span style="color:#009;">whereClause</span>>
<<span style="color:#009;">sessionToken</span>>session_563</<span style="color:#009;">sessionToken</span>>
</<span style="color:#009;">fron:getArchivedEventCount</span>>
</<span style="color:#009;">soap:Body</span>>
</<span style="color:#009;">soap:Envelope</span>></td></tr></tbody></table></strong>

Examples of the whereclause

For more information on the fields, see NBI Event Format.

Specifying filter for GetEvents

  • Verify method getActiveEvents using filter whereClause = DeviceId (example, send only events originated by specific CUCM)
    <whereClause>Node='CUCM-1'</whereClause>
  • Verify method getActiveEvents using filter whereClause = Severity (example, send only critical Prime Central for HCS events)
    <whereClause>Severity=5</whereClause>
  • Verify method getActiveEvents using filter whereClause = Event status (cleared) (example, send only cleared events)
    <whereClause>type=2</whereClause>
  • Verify method getActiveEvents using filter whereClause = Event status (active) (example, send only active events)
    <whereClause>type=1</whereClause>

Specifying filter for Subscription

  • Verify method getActiveEvents using filter whereClause = DeviceId (example, send only events originated by specific CUCM)
    <whereClause>CauseType=1</whereClause>
  • Verify method getActiveEvents using filter whereClause = Severity (example, send only critical Prime Central for HCS events)
    <whereClause>CauseType=2</whereClause>

Back to Top

Subscribe to receive the latest news and updates