You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/api/metrics.apib
+2-37Lines changed: 2 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -71,22 +71,7 @@ All precisions are valid up to a 24 hour time window. `15min` precision is valid
71
71
72
72
**Time-series Metrics**
73
73
74
-
When the `precision` parameter is specified for the [time-series request](#metrics-get-time-series-metrics), it reflects the period of time the data is grouped by. The bounds of the time window (`from`, `to`) are also rounded to the nearest time matching the precision. For example, requesting data between `4:22` to `6:37` would round `from` and `to` in the following ways:
75
-
76
-
| Precision | Rounded time bounds |
77
-
|-----------|-------------------------|
78
-
| `1min` | `04:22:00` - `06:37:59` |
79
-
| `5min` | `04:20:00` - `06:39:59` |
80
-
| `15min` | `04:15:00` - `06:44:59` |
81
-
| `hour` | `04:00:00` - `06:59:59` |
82
-
| `12hr` | `00:00:00` - `11:59:59` |
83
-
84
-
Larger time windows are also rounded. For example, requesting data between `2020-04-03T04:22` to `2020-04-21T06:37` would round `from` and `to` in the following ways:
When the `precision` parameter is specified for the [time-series request](#metrics-get-time-series-metrics), it reflects the period of time the data is grouped by.
90
75
91
76
### Discoverability Links [GET /v1/metrics/]
92
77
@@ -1041,7 +1026,7 @@ Provides deliverability metrics ordered by a precision of time.
1041
1026
+ ip_pools (optional, list, `ip-pool-1,ip-pool-2,ip-pool-3`) ... Delimited list of IP pools to include.
1042
1027
+ sending_domains (optional, list) ... Delimited list of sending domains to include.
1043
1028
+ subaccounts (optional, list) ... Delimited list of subaccount IDs to include.
1044
-
+ precision (optional, enum, `day`) ... Precision of timeseries data returned. See: [Precision Parameter](#header-precision-parameter).
1029
+
+ precision (optional, enum, `day`) ... Precision of timeseries data returned.
1045
1030
1046
1031
+ Values
1047
1032
+ `1min`
@@ -1180,8 +1165,6 @@ Provides deliverability metrics ordered by a precision of time.
1180
1165
1181
1166
Provides deliverability metrics, specific to bounce events, grouped by the bounce reasons.
1182
1167
1183
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1184
-
1185
1168
+ Parameters
1186
1169
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1187
1170
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1245,8 +1228,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1245
1228
1246
1229
Provides deliverability metrics, specific to bounce events, grouped by the domain and bounce reasons.
1247
1230
1248
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1249
-
1250
1231
+ Parameters
1251
1232
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1252
1233
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1312,8 +1293,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1312
1293
1313
1294
Provides deliverability metrics, specific to bounce events, grouped by the bounce classification. (See [Bounce Classification Codes.](https://www.sparkpost.com/docs/deliverability/bounce-classification-codes/))
1314
1295
1315
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1316
-
1317
1296
+ Parameters
1318
1297
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1319
1298
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1373,8 +1352,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1373
1352
1374
1353
Provides deliverability metrics, specific to rejection events, grouped by the rejection reasons.
1375
1354
1376
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1377
-
1378
1355
+ Parameters
1379
1356
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1380
1357
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1413,8 +1390,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1413
1390
1414
1391
Provides deliverability metrics, specific to rejection events, grouped by the domain and rejection reasons.
1415
1392
1416
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1417
-
1418
1393
+ Parameters
1419
1394
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1420
1395
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1455,8 +1430,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1455
1430
1456
1431
Provides deliverability metrics, specific to delay events, grouped by the delay reasons.
1457
1432
1458
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1459
-
1460
1433
+ Parameters
1461
1434
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1462
1435
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1500,8 +1473,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1500
1473
1501
1474
Provides deliverability metrics, specific to delay events, grouped by the domain and delay reasons.
1502
1475
1503
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1504
-
1505
1476
+ Parameters
1506
1477
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1507
1478
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1547,8 +1518,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1547
1518
1548
1519
Provides deliverability metrics, specific to engagement events (clicks/opens), grouped by the link name (or URL if no link name exists). To name the links in your messages, [read about the `data-msys-link-name` HTML attribute here](/api/template-language/#header-link-names).
1549
1520
1550
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1551
-
1552
1521
+ Parameters
1553
1522
+ from (required, datetime, `2014-07-11T09:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1554
1523
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1595,8 +1564,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1595
1564
1596
1565
Provides aggregate count of deliveries grouped by the attempt number. This endpoint supports at most 3 entries in the results Array, attempts: 1, attempts: 2, and attempts: 3+.
1597
1566
1598
-
Note that even though precision is not a valid query parameter for this endpoint, time frame rounding will be applied. See: [Precision Parameter](#header-precision-parameter).
1599
-
1600
1567
+ Parameters
1601
1568
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
1602
1569
+ to = `now` (optional, datetime) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
@@ -1651,8 +1618,6 @@ Note that even though precision is not a valid query parameter for this endpoint
1651
1618
1652
1619
Each of the the following endpoints returns a list of their resources for which we have metrics. These help you get an overview of what metrics are available to you.
1653
1620
1654
-
Note that even though precision is not a valid query parameter for these endpoints, time frame rounding will be applied at the `hour` level of precision. See: [Precision Parameter](#header-precision-parameter).
1655
-
1656
1621
### IP Pools [GET /v1/metrics/ip-pools{?from,to,timezone,match,limit}]
1657
1622
1658
1623
Returns a list of IP pools that the Metrics API contains data on.
0 commit comments