cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Cisco Community Designated VIP Class of 2020

101
Views
0
Helpful
1
Replies
Beginner

Cisco Prime API: # of connections per SSID

Hello All

 

1. What is the best way to pull # of connections per last 24 hours?

It took 3-4 hours to get everything out of "/v3/data/HistoricalClientCounts.json?.full=true&id=gt(target)&.maxResults=1000" using paged request.  I can alter the get request in a way which would enable me to pull info about specific SSIDs but I guess it will take hours to get the total # of connections and the .json output would be unreadable anyway. Is it possible to leverage DB access instead of API? The DB holds the data anyway as it present in GUI.

 

2. Is it possible to # of connections for past week/month

 

Thank you

 

Best regards,

Jan

 

 

 

 

 

 

1 REPLY 1
Cisco Employee

Re: Cisco Prime API: # of connections per SSID

Hi Jan,

 

If you need to get only number of connections then you can modify API request as following:

/v3/data/HistoricalClientCounts.json?id=gt(target)&.maxResults=1

 

This query will return only one entity without any details. Response will contain total number of connections as "@count" attribute of "queryResponse" object:

{"queryResponse":{"@last":0,"@first":0,"@count":2853,"@type":"HistoricalClientCounts","@requestUrl":"https://pi/webacs/api/v3/data/HistoricalClientCounts?id=gt(1)&.maxResults=1","@responseType":"listEntityIds","@rootUrl":"https://pi/webacs/api/v3/data","entityId":[{"@type":"HistoricalClientCounts","@url":"https://pi/webacs/api/v3/data/HistoricalClientCounts/1451250","$":"1451250"}]}}

It is not possible to obtain # of connections for past/week month as this data is stored in database only for 24 hrs. After that it is completely removed.

 

I wonder how many clients and connections per day? It is expected that this API should not take 3-4 hrs to return data. What is your PI version?

 

 

 

Content for Community-Ad
FusionCharts will render here