Skip to content

Exporter le résumé analytique des données de Canvas

get

/canvas/data_summary

Utilisez cet endpoint pour exporter des synthèses de données chronologiques pour un Canvas, fournissant ainsi un résumé concis des résultats du Canvas.

Conditions préalables

Pour utiliser cet endpoint, vous aurez besoin d’une clé API avec l’autorisation canvas.data_summary.

Limite de débit

La limite de débit par défaut de Braze de 250 000 requêtes par heure s’applique à cet endpoint, comme documenté dans Limites de débit de l’API.

Paramètres de requête

Paramètre Requis Type de données Description
canvas_id Requis Chaîne de caractères Voir Identifiant API Canvas.
ending_at Requis Datetime
(chaîne ISO-8601)
Date de fin de l’exportation des données. Par défaut, correspond à l’heure de la requête.
starting_at Facultatif* Datetime
(chaîne ISO-8601)
Date de début de l’exportation des données.

* length ou starting_at est requis.
length Facultatif* Chaîne de caractères Nombre maximal de jours avant ending_at à inclure dans la série renvoyée. Doit être compris entre 1 et 14 (inclus).

* length ou starting_at est requis.
include_variant_breakdown Facultatif Valeur booléenne Indique s’il faut inclure les statistiques des variantes (par défaut false).
include_step_breakdown Facultatif Valeur booléenne Indique s’il faut inclure les statistiques par étape (par défaut false).
include_deleted_step_data Facultatif Valeur booléenne Indique s’il faut inclure les statistiques des étapes supprimées (par défaut false).

Exemple de requête

1
2
curl --location -g --request GET 'https://rest.iad-01.braze.com/canvas/data_summary?canvas_id={{canvas_id}}&ending_at=2018-05-30T23:59:59-05:00&starting_at=2018-05-28T23:59:59-05:00&length=5&include_variant_breakdown=true&include_step_breakdown=true&include_deleted_step_data=true' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'

Réponse

Champs d’événement de conversion

La réponse inclut une paire de champs de conversion pour chaque événement de conversion configuré sur le Canvas. L’événement de conversion principal utilise conversions et conversions_by_entry_time. Chaque événement supplémentaire utilise le même nom de base avec un suffixe numérique commençant à 1 pour le deuxième événement, puis incrémenté de un pour chaque événement suivant.

Ordre de l’événement de conversion sur le Canvas Champ de conversions Champ par heure d’entrée
Principal conversions conversions_by_entry_time
Deuxième conversions1 conversions1_by_entry_time
Troisième conversions2 conversions2_by_entry_time
Quatrième conversions3 conversions3_by_entry_time

Le cinquième événement et les suivants respectent le même schéma (par exemple, conversions4 et conversions4_by_entry_time). Ces champs apparaissent dans total_stats et, lorsque vous demandez des ventilations, dans variant_stats et step_stats sous les mêmes noms.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  "data": {
    "name": (string) the Canvas name,
    "total_stats": {
      "revenue": (float) the number of dollars of revenue (USD),
      "entries": (int) the number of entries,
      "conversions": (int) the number of conversions for the primary conversion event,
      "conversions_by_entry_time": (int) the number of conversions for the primary conversion event by entry time,
      "conversions1": (optional, int) the number of conversions for the second conversion event,
      "conversions1_by_entry_time": (optional, int) the number of conversions for the second conversion event by entry time,
      "conversions2": (optional, int) the number of conversions for the third conversion event,
      "conversions2_by_entry_time": (optional, int) the number of conversions for the third conversion event by entry time,
      "conversions3": (optional, int) the number of conversions for the fourth conversion event,
      "conversions3_by_entry_time": (optional, int) the number of conversions for the fourth conversion event by entry time
    },
    "variant_stats": (optional) {
      "00000000-0000-0000-0000-0000000000000": (string) the API identifier for the variant {
        "name": (string) the name of the variant,
        "revenue": (float) the number of dollars of revenue (USD),
        "conversions": (int) the number of conversions for the primary conversion event,
        "conversions_by_entry_time": (optional, int) the number of conversions for the primary conversion event by entry time,
        "conversions1": (optional, int) the number of conversions for the second conversion event,
        "conversions1_by_entry_time": (optional, int) the number of conversions for the second conversion event by entry time,
        "conversions2": (optional, int) the number of conversions for the third conversion event,
        "conversions2_by_entry_time": (optional, int) the number of conversions for the third conversion event by entry time,
        "conversions3": (optional, int) the number of conversions for the fourth conversion event,
        "conversions3_by_entry_time": (optional, int) the number of conversions for the fourth conversion event by entry time,
        "entries": (int) the number of entries
      },
      ... (more variants)
    },
    "step_stats": (optional) {
      "00000000-0000-0000-0000-0000000000000": (string) the API identifier for the step {
        "name": (string) the name of the step,
        "revenue": (float) the number of dollars of revenue (USD),
        "conversions": (int) the number of conversions for the primary conversion event,
        "conversions_by_entry_time": (int) the number of conversions for the primary conversion event by entry time,
        "conversions1": (optional, int) the number of conversions for the second conversion event,
        "conversions1_by_entry_time": (optional, int) the number of conversions for the second conversion event by entry time,
        "conversions2": (optional, int) the number of conversions for the third conversion event,
        "conversions2_by_entry_time": (optional, int) the number of conversions for the third conversion event by entry time,
        "conversions3": (optional, int) the number of conversions for the fourth conversion event,
        "conversions3_by_entry_time": (optional, int) the number of conversions for the fourth conversion event by entry time,
        "messages": {
          "android_push": (name of channel) [
            {
              "sent": (int) the number of sends,
              "opens": (int) the number of opens,
              "influenced_opens": (int) the total number of opens (includes both direct opens and influenced opens),
              "bounces": (int) the number of bounces
              ... (more stats for channel)
            }
          ],
          ... (more channels)
        }
      },
      ... (more steps)
    }
  },
  "message": (required, string) the status of the export, returns 'success' on successful completion
}
New Stuff!