Skip to content

Commit 2c51eb2

Browse files
authored
Merge pull request #421 from SparkPost/revert-417-SA-1471
Revert "SA-1471 updates docs for timeseries precision rounding"
2 parents 8266689 + a40236f commit 2c51eb2

File tree

3 files changed

+4253
-5034
lines changed

3 files changed

+4253
-5034
lines changed

content/api/metrics.apib

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,7 @@ All precisions are valid up to a 24 hour time window. `15min` precision is valid
7171

7272
**Time-series Metrics**
7373

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:
85-
86-
| Precision | Rounded time bounds |
87-
| `day` | `2020-04-03T00:00:00` - `2020-04-21T23:59:59` |
88-
| `week` | `2020-03-29T00:00:00` - `2020-04-25T23:59:59` |
89-
| `month` | `2020-04-01T00:00:00` - `2020-04-30T23:59:59` |
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.
9075

9176
### Discoverability Links [GET /v1/metrics/]
9277

@@ -1041,7 +1026,7 @@ Provides deliverability metrics ordered by a precision of time.
10411026
+ ip_pools (optional, list, `ip-pool-1,ip-pool-2,ip-pool-3`) ... Delimited list of IP pools to include.
10421027
+ sending_domains (optional, list) ... Delimited list of sending domains to include.
10431028
+ 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.
10451030

10461031
+ Values
10471032
+ `1min`
@@ -1180,8 +1165,6 @@ Provides deliverability metrics ordered by a precision of time.
11801165

11811166
Provides deliverability metrics, specific to bounce events, grouped by the bounce reasons.
11821167

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-
11851168
+ Parameters
11861169
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
11871170
+ 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
12451228

12461229
Provides deliverability metrics, specific to bounce events, grouped by the domain and bounce reasons.
12471230

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-
12501231
+ Parameters
12511232
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
12521233
+ 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
13121293

13131294
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/))
13141295

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-
13171296
+ Parameters
13181297
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
13191298
+ 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
13731352

13741353
Provides deliverability metrics, specific to rejection events, grouped by the rejection reasons.
13751354

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-
13781355
+ Parameters
13791356
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
13801357
+ 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
14131390

14141391
Provides deliverability metrics, specific to rejection events, grouped by the domain and rejection reasons.
14151392

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-
14181393
+ Parameters
14191394
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
14201395
+ 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
14551430

14561431
Provides deliverability metrics, specific to delay events, grouped by the delay reasons.
14571432

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-
14601433
+ Parameters
14611434
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
14621435
+ 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
15001473

15011474
Provides deliverability metrics, specific to delay events, grouped by the domain and delay reasons.
15021475

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-
15051476
+ Parameters
15061477
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
15071478
+ 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
15471518

15481519
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).
15491520

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-
15521521
+ Parameters
15531522
+ from (required, datetime, `2014-07-11T09:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
15541523
+ 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
15951564

15961565
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+.
15971566

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-
16001567
+ Parameters
16011568
+ from (required, datetime, `2018-07-11T08:00`) ... Datetime in format of `YYYY-MM-DDTHH:MM`.
16021569
+ 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
16511618

16521619
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.
16531620

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-
16561621
### IP Pools [GET /v1/metrics/ip-pools{?from,to,timezone,match,limit}]
16571622

16581623
Returns a list of IP pools that the Metrics API contains data on.

0 commit comments

Comments
 (0)