BrazeEx.Api.ExportSessionAnalytics (braze_ex v1.0.22)

API calls for all endpoints tagged ExportSessionAnalytics.

Link to this section Summary

Functions

Export App Sessions by Time

Use this endpoint to retrieve a series of the number of sessions for your app over a designated time period.

Link to this section Functions

Link to this function

sessions_data_series_get(connection, opts \\ [])

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

export-app-sessions-by-time

Export App Sessions by Time

Use this endpoint to retrieve a series of the number of sessions for your app over a designated time period.

Note: If you are using our older navigation, segment_id can be found at Developer Console > API Settings.

To use this endpoint, you’ll need to generate an API key with the sessions.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",
          "sessions" : (int)
      },
      ...
  ]
}

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):
    • :length (integer()): (Required) Integer Max number of days 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.
    • :segment_id (String.t): (Required) String See Segment API identifier. Segment ID indicating the analytics-enabled segment for which sessions should be returned.

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure