Introduction
This article explains how to use the Raw App Metrics End Point to acquire information about app usage.
App47 APIv2 Daily App Usage Metrics
The Daily App Usage Metrics end point allows you to retrieve daily-averaged data for a specific app. You must have the proper permissions in your account in order to access this end point with your member token.
To use this API you must have at least read permission to the app you are requesting raw metrics.
URL | Description |
---|---|
/apps/:app_id/daily_sessions | Aggregated daily session metrics. Session counts and duration by various deminsions. |
/apps/:app_id/daily_net_new | Aggregated daily net new metrics. Net new app agent counts by vapors dimensions. |
/apps/:app_id/daily_geo | Aggregated daily GEO metrics. Session counts and duration by geography, country, state and postal code. |
/apps/:app_id/daily_active_users | Aggregated daily active users metrics. Active users (daily, weekly, monthly) counts by various dimensions. |
For more information on how to configure your APIv2 calls, please consult the APIv2 Overview.
Parameters
When fetching daily usage metrics, the input parameters in the following table are available through the API. If the parameter is only available on certain end points, it will be noted in the Type(s) column.
Parameter Name | Type(s) | Description | Default |
---|---|---|---|
end | All | The end time to retrieve records. Time should be passed in ISO 8601 format, e.g., 2014-06-19T20:24:48+00:00 | Now |
start | All | The start time to retrieve records. Time should be passed in ISO 8601 format, e.g., 2014-06-19T20:24:48+00:00 | Two weeks prior to end time |
metric | All | Select either "count" or "duration" if available. | count |
dimension | All |
Number of records to skip.
|
overall |
dimension_filters | All | An array of values to filter the dimensional result. I.e., if choosing dimension=platform, adding dimension_filters=[iOS] will only return iOS results. | empty array |
Daily Sessions
This end point allows you to retrieve averaged daily session data for a given app.
End Point
GET https://cirrus.app47.com/api/v2/apps/:app_id/daily_sessions
Example: default request
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_sessions
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with items listed as Timestamps and Total. The former contains the list of date (or date/time) values matching the values in the Total.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"Total": [22,5,26,3,6,1,0,23,3,15,1,0,0,0],
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
If invalid, it will return a result with:
-
Success set to false
-
A message indicating the error
-
A md5 has of the results element
-
HTTP result code that is *not* 200
{ "results": { "message":"Invalid date", "success":false }, "md5":"896d94e5e2f4eb6b6bfa19144c7794e5" }
Example: return counts by model
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_sessions?dimension=model
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with one item labeled Timestamps, and other items bearing the names of the models on which this app has run. The Timestamps contains the list of date (or date/time) values matching the values in each of the by-model data sets.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"iPadMini2":[26,5,6,3,6,1,0,2,3,15,1,0,0,0],
"iPhone4s":[22,5,26,3,6,1,0,3,3,15,1,0,2,0],
"iPhone5":[2,5,2,3,6,1,0,23,3,5,1,3,0,0],
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
Daily Net New
Retrieve averaged daily net new data for a given app
End Point
GET https://cirrus.app47.com/api/v2/apps/:app_id/daily_net_new
Example: default request
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_net_new
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with one item labeled Timestamps, and two other items for Net New and Returning. The Timestamps contains the list of date (or date/time) values matching the values in the two categories of new and returning users.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"Net New":[0,0,0,0,0,0,0,0,0,0,1,0,0,0],
"Returning":[1,1,1,1,1,1,0,1,1,2,1,0,0,0],"
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
If invalid, it will return a result with:
-
Success set to false
-
A message indicating the error
-
A md5 has of the results element
-
HTTP result code that is *not* 200
{ "results": { "message":"Invalid date", "success":false }, "md5":"896d94e5e2f4eb6b6bfa19144c7794e5" }
Example: return counts by model
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_net_new?dimension=model
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with one item labeled Timestamps, and other items bearing the names of the models on which this app has run. The Timestamps contains the list of date (or date/time) values matching the values in each of the by-model data sets.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"iPadMini2":[0,1,0,0,0,0,0,0,0,0,1,0,3,0],
"iPhone4s":[0,0,0,2,0,0,0,0,0,0,1,0,0,1],
"iPhone5":[0,0,0,1,0,0,0,0,0,0,1,0,1,0],
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
Daily GEO Sessions
You are able to retrieve averaged daily sessions by geographical location for a given app.
For this URL, values for metric can be:
- count
- average
- daily_active_users
- weekly_active_users
- monthly_active_users
Values for dimension can be:
- country
- state
- postal_code
Lastly for this URL, the use of the dimension_values parameter will be used when choosing the dimension of state or postal code. For instance, to obtain a list of values for the US, the URL would be
https://cirrus.app47.com/api/v2/apps/:app_id/daily_geo?dimension=state&dimension_values=["US"]
End Point
GET https://cirrus.app47.com/api/v2/apps/:app_id/daily_geo
Example: default request
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_geo
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with items for Timestamps, and any locations that you've included. The Timestamps value contains the list of date values (or date/time values) matching the values in each location's data set.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"United States":[22,5,26,3,6,1,0,23,3,15,1,0,0,0],
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
If invalid, it will return a result with:
-
Success set to false
-
A message indicating the error
-
A md5 has of the results element
-
HTTP result code that is *not* 200
{ "results": { "message":"Invalid date", "success":false }, "md5":"896d94e5e2f4eb6b6bfa19144c7794e5" }
Example: return states for US
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_geo?dimension=country&dimension_values=["US"]
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with items for Timestamps, and any locations that you've included. The Timestamps value contains the list of date values (or date/time values) matching the values in each location's data set.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"Virginia":[0,1,0,0,0,0,0,0,0,0,1,0,3,0],
"Maryland":[0,0,0,2,0,0,0,0,0,0,1,0,0,1],
"North Carolina":[0,0,0,1,0,0,0,0,0,0,1,0,1,0],
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
Daily Active Users
Retrieve averaged daily active users (daily, weekly, monthly) data for a given app
For this URL, allowed value for metric can be:
- overall
- daily_active_users
- weekly_active_users
- monthly_active_users
End Point
GET https://cirrus.app47.com/api/v2/apps/:app_id/daily_active_users
Example: default request
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_active_users
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with items for Timestamps, and the specified categories of users. The Timestamps value contains the list of date values (or date/time values) matching the values in each category's data set.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"Daily Active Users":[1,1,1,1,1,1,0,1,1,2,1,0,0,0],
"Weekly Active Users":[1,1,1,1,1,1,1,1,1,2,2,2,2,2],
"Monthly Active Users":[1,1,1,1,1,1,1,1,1,2,2,2,2,2],
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
If invalid, it will return a result with:
-
Success set to false
-
A message indicating the error
-
A md5 has of the results element
-
HTTP result code that is *not* 200
{ "results": { "message":"Invalid date", "success":false }, "md5":"896d94e5e2f4eb6b6bfa19144c7794e5" }
Example: return daily active users by model
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_active_users?metric=daily_active_users&dimension=model
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Results - A hash of available data sets with items for Timestamps, and the by-model categories. The Timestamps value contains the list of date values (or date/time values) matching the values in each category's data set.
-
A md5 hash of the results element
-
HTTP result code 200
{"results":{
"iPadMini2":[0,1,0,0,0,0,0,0,0,0,1,0,3,0],
"iPhone4s":[0,0,0,2,0,0,0,0,0,0,1,0,0,1],
"iPhone5":[0,0,0,1,0,0,0,0,0,0,1,0,1,0],
"Timestamps":["11/11/2016",
"11/12/2016",
"11/13/2016",
"11/14/2016",
"11/15/2016",
"11/16/2016",
"11/17/2016",
"11/18/2016",
"11/19/2016",
"11/20/2016",
"11/21/2016",
"11/22/2016",
"11/23/2016",
"11/24/2016"],
"success":true},
"md5":"aaee2d0de49b3003735e8eeee58707da"}
Comments
0 comments
Please sign in to leave a comment.