{"_id":"55ed11410d968e2100de834d","parentDoc":null,"__v":1,"version":{"_id":"55e67aab9cc7c62b00c4a1ed","project":"55e67aaa9cc7c62b00c4a1ea","__v":10,"createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z","categories":["55e67aac9cc7c62b00c4a1ee","55e67b5556007d23005fee7d","55e67b5dde6fef23009480ca","55e680efde6fef23009480db","55e6829485a9741900314e99","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","589b8e1fdbb7cd190026732c","58b8ca5e3265d70f001788d4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"editedParams":true,"project":"55e67aaa9cc7c62b00c4a1ea","user":"55d2bd8e2463351700f67dd7","category":{"_id":"55e67b5dde6fef23009480ca","__v":20,"pages":["55ed06c7023a81170018f163","55ed079b0d968e2100de8339","55ed0b530d968e2100de8345","55ed0bb078319821005005cf","55ed0df94fba582b0036a18a","55ed0e0c4fba582b0036a18d","55ed0ebd8da0b12100e64246","55ed10bec9d5b3350072ae9a","55ed11410d968e2100de834d","55ed118678319821005005d9","55ed121dc9d5b3350072ae9e","55ed12de8da0b12100e6424e","55ed13930d968e2100de8352","55ed140c4fba582b0036a196","55ed1902c9d5b3350072aebb","55ed197bc9d5b3350072aec0","55ee3dba1452cd0d009e5ee9","5600a22f0c703d19009531e1","5600c6b23aa0520d00da0c41","561da674e078f40d00eadd75"],"project":"55e67aaa9cc7c62b00c4a1ea","version":"55e67aab9cc7c62b00c4a1ed","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-02T04:30:21.948Z","from_sync":false,"order":5,"slug":"rest-api","title":"REST API"},"editedParams2":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-07T04:23:29.048Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"# Default parameters (Last Month)\ncurl -X GET -i -u :API_KEY https://api.carnivalmobile.com/v5/stats/sessions","name":""}]},"method":"get","results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n  {\n    \"date\": \"2015-07-25T00:00:00.000+00:00\",\n    \"count\": 23543\n  },\n  {\n    \"date\": \"2015-07-26T00:00:00.000+00:00\",\n    \"count\": 66435\n  },\n  {\n    \"date\": \"2015-07-27T00:00:00.000+00:00\",\n    \"count\": 23542\n  },\n  {\n    \"date\": \"2015-07-28T00:00:00.000+00:00\",\n    \"count\": 35457\n  }\n]"},{"status":401,"language":"json","code":"{\n  \"error\":\"unauthorized\"\n}","name":""},{"status":403,"language":"json","code":"{\n  \"error\":\"your api client does not have the correct roles\"\n}"}]},"settings":"","auth":"required","params":[{"_id":"55ed11410d968e2100de834f","ref":"","in":"query","required":false,"desc":"Beginning date for range","default":"One month ago","type":"datetime","name":"from"},{"_id":"55ed11410d968e2100de834e","ref":"","in":"query","required":false,"desc":"End date for range","default":"now","type":"datetime","name":"to"}],"url":"/stats/sessions"},"isReference":true,"order":17,"body":"## Date Format\n\nThis API endpoint uses the [ISO 8601 DateTime format](https://en.wikipedia.org/wiki/ISO_8601). \n\nExamples:\n\n * `2015-07-25` (Just date)\n * `2015-07-25T00:00:00.000+00:00` (Date, Time, Offset)","excerpt":"Time in app sessions are returned as a feed of DateTime objects with counts next to them. These timestamps represent the beginning of an hour period, and the count is the number of sessions that happened in that hour.","slug":"time-in-app","type":"endpoint","title":"Stats / Time in app"}

getStats / Time in app

Time in app sessions are returned as a feed of DateTime objects with counts next to them. These timestamps represent the beginning of an hour period, and the count is the number of sessions that happened in that hour.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

from:
datetimeOne month ago
Beginning date for range
to:
datetimenow
End date for range

Examples


Result Format


Documentation

## Date Format This API endpoint uses the [ISO 8601 DateTime format](https://en.wikipedia.org/wiki/ISO_8601). Examples: * `2015-07-25` (Just date) * `2015-07-25T00:00:00.000+00:00` (Date, Time, Offset)

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}