BrazeEx.Api.ExportCustomEvents (braze_ex v1.0.1)
API calls for all endpoints tagged ExportCustomEvents
.
Link to this section Summary
Functions
Custom Events Analytics
This endpoint allows you to retrieve a series of the number of occurrences of a custom event in your app over a designated time period.
Custom Events List
This endpoint allows you to export a list of custom events that have been recorded for your app. The event names are returned in groups of 250, sorted alphabetically.
Link to this section Functions
events_data_series_get(connection, opts \\ [])
@spec events_data_series_get( Tesla.Env.client(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
custom-events-analytics
Custom Events Analytics
This endpoint allows you to retrieve a series of the number of occurrences of a custom event in your app over a designated time period.
rate-limit
Rate limit
We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.
response
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",
"count" : (int)
},
...
]
}
fatal-error-response-codes
Fatal error response codes
The following status codes and associated error messages will be returned if your request encounters a fatal error. Any of these error codes indicate that no data will be processed.
Error Code | Reason / Cause |
---|---|
400 Bad Request | Bad Syntax |
401 Unauthorized | Unknown or missing REST API Key |
429 Rate Limited | Over rate limit |
5XX | Internal server error, you should retry with exponential backoff |
Tip: For help with CSV and API exports, visit Export troubleshooting.
parameters
Parameters
connection
(BrazeEx.Connection): Connection to serveropts
(keyword): Optional parameters:authorization
(String.t)::event
(String.t): (Required) String The name of the custom event for which to return analytics.:length
(integer()): (Required) Integer Maximum number of units (days or hours) beforeending_at
to include in the returned series. Must be between 1 and 100 (inclusive).:unit
(String.t): (Optional) String Unit of time between data points - can beday
orhour
, defaults today
.:ending_at
(String.t): (Optional) Datetime (ISO 8601 string) Date on which the data series should end. Defaults to time of the request.:app_id
(String.t): (Optional) String App API identifier retrieved from the Developer Console to limit analytics to a specific app.:segment_id
(String.t): (Optional) String See Segment API identifier. Segment ID indicating the analytics-enabled segment for which event analytics should be returned.
returns
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure
events_list_get(connection, opts \\ [])
@spec events_list_get( Tesla.Env.client(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
custom-events-list
Custom Events List
This endpoint allows you to export a list of custom events that have been recorded for your app. The event names are returned in groups of 250, sorted alphabetically.
rate-limit
Rate limit
For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the /purchases/product_list
endpoint, as documented in API rate limits.
response
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,
"events" : [
"Event A",
"Event B",
"Event C",
...
]
}
fatal-error-response-codes
Fatal error response codes
The following status codes and associated error messages will be returned if your request encounters a fatal error. Any of these error codes indicate that no data will be processed.
Error Code | Reason / Cause |
---|---|
400 Bad Request | Bad Syntax |
401 Unauthorized | Unknown or missing REST API Key |
429 Rate Limited | Over rate limit |
5XX | Internal server error, you should retry with exponential backoff |
Tip: For help with CSV and API exports, visit Export troubleshooting.
parameters
Parameters
connection
(BrazeEx.Connection): Connection to serveropts
(keyword): Optional parameters:authorization
(String.t)::page
(integer()): (Optional) Integer The page of event names to return, defaults to 0 (returns the first set of up to 250).
returns
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure