App Sessions by Time
GET https://{{instance_url}}/sessions/data_series?length=14&unit=day&ending_at=2018-06-28T23:59:59-5:00&app_id={{app_identifier}}&segment_id={{segment_identifier}}
This endpoint allows you to retrieve a series of the number of sessions for your app over a designated time period.
Components Used
Response
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"message": (required, string) the status of the export, returns 'success' when completed without errors,
"data" : [
{
"time" : (string) point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
"sessions" : (int)
},
...
]
}
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
length | number | (Required) Integer |
Max number of units (days or hours) before ending_at to include in the returned series - must be between 1 and 100 inclusive. |
| unit
| string | | (Optional) String
Unit of time between data points - can be "day" or "hour" (defaults to "day"). |
| ending_at
| string | | (Optional) DateTime (ISO 8601 string)
Point in time when the data series should end - defaults to time of the request. |
| app_id
| string | | (Optional) String
App API identifier retrieved from the Developer Console to limit analytics to a specific app. |
| segment_id
| string | | (Optional) String
Segment API identifier indicating the analytics enabled segment for which sessions should be returned. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string |