Skip to content

Commit

Permalink
Update API spec to allow primary timeframe, target, and warning (#963)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Dec 28, 2022
1 parent c50cf90 commit 66915a3
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 54 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2022-12-23 16:48:49.357745",
"spec_repo_commit": "1e3acf42"
"regenerated": "2022-12-28 16:10:46.984442",
"spec_repo_commit": "b2d7d94f"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-12-23 16:48:49.371587",
"spec_repo_commit": "1e3acf42"
"regenerated": "2022-12-28 16:10:46.996173",
"spec_repo_commit": "b2d7d94f"
}
}
}
72 changes: 72 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9710,6 +9710,14 @@ components:
description: A tag to apply to your SLO.
type: string
type: array
target_threshold:
description: 'The target threshold such that when the service level indicator
is above this

threshold over the given timeframe, the objective is being met.'
example: 99.9
format: double
type: number
thresholds:
description: 'The thresholds (timeframes and associated targets) for this
service level
Expand All @@ -9724,8 +9732,24 @@ components:
items:
$ref: '#/components/schemas/SLOThreshold'
type: array
timeframe:
$ref: '#/components/schemas/SLOTimeframe'
type:
$ref: '#/components/schemas/SLOType'
warning_threshold:
description: 'The optional warning threshold such that when the service
level indicator is

below this value for the given threshold, but above the target threshold,
the

objective appears in a "warning" state. This value must be greater than
the target

threshold.'
example: 99.95
format: double
type: number
type: object
SLOThreshold:
description: SLO thresholds (target and optionally warning) for a single time
Expand Down Expand Up @@ -10609,6 +10633,14 @@ components:
description: A tag to apply to your SLO.
type: string
type: array
target_threshold:
description: 'The target threshold such that when the service level indicator
is above this

threshold over the given timeframe, the objective is being met.'
example: 99.9
format: double
type: number
thresholds:
description: 'The thresholds (timeframes and associated targets) for this
service level
Expand All @@ -10623,8 +10655,24 @@ components:
items:
$ref: '#/components/schemas/SLOThreshold'
type: array
timeframe:
$ref: '#/components/schemas/SLOTimeframe'
type:
$ref: '#/components/schemas/SLOType'
warning_threshold:
description: 'The optional warning threshold such that when the service
level indicator is

below this value for the given threshold, but above the target threshold,
the

objective appears in a "warning" state. This value must be greater than
the target

threshold.'
example: 99.95
format: double
type: number
required:
- name
- thresholds
Expand Down Expand Up @@ -10713,6 +10761,14 @@ components:
description: A tag to apply to your SLO.
type: string
type: array
target_threshold:
description: 'The target threshold such that when the service level indicator
is above this

threshold over the given timeframe, the objective is being met.'
example: 99.9
format: double
type: number
thresholds:
description: 'The thresholds (timeframes and associated targets) for this
service level
Expand All @@ -10727,8 +10783,24 @@ components:
items:
$ref: '#/components/schemas/SLOThreshold'
type: array
timeframe:
$ref: '#/components/schemas/SLOTimeframe'
type:
$ref: '#/components/schemas/SLOType'
warning_threshold:
description: 'The optional warning threshold such that when the service
level indicator is

below this value for the given threshold, but above the target threshold,
the

objective appears in a "warning" state. This value must be greater than
the target

threshold.'
example: 99.95
format: double
type: number
required:
- name
- thresholds
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2022-01-06T00:51:10.554Z"
"2022-12-23T20:34:32.926Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "c1702e592dcf8b26ec59e9abad095683",
"_id": "f53f975c1b33bc09c44fca7bb9a8ea54",
"_order": 0,
"cache": {},
"request": {
"bodySize": 422,
"bodySize": 484,
"cookies": [],
"headers": [
{
Expand All @@ -26,23 +26,23 @@
"value": "application/json"
}
],
"headersSize": 463,
"headersSize": 547,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"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\"}"
"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}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/slo"
},
"response": {
"bodySize": 633,
"bodySize": 696,
"content": {
"mimeType": "application/json",
"size": 633,
"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}"
"size": 696,
"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"
},
"cookies": [],
"headers": [
Expand All @@ -51,17 +51,17 @@
"value": "application/json"
}
],
"headersSize": 512,
"headersSize": 619,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2022-01-06T00:51:10.557Z",
"time": 181
"startedDateTime": "2022-12-23T20:34:32.948Z",
"time": 597
},
{
"_id": "ccb5271ec0cc82dbf8aedbed85177055",
"_id": "921dc25e64fd749c68dc6e54224d67e5",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -74,18 +74,18 @@
"value": "application/json"
}
],
"headersSize": 445,
"headersSize": 528,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/slo/d5ee01d8ce6455ffb6f3acd3fa7df153"
"url": "https://api.datadoghq.com/api/v1/slo/c7d81cbea88258f3a6a228901328e997"
},
"response": {
"bodySize": 58,
"bodySize": 59,
"content": {
"mimeType": "application/json",
"size": 58,
"text": "{\"data\":[\"d5ee01d8ce6455ffb6f3acd3fa7df153\"],\"error\":null}"
"size": 59,
"text": "{\"data\":[\"c7d81cbea88258f3a6a228901328e997\"],\"error\":null}\n"
},
"cookies": [],
"headers": [
Expand All @@ -94,14 +94,14 @@
"value": "application/json"
}
],
"headersSize": 513,
"headersSize": 616,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2022-01-06T00:51:10.741Z",
"time": 223
"startedDateTime": "2022-12-23T20:34:33.579Z",
"time": 485
}
],
"pages": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2022-03-08T14:18:15.700Z"
"2022-12-23T20:34:34.100Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"entries": [
{
"_id": "e08bddef994240f6252cf083390fcd8f",
"_id": "e3d0ca7b430053338d4e766d78e5dc69",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -26,23 +26,23 @@
"value": "application/json"
}
],
"headersSize": 547,
"headersSize": 545,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"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\"}"
"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\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/slo"
},
"response": {
"bodySize": 564,
"bodySize": 627,
"content": {
"mimeType": "application/json",
"size": 564,
"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}"
"size": 627,
"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"
},
"cookies": [],
"headers": [
Expand All @@ -51,21 +51,21 @@
"value": "application/json"
}
],
"headersSize": 662,
"headersSize": 619,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2022-03-08T14:18:15.718Z",
"time": 721
"startedDateTime": "2022-12-23T20:34:34.105Z",
"time": 491
},
{
"_id": "8f0f1f344c6e52be7c13c8b5c1b151cf",
"_id": "b10bbeec221844ebd52885a99984e8d8",
"_order": 0,
"cache": {},
"request": {
"bodySize": 260,
"bodySize": 322,
"cookies": [],
"headers": [
{
Expand All @@ -85,17 +85,17 @@
"postData": {
"mimeType": "application/json",
"params": [],
"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\"}"
"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}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/slo/75d6eadff5155234a11fcf7be783e170"
"url": "https://api.datadoghq.com/api/v1/slo/9ca3260165e5524bb05029ae2cf52ceb"
},
"response": {
"bodySize": 564,
"bodySize": 627,
"content": {
"mimeType": "application/json",
"size": 564,
"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}"
"size": 627,
"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"
},
"cookies": [],
"headers": [
Expand All @@ -104,17 +104,17 @@
"value": "application/json"
}
],
"headersSize": 662,
"headersSize": 619,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2022-03-08T14:18:16.449Z",
"time": 847
"startedDateTime": "2022-12-23T20:34:34.604Z",
"time": 441
},
{
"_id": "f3b348cc80bdc0e4be8c073bcfc74db2",
"_id": "1be489288bc8cdf3222e25662faab76e",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -131,14 +131,14 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/slo/75d6eadff5155234a11fcf7be783e170"
"url": "https://api.datadoghq.com/api/v1/slo/9ca3260165e5524bb05029ae2cf52ceb"
},
"response": {
"bodySize": 58,
"bodySize": 59,
"content": {
"mimeType": "application/json",
"size": 58,
"text": "{\"data\":[\"75d6eadff5155234a11fcf7be783e170\"],\"error\":null}"
"size": 59,
"text": "{\"data\":[\"9ca3260165e5524bb05029ae2cf52ceb\"],\"error\":null}\n"
},
"cookies": [],
"headers": [
Expand All @@ -147,14 +147,14 @@
"value": "application/json"
}
],
"headersSize": 662,
"headersSize": 616,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2022-03-08T14:18:17.306Z",
"time": 546
"startedDateTime": "2022-12-23T20:34:35.054Z",
"time": 421
}
],
"pages": [],
Expand Down
Loading

0 comments on commit 66915a3

Please sign in to comment.