BrazeEx.Api.ExportCustomEvents (braze_ex v1.0.22)

API calls for all endpoints tagged ExportCustomEvents.

Link to this section Summary

Functions

Export Custom Events Analytics

Use this endpoint to retrieve a series of the number of occurrences of a custom event in your app over a designated time period.

Export Custom Events List

Use this endpoint 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

Link to this function

events_data_series_get(connection, opts \\ [])

@spec events_data_series_get(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

export-custom-events-analytics

Export Custom Events Analytics

Use this endpoint to retrieve a series of the number of occurrences of a custom event in your app over a designated time period.

prerequisites

Prerequisites

To use this endpoint, you’ll need an API key with the events.data_series permission.

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

For status codes and associated error messages that will be returned if your request encounters a fatal error, reference Fatal errors & responses.

Tip: For help with CSV and API exports, visit Export troubleshooting.

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (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) before ending_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 be day or hour, defaults to day.
    • :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 API Keys page to limit analytics to a specific app. Note: If you are using our older navigation, app_id can be found at Developer Console > API Settings
    • :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
Link to this function

events_list_get(connection, opts \\ [])

@spec events_list_get(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

export-custom-events-list

Export Custom Events List

Use this endpoint 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.

prerequisites

Prerequisites

To use this endpoint, you’ll need an API key with the events.list permission.

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", (string) the event name,
      "Event B", (string) the event name,
      "Event C", (string) the event name,
      ...
  ]
}

fatal-error-response-codes

Fatal error response codes

For status codes and associated error messages that will be returned if your request encounters a fatal error, reference Fatal errors & responses.

Tip: For help with CSV and API exports, visit Export troubleshooting.

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (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