Introduction
This article explains how to use the Daily App Log Metrics End Point to acquire information about app usage.
App47 APIv2 Daily App Log Metrics
The Daily App Logs Metrics end point allows you to retrieve daily log counts 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_logs | Aggregated daily log metrics. |
For more information on how to configure your APIv2 calls, please consult the APIv2 Overview.
Parameters
When fetching daily log metrics, the following input parameters 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 |
Daily Logs
Retrieve averaged daily log data for a given app
End Point
GET https://cirrus.app47.com/api/v2/apps/:app_id/daily_logs
Example: default request
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<your app id>>/daily_logss
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 collection of log information. 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":{
"debug":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"info":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"warn":[0,0,0,0,0,0,0,0,0,0,3,0,0,0],
"error":[0,0,0,0,0,0,0,0,0,0,2,0,0,0],
"crash":[0,0,0,0,0,0,0,0,0,0,0,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" }
Comments
0 comments
Please sign in to leave a comment.