Menu
Amazon Mobile Analytics
User Guide

Filtering Query Results

You can filter the data provided in a ResultSet based on optional parameters you specify when querying the data.

Filtering Query Results by Platform

You can filter the query results to include only the data for a particular app platform, such as Android, by including the following filter parameter in your URL:

Copy
platform=<filter>

You can use the following values for the filter:

  • android

  • iphoneos

  • kindle

  • windowsphone

  • blackberry

  • macos

  • windows

  • linux

For example, here is a query URL you would use to filter the data in the returned ResultSet for the iOS platform:

Copy
https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/apps/<YOUR APP ID>/kpis/new-users/lifetime-count?platform=iphoneos

You can filter on more than one platform at a time by using a query parameter like this one:

Copy
?platform=<android>,<iphoneos>,<windowsphone>

Filtering Query Results by Date Range

You can filter the query results to include only the data for a range of dates by including the following filter parameter in your URL:

Copy
start=<start date>&end=<end date>

Here is an example of filtering a query by specifying a date range:

Copy
https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/apps/<YOUR APP ID>/kpis/dau/count?start=2014-11-20&end=2014-12-11

Not specifying a date range applies a default filter that includes data for the last 30 days. Lifetime KPIs ignore this filter and will have no effect on the result.

Filtering Query Results by Relative Date

You can filter the query results to include only the data for a relative date. Here are the filter patterns you can use when specifying relative dates:

  • n-days-ago

  • n-weeks-ago

  • n-months-ago

  • today

Here is an example of filtering a query by specifying a relative start date and the current date for the end date:

Copy
https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/apps/<YOUR APP ID>/kpis/dau/count?start=3-days-ago&end=today

Combining Query Parameters

You can combine different query parameters using the ampersand (&) symbol, as shown in this example:

Copy
https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/apps/<YOUR APP ID>/kpis/dau/count?platform=android&start=2014-11-20&end=2014-12-11

Grouping Data Per Platform

To group the ResultSet by platform, you can append the following query parameter to the end of the URL:

Copy
?group-by=platform

Here is an example of a query that returns data values per platform:

Copy
https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/apps/<YOUR APP ID>/kpis/new-users/lifetime-count?group-by=platform