Skip to content

Add monitor draft status field #2410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6",
"regenerated": "2025-06-04 12:51:42.017087",
"spec_repo_commit": "35a63137"
"regenerated": "2025-06-04 17:40:37.545082",
"spec_repo_commit": "38b3c05a"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-04 12:51:42.033972",
"spec_repo_commit": "35a63137"
"regenerated": "2025-06-04 17:40:37.581829",
"spec_repo_commit": "38b3c05a"
}
}
}
26 changes: 26 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6742,6 +6742,8 @@ components:
nullable: true
readOnly: true
type: string
draft_status:
$ref: '#/components/schemas/MonitorDraftStatus'
id:
description: ID of this monitor.
format: int64
Expand Down Expand Up @@ -6834,6 +6836,28 @@ components:
- FIREFOX_LAPTOP_LARGE
- FIREFOX_TABLET
- FIREFOX_MOBILE_SMALL
MonitorDraftStatus:
default: published
description: 'Indicates whether the monitor is in a draft or published state.


`draft`: The monitor appears as Draft and does not send notifications.

`published`: The monitor is active and evaluates conditions and notify as
configured.


This field is in preview. The draft value is only available to customers with
the feature enabled.

'
enum:
- draft
- published
type: string
x-enum-varnames:
- DRAFT
- PUBLISHED
MonitorFormulaAndFunctionCostAggregator:
description: Aggregation methods for metric queries.
enum:
Expand Down Expand Up @@ -7917,6 +7941,8 @@ components:
nullable: true
readOnly: true
type: string
draft_status:
$ref: '#/components/schemas/MonitorDraftStatus'
id:
description: ID of this monitor.
format: int64
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-02-02T21:04:10.597Z
2025-05-14T22:27:13.829Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-11-09T17:58:50.774Z
2025-05-14T22:28:29.992Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-03-17T20:05:01.132Z
2025-05-14T22:17:22.560Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/v1/monitors/CreateMonitor_1539578087.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
}),
}),
type: DatadogAPIClient::V1::MonitorType::QUERY_ALERT,
draft_status: DatadogAPIClient::V1::MonitorDraftStatus::PUBLISHED,
})
p api_instance.create_monitor(body)
1 change: 1 addition & 0 deletions examples/v1/monitors/CreateMonitor_440013737.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
critical: 1,
}),
}),
draft_status: DatadogAPIClient::V1::MonitorDraftStatus::DRAFT,
})
p api_instance.create_monitor(body)
3 changes: 2 additions & 1 deletion features/v1/monitor_error_tracking_alert_payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"message": "some message",
"tags": ["test:{{ unique_lower_alnum }}", "env:ci"],
"priority": 3,
"options": { "thresholds": { "critical": 1 } }
"options": { "thresholds": { "critical": 1 } },
"draft_status": "draft"
}
Loading
Loading