cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1352
Views
0
Helpful
8
Replies

Prime Infrastructure API list of "appId"

pematthe
Level 1
Level 1

In the PI API, specifically the "GET statisticsService" area there is a query switch to list appId.  "The application Id. Use comma to seperate multiple ids."

The example shows appId 1234 and 5678 which obviously does not work. - does anybody know how to list the known applicationIDs?  Is there an API call to list the appId?  

 

The reason, and it could be I am looking in the wrong place for the information I need, is that I want to be able to list the application traffic by volume and the the bit/bytes for each network application (ssl, http, ms-services etc.etc.etc.) but I would like to list an application and find out how many clients are generating it.  ssl = 20 clients, https = 90 clients, apple-services=15 clients - that sort of thing.  

8 Replies 8

marce1000
VIP
VIP

Ref : https://developer.cisco.com/media/prime-infrastructure/api-reference/szier-m8-106.cisco.com/webacs/api/v1/indexcc3b.html?_docs

GET Application Top N Traffics
Retrieves the top N clients or server traffic statistics of an application or all applications. Here are the sample queries
  • /op/statisticsService/application/topNTraffics -- return the top 15 client traffics of all applications in the past 1 hour
  • /op/statisticsService/application/topNTraffics?nodeType=server -- return the top 15 server traffics of all applications in the past 1 hour
  • /op/statisticsService/application/topNTraffics?networkAwareType=2 -- return the top 15 client wired traffics of all applications in the past 1 hour
  • /op/statisticsService/application/topNTraffics?appId=1234 -- return the top 15 client traffics of the application with id 1234 in the past 1 hour
  • /op/statisticsService/application/topNTraffics?appId=1234,5678 -- return the top 15 client traffics of of the application with id 1234 and 5678 in the past 1 hour

M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Yes, this is from the documentation.  I am looking to find a way of finding the list of the 'appID' values to use in the URL.  I have tried using the appIDs from the NBAR2 application list on the WLC - 

 

(Cisco Controller) >show avc applications

Application-Name App-ID Engine-ID Selector-ID Application-Group-Name
================ ====== ========= =========== ======================
3com-amp3      538      3      629 other
3com-tsmux     977      3      106 obsolete
3pc                   788      1      34

etc.

 

but that doesn't get any values back for application I know have traffic.

 

  - Which version of Prime are you using ?

M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

PI 3.1

 

 - There are a number of resolved caveats in the 3.2 Release Notes concerning  the API ; the most notable on I see for the moment is :

CSCuz60426

Intermittent 401 and 403 errors when accessing Prime Infrastructure API.

 

                - As usual, worth trying, but you need to allocate time in order to upgrade

M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

I'm not seeing error 401,403. I just cannot use the 'appID' switch in the URL to get useful values back as I don't know what 'appID' to use. Without filtering, 'appId=0' I get:
<mgmtResponse responseType="operation" requestUrl="https://192.168.xx.yy/webacs/api/v1/op/statisticsService/application/trafficAnalysis?range=1&amp;type=1&amp;appId=0" rootUrl="https://192.168.xx.yy/webacs/api/v1/op">
<statisticsDTO>
<childStatistics>
<childStatistic>
<childStatistics/>
<statisticEntries>
<statisticEntry>
<attributeName>labelValue1</attributeName>
<displayName>Label Value 1</displayName>
<entryValue>inBits: 1924.81</entryValue>
</statisticEntry>
<statisticEntry>
<attributeName>labelValue2</attributeName>
<displayName>Label Value 2</displayName>
<entryValue>outBits: 2082.26</entryValue>
</statisticEntry>
<statisticEntry>
<attributeName>labelValue3</attributeName>
<displayName>Label Value 3</displayName>
<entryValue>inPackets: 5.08</entryValue>
</statisticEntry>
<statisticEntry>
<attributeName>labelValue4</attributeName>
<displayName>Label Value 4</displayName>
<entryValue>outPackets: 5.76</entryValue>

If I use appId 1234 or any other 4 digit combination, the response is similar format but there are no values provided or values = 0

 

 - Do you have application visibility enabled for the particular SSID's on the controller;

 - Perhaps Prime needs sufficient licensing and or do you have an Assurance license for cisco prime ?

M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Yes, AVC is enabled. In other Prime API calls I can get a list of applications by name and the data seen. The info is there, I just cannot get a response via the 'appId' query.

Review Cisco Networking for a $25 gift card