On the WebTuna Activity screen the table of results in the lower part of the screen shows the Top 500records by default. In most circumstances this is more than enough and, in fact, your result set will not be as large as this in most cases. For views such as Browser, Operating System, Country or Continent, for example, the maximum number would be a few hundred results at most.
Going beyond 500
There are cases however, where the number could exceed 500. Take views such as Username, Path or Client IP, where for larger sites there could well be more than 500 of these. For those cases we have a drop-down where you can select 1,000, 2,000, 5,000 or 10,000 as the maximum number of results returned.
Going beyond 10000
But what about cases where you need more than 10,000 records? That is normally a rare occurrence since the items in the top 10,000 would normally be the ones of most interest, however we do hear about use cases where having a list of more than 10,000 can be useful. One common example is for customers looking at user adoption of an application where there is a need to see all users that have accessed the application within a month. For larger organisations the number of users may well exceed 10,000.
REST API to the rescue
Thankfully there is a simple solution. That is to use the WebTuna API. We have written about using the API in the past with some examples. And there is full documentation available at http://docs.webtuna.com/display/docs/REST+API if you want to explore it in more detail.
The first thing you will need is your WebTuna username and API Key which can be found on the Password screen in my.webtuna.com.
Example: Getting all users
The API call below will get all users who have accessed the home page using Internet Explorer 11 within the last day. In this example the total number of users in our organisation is 40,000 so we have set a limit of 50,000 to make sure we get all users that might have accessed the application in question.
Breaking down the API request into it’s parts.
- /rest/v1/activity/user (means that we want a list of users and their activity)
- ?from=2017-05-23 000:00:00 (start date)
- &to=2017-05-24 00
:00:00 (end date)
- &path=/Pages/Home.aspx (filter on the home page URL)
browserfamily=IE (filter on browser of Internet Explorer)
n=11.0 (filter on browser version 11.0)
- &limit=50000 (set our limit higher than 10,000)
The data returned is in JSON format. If you would like to load this into Excel there are a number of JSON to CSV converters available online. However if you have the latest version of Excel 2016 updated since April this year then you can now import JSON directly into Excel. In fact you can point Excel directly at the WebTuna API URL above and have the data come directly into an Excel Workbook. Look out for an upcoming blog post on that.