Skip to content

Commit d301796

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add monitor draft status field (#2243)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent afbbd49 commit d301796

File tree

17 files changed

+145
-60
lines changed

17 files changed

+145
-60
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.6",
7-
"regenerated": "2025-06-04 12:51:38.429246",
8-
"spec_repo_commit": "35a63137"
7+
"regenerated": "2025-06-04 17:40:37.542641",
8+
"spec_repo_commit": "38b3c05a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-04 12:51:38.444911",
13-
"spec_repo_commit": "35a63137"
12+
"regenerated": "2025-06-04 17:40:37.559899",
13+
"spec_repo_commit": "38b3c05a"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6742,6 +6742,8 @@ components:
67426742
nullable: true
67436743
readOnly: true
67446744
type: string
6745+
draft_status:
6746+
$ref: '#/components/schemas/MonitorDraftStatus'
67456747
id:
67466748
description: ID of this monitor.
67476749
format: int64
@@ -6834,6 +6836,28 @@ components:
68346836
- FIREFOX_LAPTOP_LARGE
68356837
- FIREFOX_TABLET
68366838
- FIREFOX_MOBILE_SMALL
6839+
MonitorDraftStatus:
6840+
default: published
6841+
description: 'Indicates whether the monitor is in a draft or published state.
6842+
6843+
6844+
`draft`: The monitor appears as Draft and does not send notifications.
6845+
6846+
`published`: The monitor is active and evaluates conditions and notify as
6847+
configured.
6848+
6849+
6850+
This field is in preview. The draft value is only available to customers with
6851+
the feature enabled.
6852+
6853+
'
6854+
enum:
6855+
- draft
6856+
- published
6857+
type: string
6858+
x-enum-varnames:
6859+
- DRAFT
6860+
- PUBLISHED
68376861
MonitorFormulaAndFunctionCostAggregator:
68386862
description: Aggregation methods for metric queries.
68396863
enum:
@@ -7917,6 +7941,8 @@ components:
79177941
nullable: true
79187942
readOnly: true
79197943
type: string
7944+
draft_status:
7945+
$ref: '#/components/schemas/MonitorDraftStatus'
79207946
id:
79217947
description: ID of this monitor.
79227948
format: int64
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2022-02-02T21:04:10.597Z"
1+
"2025-05-14T22:27:13.829Z"

cassettes/v1/Monitors_4022238206/Create-a-RUM-formula-and-functions-monitor-returns-OK-response_1789593464/recording.har

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "7a58052f14ee83a62dfc2809be4dc559",
11+
"_id": "eef12d43f020a800f373e9557add2e5e",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,17 +32,17 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Create_a_RUM_formula_and_functions_monitor_returns_OK_response-1643835850\",\"options\":{\"thresholds\":{\"critical\":0.8},\"variables\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query2\",\"search\":{\"query\":\"\"}},{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"status:error\"}}]},\"priority\":3,\"query\":\"formula(\\\"query2 / query1 * 100\\\").last(\\\"15m\\\") >= 0.8\",\"tags\":[\"test:testcreatearumformulaandfunctionsmonitorreturnsokresponse1643835850\",\"env:ci\"],\"type\":\"rum alert\"}"
35+
"text": "{\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Create_a_RUM_formula_and_functions_monitor_returns_OK_response-1747261633\",\"options\":{\"thresholds\":{\"critical\":0.8},\"variables\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query2\",\"search\":{\"query\":\"\"}},{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"status:error\"}}]},\"priority\":3,\"query\":\"formula(\\\"query2 / query1 * 100\\\").last(\\\"15m\\\") >= 0.8\",\"tags\":[\"test:testcreatearumformulaandfunctionsmonitorreturnsokresponse1747261633\",\"env:ci\"],\"type\":\"rum alert\"}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/monitor"
3939
},
4040
"response": {
41-
"bodySize": 1144,
41+
"bodySize": 1264,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 1144,
45-
"text": "{\"restricted_roles\":null,\"tags\":[\"test:testcreatearumformulaandfunctionsmonitorreturnsokresponse1643835850\",\"env:ci\"],\"deleted\":null,\"query\":\"formula(\\\"query2 / query1 * 100\\\").last(\\\"15m\\\") >= 0.8\",\"message\":\"some message Notify: @hipchat-channel\",\"id\":62683819,\"multi\":false,\"name\":\"Test-Create_a_RUM_formula_and_functions_monitor_returns_OK_response-1643835850\",\"created\":\"2022-02-02T21:04:10.947341+00:00\",\"created_at\":1643835850000,\"creator\":{\"id\":1445416,\"handle\":\"[email protected]\",\"name\":null,\"email\":\"[email protected]\"},\"org_id\":321813,\"modified\":\"2022-02-02T21:04:10.947341+00:00\",\"priority\":3,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"type\":\"rum alert\",\"options\":{\"notify_audit\":false,\"locked\":false,\"silenced\":{},\"include_tags\":true,\"thresholds\":{\"critical\":0.8},\"new_host_delay\":300,\"notify_no_data\":false,\"groupby_simple_monitor\":false,\"variables\":[{\"search\":{\"query\":\"\"},\"data_source\":\"rum\",\"compute\":{\"aggregation\":\"count\"},\"name\":\"query2\",\"indexes\":[\"*\"],\"group_by\":[]},{\"search\":{\"query\":\"status:error\"},\"data_source\":\"rum\",\"compute\":{\"aggregation\":\"count\"},\"name\":\"query1\",\"indexes\":[\"*\"],\"group_by\":[]}]}}"
44+
"size": 1264,
45+
"text": "{\"id\":172140181,\"org_id\":2,\"type\":\"rum alert\",\"name\":\"Test-Create_a_RUM_formula_and_functions_monitor_returns_OK_response-1747261633\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[\"test:testcreatearumformulaandfunctionsmonitorreturnsokresponse1747261633\",\"env:ci\"],\"query\":\"formula(\\\"query2 / query1 * 100\\\").last(\\\"15m\\\") >= 0.8\",\"options\":{\"thresholds\":{\"critical\":0.8},\"variables\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query2\",\"search\":{\"query\":\"\"}},{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"status:error\"}}],\"notify_no_data\":false,\"notify_audit\":false,\"new_host_delay\":300,\"include_tags\":true,\"groupby_simple_monitor\":false,\"silenced\":{},\"avalanche_window\":20},\"multi\":false,\"created_at\":1747261634000,\"created\":\"2025-05-14T22:27:14.329045+00:00\",\"modified\":\"2025-05-14T22:27:14.329045+00:00\",\"deleted\":null,\"priority\":3,\"draft_status\":\"published\",\"restricted_roles\":null,\"restriction_policy\":null,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":\"Carl Martensen\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\",\"id\":638339},\"run_as\":null,\"restricted\":true}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 516,
54+
"headersSize": 680,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2022-02-02T21:04:10.644Z",
61-
"time": 350
60+
"startedDateTime": "2025-05-14T22:27:13.835Z",
61+
"time": 615
6262
},
6363
{
64-
"_id": "2c04155ecb9e82a5da2fb42d5676fc54",
64+
"_id": "f63b2a6e7ed44642d421e39aa05e50b5",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -74,18 +74,18 @@
7474
"value": "application/json"
7575
}
7676
],
77-
"headersSize": 513,
77+
"headersSize": 514,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v1/monitor/62683819"
81+
"url": "https://api.datadoghq.com/api/v1/monitor/172140181"
8282
},
8383
"response": {
84-
"bodySize": 31,
84+
"bodySize": 33,
8585
"content": {
8686
"mimeType": "application/json",
87-
"size": 31,
88-
"text": "{\"deleted_monitor_id\":62683819}"
87+
"size": 33,
88+
"text": "{\"deleted_monitor_id\":172140181}\n"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -94,14 +94,14 @@
9494
"value": "application/json"
9595
}
9696
],
97-
"headersSize": 485,
97+
"headersSize": 547,
9898
"httpVersion": "HTTP/1.1",
9999
"redirectURL": "",
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2022-02-02T21:04:11.003Z",
104-
"time": 289
103+
"startedDateTime": "2025-05-14T22:27:14.463Z",
104+
"time": 285
105105
}
106106
],
107107
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-11-09T17:58:50.774Z"
1+
"2025-05-14T22:28:29.992Z"

cassettes/v1/Monitors_4022238206/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response_3044937189/recording.har

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "7861bfa9b0524b7c54fe1fb8ade7bec7",
11+
"_id": "74a4aebf899ae69e554a79667da36952",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 528,
15+
"bodySize": 555,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -32,17 +32,17 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1699552730\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5}},\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"tags\":[],\"type\":\"query alert\"}"
35+
"text": "{\"draft_status\":\"published\",\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1747261709\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5}},\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"tags\":[],\"type\":\"query alert\"}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/monitor"
3939
},
4040
"response": {
41-
"bodySize": 981,
41+
"bodySize": 1067,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 981,
45-
"text": "{\"id\":134549556,\"org_id\":321813,\"type\":\"query alert\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1699552730\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[],\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5},\"new_host_delay\":300,\"silenced\":{}},\"multi\":false,\"created_at\":1699552731000,\"created\":\"2023-11-09T17:58:51.118858+00:00\",\"modified\":\"2023-11-09T17:58:51.118858+00:00\",\"deleted\":null,\"restricted_roles\":null,\"priority\":null,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"[email protected]\",\"id\":2320499}}\n"
44+
"size": 1067,
45+
"text": "{\"id\":172140210,\"org_id\":2,\"type\":\"query alert\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1747261709\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[],\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5},\"new_host_delay\":300,\"silenced\":{},\"avalanche_window\":20},\"multi\":false,\"created_at\":1747261710000,\"created\":\"2025-05-14T22:28:30.512529+00:00\",\"modified\":\"2025-05-14T22:28:30.512529+00:00\",\"deleted\":null,\"priority\":null,\"draft_status\":\"published\",\"restricted_roles\":null,\"restriction_policy\":null,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":\"Carl Martensen\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\",\"id\":638339},\"run_as\":null,\"restricted\":true}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 648,
54+
"headersSize": 681,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-11-09T17:58:50.785Z",
61-
"time": 414
60+
"startedDateTime": "2025-05-14T22:28:29.996Z",
61+
"time": 611
6262
},
6363
{
64-
"_id": "6866c0f8f9db33100e7017cd83eedcf3",
64+
"_id": "0683aa738ca03ce0e2029197cfa8bf70",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,14 +78,14 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v1/monitor/134549556"
81+
"url": "https://api.datadoghq.com/api/v1/monitor/172140210"
8282
},
8383
"response": {
8484
"bodySize": 33,
8585
"content": {
8686
"mimeType": "application/json",
8787
"size": 33,
88-
"text": "{\"deleted_monitor_id\":134549556}\n"
88+
"text": "{\"deleted_monitor_id\":172140210}\n"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -94,14 +94,14 @@
9494
"value": "application/json"
9595
}
9696
],
97-
"headersSize": 516,
97+
"headersSize": 547,
9898
"httpVersion": "HTTP/1.1",
9999
"redirectURL": "",
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2023-11-09T17:58:51.211Z",
104-
"time": 505
103+
"startedDateTime": "2025-05-14T22:28:30.617Z",
104+
"time": 309
105105
}
106106
],
107107
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2022-03-17T20:05:01.132Z"
1+
"2025-05-14T22:17:22.560Z"

0 commit comments

Comments
 (0)