TCL / Braze Endpoints / Monthly Active Users for Last 30 Days
Back to Collection Items
load ./chilkat.dll
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set http [new_CkHttp]
set queryParams [new_CkJsonObject]
CkJsonObject_UpdateInt $queryParams "length" 7
CkJsonObject_UpdateString $queryParams "ending_at" "2018-06-28T23:59:59-05:00"
CkJsonObject_UpdateString $queryParams "app_id" "{{app_identifier}}"
# Adds the "Authorization: Bearer {{api_key}}" header.
CkHttp_put_AuthToken $http "{{api_key}}"
# resp is a CkHttpResponse
set resp [CkHttp_QuickRequestParams $http "GET" "https://rest.iad-01.braze.com/kpi/mau/data_series" $queryParams]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
puts [CkHttp_lastErrorText $http]
delete_CkHttp $http
delete_CkJsonObject $queryParams
exit
}
puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp
delete_CkHttp $http
delete_CkJsonObject $queryParams
Curl Command
curl -G -d "length=7"
-d "ending_at=2018-06-28T23%3A59%3A59-05%3A00"
-d "app_id=%7B%7Bapp_identifier%7D%7D"
-H "Authorization: Bearer {{api_key}}"
https://rest.iad-01.braze.com/kpi/mau/data_series
Postman Collection Item JSON
{
"name": "Monthly Active Users for Last 30 Days",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{api_key}}",
"type": "text"
}
],
"url": {
"raw": "https://{{instance_url}}/kpi/mau/data_series?length=7&ending_at=2018-06-28T23:59:59-05:00&app_id={{app_identifier}}",
"protocol": "https",
"host": [
"{{instance_url}}"
],
"path": [
"kpi",
"mau",
"data_series"
],
"query": [
{
"key": "length",
"value": "7",
"description": "(Required) Integer\n\nMax number of days before ending_at to include in the returned series - must be between 1 and 100 inclusive"
},
{
"key": "ending_at",
"value": "2018-06-28T23:59:59-05:00",
"description": "(Optional) DateTime (ISO 8601 string)\n\nPoint in time when the data series should end - defaults to time of the request"
},
{
"key": "app_id",
"value": "{{app_identifier}}",
"description": "(Optional) String\n\nApp API identifier; if excluded, results for all apps in app group will be returned"
}
]
},
"description": "This endpoint allows you to retrieve a daily series of the total number of unique active users over a 30-day rolling window.\n\n## Response\n\n```json\nContent-Type: application/json\nAuthorization: Bearer YOUR-REST-API-KEY\n{\n \"message\": (required, string) the status of the export, returns 'success' when completed without errors,\n \"data\" : [\n {\n \"time\" : (string) date as ISO 8601 date,\n \"mau\" : (int)\n },\n ...\n ]\n}\n```"
},
"response": [
]
}