Skip to content

Commit 66915a3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update API spec to allow primary timeframe, target, and warning (#963)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent c50cf90 commit 66915a3

File tree

12 files changed

+231
-54
lines changed

12 files changed

+231
-54
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2022-12-23 16:48:49.357745",
8-
"spec_repo_commit": "1e3acf42"
7+
"regenerated": "2022-12-28 16:10:46.984442",
8+
"spec_repo_commit": "b2d7d94f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2022-12-23 16:48:49.371587",
13-
"spec_repo_commit": "1e3acf42"
12+
"regenerated": "2022-12-28 16:10:46.996173",
13+
"spec_repo_commit": "b2d7d94f"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9710,6 +9710,14 @@ components:
97109710
description: A tag to apply to your SLO.
97119711
type: string
97129712
type: array
9713+
target_threshold:
9714+
description: 'The target threshold such that when the service level indicator
9715+
is above this
9716+
9717+
threshold over the given timeframe, the objective is being met.'
9718+
example: 99.9
9719+
format: double
9720+
type: number
97139721
thresholds:
97149722
description: 'The thresholds (timeframes and associated targets) for this
97159723
service level
@@ -9724,8 +9732,24 @@ components:
97249732
items:
97259733
$ref: '#/components/schemas/SLOThreshold'
97269734
type: array
9735+
timeframe:
9736+
$ref: '#/components/schemas/SLOTimeframe'
97279737
type:
97289738
$ref: '#/components/schemas/SLOType'
9739+
warning_threshold:
9740+
description: 'The optional warning threshold such that when the service
9741+
level indicator is
9742+
9743+
below this value for the given threshold, but above the target threshold,
9744+
the
9745+
9746+
objective appears in a "warning" state. This value must be greater than
9747+
the target
9748+
9749+
threshold.'
9750+
example: 99.95
9751+
format: double
9752+
type: number
97299753
type: object
97309754
SLOThreshold:
97319755
description: SLO thresholds (target and optionally warning) for a single time
@@ -10609,6 +10633,14 @@ components:
1060910633
description: A tag to apply to your SLO.
1061010634
type: string
1061110635
type: array
10636+
target_threshold:
10637+
description: 'The target threshold such that when the service level indicator
10638+
is above this
10639+
10640+
threshold over the given timeframe, the objective is being met.'
10641+
example: 99.9
10642+
format: double
10643+
type: number
1061210644
thresholds:
1061310645
description: 'The thresholds (timeframes and associated targets) for this
1061410646
service level
@@ -10623,8 +10655,24 @@ components:
1062310655
items:
1062410656
$ref: '#/components/schemas/SLOThreshold'
1062510657
type: array
10658+
timeframe:
10659+
$ref: '#/components/schemas/SLOTimeframe'
1062610660
type:
1062710661
$ref: '#/components/schemas/SLOType'
10662+
warning_threshold:
10663+
description: 'The optional warning threshold such that when the service
10664+
level indicator is
10665+
10666+
below this value for the given threshold, but above the target threshold,
10667+
the
10668+
10669+
objective appears in a "warning" state. This value must be greater than
10670+
the target
10671+
10672+
threshold.'
10673+
example: 99.95
10674+
format: double
10675+
type: number
1062810676
required:
1062910677
- name
1063010678
- thresholds
@@ -10713,6 +10761,14 @@ components:
1071310761
description: A tag to apply to your SLO.
1071410762
type: string
1071510763
type: array
10764+
target_threshold:
10765+
description: 'The target threshold such that when the service level indicator
10766+
is above this
10767+
10768+
threshold over the given timeframe, the objective is being met.'
10769+
example: 99.9
10770+
format: double
10771+
type: number
1071610772
thresholds:
1071710773
description: 'The thresholds (timeframes and associated targets) for this
1071810774
service level
@@ -10727,8 +10783,24 @@ components:
1072710783
items:
1072810784
$ref: '#/components/schemas/SLOThreshold'
1072910785
type: array
10786+
timeframe:
10787+
$ref: '#/components/schemas/SLOTimeframe'
1073010788
type:
1073110789
$ref: '#/components/schemas/SLOType'
10790+
warning_threshold:
10791+
description: 'The optional warning threshold such that when the service
10792+
level indicator is
10793+
10794+
below this value for the given threshold, but above the target threshold,
10795+
the
10796+
10797+
objective appears in a "warning" state. This value must be greater than
10798+
the target
10799+
10800+
threshold.'
10801+
example: 99.95
10802+
format: double
10803+
type: number
1073210804
required:
1073310805
- name
1073410806
- thresholds
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2022-01-06T00:51:10.554Z"
1+
"2022-12-23T20:34:32.926Z"

cassettes/v1/Service-Level-Objectives_139838558/Create-an-SLO-object-returns-OK-response_3282353469/recording.har

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "c1702e592dcf8b26ec59e9abad095683",
11+
"_id": "f53f975c1b33bc09c44fca7bb9a8ea54",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 422,
15+
"bodySize": 484,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -26,23 +26,23 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 463,
29+
"headersSize": 547,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"description\":\"string\",\"groups\":[\"env:test\",\"role:mysql\"],\"monitor_ids\":[],\"name\":\"Test-Create_an_SLO_object_returns_OK_response-1641430270\",\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"tags\":[\"env:prod\",\"app:core\"],\"thresholds\":[{\"target\":95,\"target_display\":\"95.0\",\"timeframe\":\"7d\",\"warning\":98,\"warning_display\":\"98.0\"}],\"type\":\"metric\"}"
35+
"text": "{\"description\":\"string\",\"groups\":[\"env:test\",\"role:mysql\"],\"monitor_ids\":[],\"name\":\"Test-Create_an_SLO_object_returns_OK_response-1671827672\",\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"tags\":[\"env:prod\",\"app:core\"],\"target_threshold\":97,\"thresholds\":[{\"target\":95,\"target_display\":\"95.0\",\"timeframe\":\"7d\",\"warning\":98,\"warning_display\":\"98.0\"}],\"timeframe\":\"7d\",\"type\":\"metric\",\"warning_threshold\":98}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/slo"
3939
},
4040
"response": {
41-
"bodySize": 633,
41+
"bodySize": 696,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 633,
45-
"text": "{\"data\":[{\"description\":\"string\",\"monitor_tags\":[],\"creator\":{\"handle\":\"[email protected]\",\"name\":null,\"email\":\"[email protected]\"},\"thresholds\":[{\"warning\":98,\"warning_display\":\"98.\",\"target\":95,\"target_display\":\"95.\",\"timeframe\":\"7d\"}],\"groups\":[\"env:test\",\"role:mysql\"],\"type_id\":1,\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"id\":\"d5ee01d8ce6455ffb6f3acd3fa7df153\",\"name\":\"Test-Create_an_SLO_object_returns_OK_response-1641430270\",\"created_at\":1641430270,\"tags\":[\"app:core\",\"env:prod\"],\"modified_at\":1641430270,\"type\":\"metric\"}],\"error\":null}"
44+
"size": 696,
45+
"text": "{\"data\":[{\"id\":\"c7d81cbea88258f3a6a228901328e997\",\"name\":\"Test-Create_an_SLO_object_returns_OK_response-1671827672\",\"tags\":[\"env:prod\",\"app:core\"],\"monitor_tags\":[],\"thresholds\":[{\"timeframe\":\"7d\",\"target\":95.0,\"target_display\":\"95.\",\"warning\":98.0,\"warning_display\":\"98.\"}],\"type\":\"metric\",\"type_id\":1,\"description\":\"string\",\"timeframe\":\"7d\",\"warning_threshold\":98,\"target_threshold\":97,\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"creator\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"created_at\":1671827673,\"modified_at\":1671827673,\"groups\":[\"env:test\",\"role:mysql\"]}],\"error\":null}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 512,
54+
"headersSize": 619,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2022-01-06T00:51:10.557Z",
61-
"time": 181
60+
"startedDateTime": "2022-12-23T20:34:32.948Z",
61+
"time": 597
6262
},
6363
{
64-
"_id": "ccb5271ec0cc82dbf8aedbed85177055",
64+
"_id": "921dc25e64fd749c68dc6e54224d67e5",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -74,18 +74,18 @@
7474
"value": "application/json"
7575
}
7676
],
77-
"headersSize": 445,
77+
"headersSize": 528,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v1/slo/d5ee01d8ce6455ffb6f3acd3fa7df153"
81+
"url": "https://api.datadoghq.com/api/v1/slo/c7d81cbea88258f3a6a228901328e997"
8282
},
8383
"response": {
84-
"bodySize": 58,
84+
"bodySize": 59,
8585
"content": {
8686
"mimeType": "application/json",
87-
"size": 58,
88-
"text": "{\"data\":[\"d5ee01d8ce6455ffb6f3acd3fa7df153\"],\"error\":null}"
87+
"size": 59,
88+
"text": "{\"data\":[\"c7d81cbea88258f3a6a228901328e997\"],\"error\":null}\n"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -94,14 +94,14 @@
9494
"value": "application/json"
9595
}
9696
],
97-
"headersSize": 513,
97+
"headersSize": 616,
9898
"httpVersion": "HTTP/1.1",
9999
"redirectURL": "",
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2022-01-06T00:51:10.741Z",
104-
"time": 223
103+
"startedDateTime": "2022-12-23T20:34:33.579Z",
104+
"time": 485
105105
}
106106
],
107107
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2022-03-08T14:18:15.700Z"
1+
"2022-12-23T20:34:34.100Z"

cassettes/v1/Service-Level-Objectives_139838558/Update-an-SLO-returns-OK-response_1448646901/recording.har

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "e08bddef994240f6252cf083390fcd8f",
11+
"_id": "e3d0ca7b430053338d4e766d78e5dc69",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -26,23 +26,23 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 547,
29+
"headersSize": 545,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"name\":\"Test-Update_an_SLO_returns_OK_response-1646749095\",\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"thresholds\":[{\"target\":95,\"timeframe\":\"7d\",\"warning\":98}],\"type\":\"metric\"}"
35+
"text": "{\"name\":\"Test-Update_an_SLO_returns_OK_response-1671827674\",\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"thresholds\":[{\"target\":95,\"timeframe\":\"7d\",\"warning\":98}],\"type\":\"metric\"}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/slo"
3939
},
4040
"response": {
41-
"bodySize": 564,
41+
"bodySize": 627,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 564,
45-
"text": "{\"data\":[{\"description\":\"\",\"monitor_tags\":[],\"creator\":{\"handle\":\"[email protected]\",\"name\":null,\"email\":\"[email protected]\"},\"thresholds\":[{\"warning\":98.0,\"warning_display\":\"98.\",\"target\":95.0,\"target_display\":\"95.\",\"timeframe\":\"7d\"}],\"type_id\":1,\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"id\":\"75d6eadff5155234a11fcf7be783e170\",\"name\":\"Test-Update_an_SLO_returns_OK_response-1646749095\",\"created_at\":1646749096,\"tags\":[],\"modified_at\":1646749096,\"type\":\"metric\"}],\"error\":null}"
44+
"size": 627,
45+
"text": "{\"data\":[{\"id\":\"9ca3260165e5524bb05029ae2cf52ceb\",\"name\":\"Test-Update_an_SLO_returns_OK_response-1671827674\",\"tags\":[],\"monitor_tags\":[],\"thresholds\":[{\"timeframe\":\"7d\",\"target\":95.0,\"target_display\":\"95.\",\"warning\":98.0,\"warning_display\":\"98.\"}],\"type\":\"metric\",\"type_id\":1,\"description\":\"\",\"timeframe\":\"7d\",\"warning_threshold\":98,\"target_threshold\":95,\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"creator\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"created_at\":1671827674,\"modified_at\":1671827674}],\"error\":null}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,21 +51,21 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 662,
54+
"headersSize": 619,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2022-03-08T14:18:15.718Z",
61-
"time": 721
60+
"startedDateTime": "2022-12-23T20:34:34.105Z",
61+
"time": 491
6262
},
6363
{
64-
"_id": "8f0f1f344c6e52be7c13c8b5c1b151cf",
64+
"_id": "b10bbeec221844ebd52885a99984e8d8",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
68-
"bodySize": 260,
68+
"bodySize": 322,
6969
"cookies": [],
7070
"headers": [
7171
{
@@ -85,17 +85,17 @@
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"name\":\"Test-Update_an_SLO_returns_OK_response-1646749095\",\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"thresholds\":[{\"target\":97,\"timeframe\":\"7d\",\"warning\":98}],\"type\":\"metric\"}"
88+
"text": "{\"name\":\"Test-Update_an_SLO_returns_OK_response-1671827674\",\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"target_threshold\":97,\"thresholds\":[{\"target\":97,\"timeframe\":\"7d\",\"warning\":98}],\"timeframe\":\"7d\",\"type\":\"metric\",\"warning_threshold\":98}"
8989
},
9090
"queryString": [],
91-
"url": "https://api.datadoghq.com/api/v1/slo/75d6eadff5155234a11fcf7be783e170"
91+
"url": "https://api.datadoghq.com/api/v1/slo/9ca3260165e5524bb05029ae2cf52ceb"
9292
},
9393
"response": {
94-
"bodySize": 564,
94+
"bodySize": 627,
9595
"content": {
9696
"mimeType": "application/json",
97-
"size": 564,
98-
"text": "{\"data\":[{\"description\":\"\",\"monitor_tags\":[],\"creator\":{\"handle\":\"[email protected]\",\"name\":null,\"email\":\"[email protected]\"},\"thresholds\":[{\"warning\":98.0,\"warning_display\":\"98.\",\"target\":97.0,\"target_display\":\"97.\",\"timeframe\":\"7d\"}],\"type_id\":1,\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"id\":\"75d6eadff5155234a11fcf7be783e170\",\"name\":\"Test-Update_an_SLO_returns_OK_response-1646749095\",\"created_at\":1646749096,\"tags\":[],\"modified_at\":1646749097,\"type\":\"metric\"}],\"error\":null}"
97+
"size": 627,
98+
"text": "{\"data\":[{\"id\":\"9ca3260165e5524bb05029ae2cf52ceb\",\"name\":\"Test-Update_an_SLO_returns_OK_response-1671827674\",\"tags\":[],\"monitor_tags\":[],\"thresholds\":[{\"timeframe\":\"7d\",\"target\":97.0,\"target_display\":\"97.\",\"warning\":98.0,\"warning_display\":\"98.\"}],\"type\":\"metric\",\"type_id\":1,\"description\":\"\",\"timeframe\":\"7d\",\"warning_threshold\":98,\"target_threshold\":97,\"query\":{\"denominator\":\"sum:httpservice.hits{!code:3xx}.as_count()\",\"numerator\":\"sum:httpservice.hits{code:2xx}.as_count()\"},\"creator\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"created_at\":1671827674,\"modified_at\":1671827674}],\"error\":null}\n"
9999
},
100100
"cookies": [],
101101
"headers": [
@@ -104,17 +104,17 @@
104104
"value": "application/json"
105105
}
106106
],
107-
"headersSize": 662,
107+
"headersSize": 619,
108108
"httpVersion": "HTTP/1.1",
109109
"redirectURL": "",
110110
"status": 200,
111111
"statusText": "OK"
112112
},
113-
"startedDateTime": "2022-03-08T14:18:16.449Z",
114-
"time": 847
113+
"startedDateTime": "2022-12-23T20:34:34.604Z",
114+
"time": 441
115115
},
116116
{
117-
"_id": "f3b348cc80bdc0e4be8c073bcfc74db2",
117+
"_id": "1be489288bc8cdf3222e25662faab76e",
118118
"_order": 0,
119119
"cache": {},
120120
"request": {
@@ -131,14 +131,14 @@
131131
"httpVersion": "HTTP/1.1",
132132
"method": "DELETE",
133133
"queryString": [],
134-
"url": "https://api.datadoghq.com/api/v1/slo/75d6eadff5155234a11fcf7be783e170"
134+
"url": "https://api.datadoghq.com/api/v1/slo/9ca3260165e5524bb05029ae2cf52ceb"
135135
},
136136
"response": {
137-
"bodySize": 58,
137+
"bodySize": 59,
138138
"content": {
139139
"mimeType": "application/json",
140-
"size": 58,
141-
"text": "{\"data\":[\"75d6eadff5155234a11fcf7be783e170\"],\"error\":null}"
140+
"size": 59,
141+
"text": "{\"data\":[\"9ca3260165e5524bb05029ae2cf52ceb\"],\"error\":null}\n"
142142
},
143143
"cookies": [],
144144
"headers": [
@@ -147,14 +147,14 @@
147147
"value": "application/json"
148148
}
149149
],
150-
"headersSize": 662,
150+
"headersSize": 616,
151151
"httpVersion": "HTTP/1.1",
152152
"redirectURL": "",
153153
"status": 200,
154154
"statusText": "OK"
155155
},
156-
"startedDateTime": "2022-03-08T14:18:17.306Z",
157-
"time": 546
156+
"startedDateTime": "2022-12-23T20:34:35.054Z",
157+
"time": 421
158158
}
159159
],
160160
"pages": [],

0 commit comments

Comments
 (0)