BrazeEx.Api.ExportNewsFeed (braze_ex v1.0.22)

API calls for all endpoints tagged ExportNewsFeed.

Link to this section Summary

Functions

Export News Feed Card Analytics

Use this endpoint to retrieve a daily series of engagement stats for a card over time.

Export News Feed Cards Details

Use this endpoint to retrieve relevant information on a card, which can be identified by the card_id.

Export News Feed Cards List

Use this endpoint to export a list of News Feed cards, each of which will include its name and card API identifier.

Link to this section Functions

Link to this function

feed_data_series_get(connection, opts \\ [])

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

export-news-feed-card-analytics

Export News Feed Card Analytics

Use this endpoint to retrieve a daily series of engagement stats for a card over time.

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

To use this endpoint, you’ll need to generate an API key with the feed.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) the point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
          "clicks" : (int) the number of clicks,
          "impressions" : (int) the number of impressions,
          "unique_clicks" : (int) the number of unique clicks,
          "unique_impressions" : (int) the number of unique impressions
      },
      ...
  ]
}

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):
    • :card_id (String.t): (Required) String See Card API identifier. The card_id for a given card can be found in the Settings > Setup and Testing > API Keys page and on the card details page within your dashboard, or you can use the News Feed List Endpoint.
    • :length (integer()): (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.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.

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

feed_details_get(connection, opts \\ [])

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

export-news-feed-cards-details

Export News Feed Cards Details

Use this endpoint to retrieve relevant information on a card, which can be identified by the card_id.

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

To use this endpoint, you’ll need to generate an API key with the feed.details 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,
  "created_at" : (string) Date created as ISO 8601 date,
  "updated_at" : (string) Date last updated as ISO 8601 date,
  "name" : (string) Card name,
  "publish_at" : (string) Date card was published as ISO 8601 date,
  "end_at" : (string) Date card will stop displaying for users as ISO 8601 date,
  "tags" : (array) Tag names associated with the card,
  "title" : (string) Title of the card,
  "image_url" : (string) Image URL used by this card,
  "extras" : (dictionary) Dictionary containing key-value pair data attached to this card,
  "description" : (string) Description text used by this card,
  "archived": (boolean) whether this Card is archived,
  "draft": (boolean) whether this Card is a draft,
}

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):
    • :card_id (String.t): (Required) String See Card API identifier. The card_id for a given card can be found in the Settings > Setup and Testing > API Keys page and on the card details page within your dashboard, or you can use the News Feed List Endpoint.

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

feed_list_get(connection, opts \\ [])

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

export-news-feed-cards-list

Export News Feed Cards List

Use this endpoint to export a list of News Feed cards, each of which will include its name and card API identifier.

The cards are returned in groups of 100 sorted by time of creation (oldest to newest by default).

To use this endpoint, you’ll need to generate an API key with the feed.list 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,
  "cards" : [
      {
          "id" : (string) Card API Identifier,
          "type" : (string) type of the card - NewsItem (classic cards), CaptionedImage, Banner or DevPick (cross-promotional cards),
          "title" : (string) title of the card,
          "tags" : (array) tag names associated with the card
      },
      ...
  ]
}

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 cards to return, defaults to 0 (returns the first set of up to 100).
    • :include_archived (boolean()): (Optional) Boolean Whether or not to include archived cards, defaults to false.
    • :sort_direction (String.t): (Optional) String - Sort creation time from newest to oldest: pass in the value desc. - Sort creation time from oldest to newest: pass in the value asc. If sort_direction is not included, the default order is oldest to newest.

returns

Returns

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