<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Prime Infrastructure v2.2 REST API ClientSessions in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582889#M2494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Using Prime Infrastructure v2.2 REST API ClientSessions, working on pulling all the data. When I run the below query in Postman I see 890K records but, I get only 1000 records. How to retreive all the records and also, Is there a date parameter to use with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/webacs/api/v1/data/ClientSessions.json?.full=true&amp;amp;.maxResults=1000&amp;amp;.firstResult=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Feb 2016 19:09:19 GMT</pubDate>
    <dc:creator>praveen.batchu1</dc:creator>
    <dc:date>2016-02-17T19:09:19Z</dc:date>
    <item>
      <title>Prime Infrastructure v2.2 REST API ClientSessions</title>
      <link>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582889#M2494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Using Prime Infrastructure v2.2 REST API ClientSessions, working on pulling all the data. When I run the below query in Postman I see 890K records but, I get only 1000 records. How to retreive all the records and also, Is there a date parameter to use with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/webacs/api/v1/data/ClientSessions.json?.full=true&amp;amp;.maxResults=1000&amp;amp;.firstResult=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2016 19:09:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582889#M2494</guid>
      <dc:creator>praveen.batchu1</dc:creator>
      <dc:date>2016-02-17T19:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Prime Infrastructure v2.2 REST API ClientSessions</title>
      <link>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582890#M2495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1000 records is the maximum page size.&amp;nbsp; You can get all of the client sessions by paging through the results; to do this, increment .firstResult by the value of .maxResults.&amp;nbsp; So in your case, with .maxResults=1000, start .firstResult at 0, then 1000, 2000, 3000, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also combine this with filtering.&amp;nbsp; Since a client session that's finished is unlikely to be updated, finished sessions that you've already captured don't need to be fetched again.&amp;nbsp; So you could filter with sessionStartTime to look for sessions that have started since the last time you polled for sessions, and/or filter with sessionEndTime to look for sessions that have ended since the last time you polled for sessions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 18:23:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582890#M2495</guid>
      <dc:creator>Spencer Zier</dc:creator>
      <dc:date>2016-02-18T18:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Prime Infrastructure v2.2 REST API ClientSessions</title>
      <link>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582891#M2496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much Spencer. The &lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;sessionStartTime&amp;nbsp; is UNIX date format, So it should be filtered using the same format right?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 18:34:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582891#M2496</guid>
      <dc:creator>praveen.batchu1</dc:creator>
      <dc:date>2016-02-19T18:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Prime Infrastructure v2.2 REST API ClientSessions</title>
      <link>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582892#M2497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's pretty close to Unix format; whereas Unix format is &lt;EM&gt;seconds&lt;/EM&gt; since 00:00:00 Jan 1, 1970 UTC-0, our representation is in &lt;EM&gt;milliseconds&lt;/EM&gt;.&amp;nbsp; So if you are using a standard long to String converter, divide the value by 1000 before converting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 21:05:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3582892#M2497</guid>
      <dc:creator>Spencer Zier</dc:creator>
      <dc:date>2016-02-19T21:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Prime Infrastructure v2.2 REST API ClientSessions</title>
      <link>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3933348#M2498</link>
      <description>&lt;P&gt;After struggling to figure out how to actually use this API call effectively I discovered the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My instance of prime is returning&amp;nbsp;6,523,914 sessions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I filter for the apMacAddress it takes about 15 seconds to return the first 100 records.&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is way too long.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I only really care about the currently connected clients.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So using sessionEndTime set to the end of 2099 and the apMacAddress I am able to return all connected clients in under 100ms.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even in the case of one of my heavily loaded AP's with 120ish clients the response is very fast.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is some delay in the reporting from the WLC to Prime, maybe like 10 minutes or so.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Be sure to use the baseMacAddress and not the ethernetMacAddress for the filter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;https://primeserver/webacs/api/v3/data/ClientSessions.json?.full=true&amp;amp;sessionEndTime=eq("4102444800000")&amp;amp;apMacAddress="99:99:99:99:99:99"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 20:25:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-infrastructure-v2-2-rest-api-clientsessions/m-p/3933348#M2498</guid>
      <dc:creator>mltllt</dc:creator>
      <dc:date>2019-10-01T20:25:40Z</dc:date>
    </item>
  </channel>
</rss>

