Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BD-1470: Add API metrics #3806

Merged
merged 5 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions _docs/_api/endpoints/email/get_list_hard_bounces.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ Authorization: Bearer YOUR-REST-API-KEY
{
"emails": [
{
"email": "example1@braze.com",
"hard_bounced_at": "2016-08-25 15:24:32 +0000"
"email": (string) an email that has hard bounced,
"unsubscribed_at": (string) the time the email hard bounced in ISO 8601
},
{
"email": "example2@braze.com",
"hard_bounced_at": "2016-08-24 17:41:58 +0000"
"email": (string) an email that has hard bounced,
"unsubscribed_at": (string) the time the email hard bounced in ISO 8601
},
{
"email": "example3@braze.com",
"hard_bounced_at": "2016-08-24 12:01:13 +0000"
"email": (string) an email that has hard bounced,
"unsubscribed_at": (string) the time the email hard bounced in ISO 8601
}
],
"message": "success"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ Authorization: Bearer YOUR-REST-API-KEY
{
"emails": [
{
"email": "example1@braze.com",
"unsubscribed_at": "2016-08-25 15:24:32 +0000"
"email": (string) an email that has been unsubscribed,
"unsubscribed_at": (string) the time the email was unsubscribed in ISO 8601
},
{
"email": "example2@braze.com",
"unsubscribed_at": "2016-08-24 17:41:58 +0000"
"email": (string) an email that has been unsubscribed,
"unsubscribed_at": (string) the time the email was unsubscribed in ISO 8601
},
{
"email": "example3@braze.com",
"unsubscribed_at": "2016-08-24 12:01:13 +0000"
"email": (string) an email that has been unsubscribed,
"unsubscribed_at": (string) the time the email was unsubscribed in ISO 8601
}
],
"message": "success"
Expand Down
216 changes: 108 additions & 108 deletions _docs/_api/endpoints/export/campaigns/get_campaign_analytics.md

Large diffs are not rendered by default.

92 changes: 46 additions & 46 deletions _docs/_api/endpoints/export/campaigns/get_campaign_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ 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,
"created_at" : (string) the date created as ISO 8601 date,
"updated_at" : (string) the date last updated as ISO 8601 date,
"archived": (boolean) whether this campaign is archived,
"draft": (boolean) whether this campaign is a draft,
"name" : (string) campaign name,
"description" : (string) campaign description,
"schedule_type" : (string) type of scheduling action,
"channels" : (array) list of channels to send via,
"first_sent" : (string) date and hour of first sent as ISO 8601 date,
"last_sent" : (string) date and hour of last sent as ISO 8601 date,
"tags" : (array) tag names associated with the campaign,
"name" : (string) the campaign name,
"description" : (string) the campaign description,
"schedule_type" : (string) the type of scheduling action,
"channels" : (array) the list of channels to send via,
"first_sent" : (string) the date and hour of first sent as ISO 8601 date,
"last_sent" : (string) the date and hour of last sent as ISO 8601 date,
"tags" : (array) the tag names associated with the campaign,
"messages": {
"message_variation_id": (string) { // <=This is the actual id
"channel": (string) channel type of the message (as in, "email", "ios_push", "webhook", "content_card", "in-app_message", "sms"),
"name": (string) name of the message in the dashboard (eg., "Variation 1")
"channel": (string) the channel type of the message, must be either email, ios_push, webhook, content_card, in-app_message, or sms,
"name": (string) the name of the message in the dashboard (eg., "Variation 1")
... channel-specific fields for this message, see the following messages section ...
}
},
"conversion_behaviors": (array) conversion event behaviors assigned to the campaign, see the following conversions behavior section.
"conversion_behaviors": (array) the conversion event behaviors assigned to the campaign, see the following conversions behavior section.
}
```

Expand All @@ -76,8 +76,8 @@ The `messages` response will contain information about each message. The followi

```json
{
"channel": (string) description of the channel, such as "ios_push" or "android_push"
"alert": (string) alert body text,
"channel": (string) the description of the channel, such as "ios_push" or "android_push"
"alert": (string) the alert body text,
"extras": (hash) any key-value pairs provided
}
```
Expand All @@ -87,11 +87,11 @@ The `messages` response will contain information about each message. The followi
```json
{
"channel": "email",
"subject": (string) subject,
"body": (string) HTML body,
"from": (string) from address and display name,
"reply_to": (string) reply-to for message, if different than "from" address,
"title": (string) name of the email,
"subject": (string) the subject,
"body": (string) the HTML body,
"from": (string) the from address and display name,
"reply_to": (string) the reply-to for message, if different than "from" address,
"title": (string) the name of the email,
"extras": (hash) any key-value pairs provided
}
```
Expand All @@ -100,20 +100,20 @@ The `messages` response will contain information about each message. The followi

```json
{
"type": (string) description of in-app message type, such as "survey",
"type": (string) the description of in-app message type, such as "survey",
"data": {
"pages": [
{
"header":
{
"text":(string) display text for the header of the survey,
"text":(string) the display text for the header of the survey,
}
"choices": [
{
"choice_id": (string) choice identifier,
"text": (string) display text,
"custom_attribute_key": (string) custom attribute key,
"custom_attribute_value": (sting) custom attribute value,
"choice_id": (string) the choice identifier,
"text": (string) the display text,
"custom_attribute_key": (string) the custom attribute key,
"custom_attribute_value": (sting) the custom attribute value,
"deleted": (boolean) deleted from live campaign,
},
...
Expand All @@ -129,7 +129,7 @@ The `messages` response will contain information about each message. The followi
```json
{
"channel": "content_cards",
"name": (string) name of variant,
"name": (string) the name of variant,
"extras": (hash) any key-value pairs provided; only present if at least one key-value pair has been set
}
```
Expand All @@ -139,11 +139,11 @@ The `messages` response will contain information about each message. The followi
```json
{
"channel": "webhook",
"url": (string) URL for webhook,
"body": (string) payload body,
"type": (string) body content type,
"headers": (hash) specified request headers,
"method": (string) HTTP method (e.g., "POST" or "GET"),
"url": (string) the URL for webhook,
"body": (string) the payload body,
"type": (string) the body content type,
"headers": (hash) the specified request headers,
"method": (string) the HTTP method, either POST or GET
}
```

Expand All @@ -152,17 +152,17 @@ The `messages` response will contain information about each message. The followi
```json
{
"channel": "sms",
"body": (string) payload body,
"from": (string) list of numbers associated with the subscription group,
"subscription_group_id": (string) API id of the subscription group targeted in the SMS message
"body": (string) the payload body,
"from": (string) the list of numbers associated with the subscription group,
"subscription_group_id": (string) the API id of the subscription group targeted in the SMS message
}
```

#### Control messages

```json
{
"channel": (string) description of the channel that the control is for,
"channel": (string) the description of the channel that the control is for,
"type": "control"
}
```
Expand All @@ -176,7 +176,7 @@ The `conversion_behaviors` array will contain information about each conversion
```json
{
"type": "Clicks Email",
"window": (integer) number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours
"window": (integer) the number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours
}
```

Expand All @@ -185,7 +185,7 @@ The `conversion_behaviors` array will contain information about each conversion
```json
{
"type": "Opens Email",
"window": (integer) number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours
"window": (integer) the number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours
}
```

Expand All @@ -194,7 +194,7 @@ The `conversion_behaviors` array will contain information about each conversion
```json
{
"type": "Makes Any Purchase",
"window": (integer) number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours
"window": (integer) the number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours
}
```

Expand All @@ -203,8 +203,8 @@ The `conversion_behaviors` array will contain information about each conversion
```json
{
"type": "Makes Specific Purchase",
"window": (integer) number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"product": (string) name of the product, i.e., - "Feline Body Armor"
"window": (integer) the number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"product": (string) the name of the product, i.e., - "Feline Body Armor"
}
```

Expand All @@ -213,8 +213,8 @@ The `conversion_behaviors` array will contain information about each conversion
```json
{
"type": "Performs Custom Event",
"window": (integer) number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"custom_event_name": (string) name of the event, i.e., - "Used Feline Body Armor"
"window": (integer) the number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"custom_event_name": (string) the name of the event, i.e., - "Used Feline Body Armor"
}
```

Expand All @@ -223,8 +223,8 @@ The `conversion_behaviors` array will contain information about each conversion
```json
{
"type": "Upgrades App",
"window": (integer) number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"app_ids": (array|null) array of app ids, i.e., - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
"window": (integer) the number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"app_ids": (array or null) array of app ids, i.e., - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
}
```

Expand All @@ -233,8 +233,8 @@ The `conversion_behaviors` array will contain information about each conversion
```json
{
"type": "Starts Session",
"window": (integer) number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"app_ids": (array|null) array of app ids, i.e., - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
"window": (integer) the number of seconds during which the user can convert on this event, i.e., - 86400, which is 24 hours,
"app_ids": (array or null) array of app ids, i.e., - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
}
```

Expand Down
6 changes: 3 additions & 3 deletions _docs/_api/endpoints/export/campaigns/get_campaigns.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ Authorization: Bearer YOUR-REST-API-KEY
"message": (required, string) the status of the export, returns 'success' when completed without errors,
"campaigns" : [
{
"id" : (string) Campaign API Identifier,
"id" : (string) the Campaign API identifier,
"last_edited": (ISO 8601 string) the last edited time for the message
"name" : (string) campaign name,
"name" : (string) the campaign name,
"is_api_campaign" : (boolean) whether the campaign is an API campaign,
"tags" : (array) tag names associated with the campaign
"tags" : (array) the tag names associated with the campaign formatted as strings
},
...
]
Expand Down
34 changes: 17 additions & 17 deletions _docs/_api/endpoints/export/campaigns/get_send_analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,26 @@ Authorization: Bearer YOUR-REST-API-KEY
"revenue": (float) the number of dollars of revenue (USD),
"unique_recipients": (int) the number of unique recipients,
"conversions": (int) the number of conversions,
"conversions_by_send_time": (int) the number of conversions,
"conversions1": (int, optional) the number of conversions for the second conversion event,
"conversions1_by_send_time": (int, optional) the number of conversions for the second conversion event by send time,
"conversions2": (int, optional) the number of conversions for the third conversion event,
"conversions2_by_send_time": (int, optional) the number of conversions for the third conversion event by send time,
"conversions3": (int, optional) the number of conversions for the fourth conversion event,
"conversions3_by_send_time": (int, optional) the number of conversions for the fourth conversion event by send time
"conversions_by_send_time": (int) the number of conversions attributed to the date the campaign was sent,
"conversions1": (optional, int) the number of conversions for the second conversion event,
"conversions1_by_send_time": (optional, int) the number of conversions for the second conversion event attributed to the date the campaign was sent,
"conversions2": (optional, int) the number of conversions for the third conversion event,
"conversions2_by_send_time": (optional, int) the number of conversions for the third conversion event attributed to the date the campaign was sent,
"conversions3": (optional, int) the number of conversions for the fourth conversion event,
"conversions3_by_send_time": (optional, int) the number of conversions for the fourth conversion event attributed to the date the campaign was sent
}
]
},
"conversions_by_send_time": 0,
"conversions1_by_send_time": 0,
"conversions2_by_send_time": 0,
"conversions3_by_send_time": 0,
"conversions": 0,
"conversions1": 0,
"conversions2": 0,
"conversions3": 0,
"unique_recipients": 1,
"revenue": 0
"conversions_by_send_time": (optional, int),
"conversions1_by_send_time": (optional, int),
"conversions2_by_send_time": (optional, int),
"conversions3_by_send_time": (optional, int),
"conversions": (int),
"conversions1": (optional, int),
"conversions2": (optional, int),
"conversions3": (optional, int),
"unique_recipients": (int),
"revenue": (optional, float)
}
],
"message": "success"
Expand Down
42 changes: 21 additions & 21 deletions _docs/_api/endpoints/export/canvas/get_canvas_analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,39 +50,39 @@ Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"data": {
"name": (string) Canvas name,
"name": (string) the Canvas name,
"stats": [
{
"time": (string) date as ISO 8601 date,
"time": (string) the date as ISO 8601 date,
"total_stats": {
"revenue": (float),
"conversions": (int),
"conversions_by_entry_time": (int),
"entries": (int)
"revenue": (float) the number of dollars of revenue (USD),
"conversions": (int) the number of conversions,
"conversions_by_entry_time": (int) the number of conversions for the conversion event by entry time,
"entries": (int) the number of entries
},
"variant_stats": (optional) {
"00000000-0000-0000-0000-0000000000000": (API identifier for variant) {
"name": (string) name of variant,
"revenue": (int),
"conversions": (int),
"conversions_by_entry_time": (int),
"entries": (int)
"00000000-0000-0000-0000-0000000000000": (string) the API identifier for the variant {
"name": (string) the name of variant,
"revenue": (float) the number of dollars of revenue (USD),
"conversions": (int) the number of conversions,
"conversions_by_entry_time": (int) the number of conversions for the conversion event by entry time,
"entries": (int) the number of entries
},
... (more variants)
},
"step_stats": (optional) {
"00000000-0000-0000-0000-0000000000000": (API identifier for step) {
"name": (string) name of step,
"revenue": (float),
"conversions": (int),
"conversions_by_entry_time": (int),
"00000000-0000-0000-0000-0000000000000": (string) the API identifier for the step {
"name": (string) the name of step,
"revenue": (float) the the number of dollars of revenue (USD),
"conversions": (int) the the number of conversions,
"conversions_by_entry_time": (int) the number of conversions for the conversion event by entry time,
"messages": {
"email": [
{
"sent": (int),
"opens": (int),
"unique_opens": (int),
"clicks": (int),
"sent": (int) the number of sends,
"opens": (int) the number of opens,
"unique_opens": (int) the number of unique opens,
"clicks": (int) the number of clicks
... (more stats)
}
],
Expand Down
Loading