Skip to content
Open
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
66 changes: 66 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7255,6 +7255,12 @@ components:
Monitor:
description: Object describing a monitor.
properties:
assets:
description: The list of monitor assets tied to a monitor, which represents
key links for users to take action on monitor alerts (for example, runbooks).
items:
$ref: '#/components/schemas/MonitorAsset'
type: array
created:
description: Timestamp of the monitor creation.
format: date-time
Expand Down Expand Up @@ -7338,6 +7344,52 @@ components:
- type
- query
type: object
MonitorAsset:
description: 'Represents key links tied to a monitor to help users take action
on alerts.

This feature is in Preview and only available to users with the feature enabled.'
properties:
category:
$ref: '#/components/schemas/MonitorAssetCategory'
name:
description: Name for the monitor asset
example: Monitor Runbook
type: string
resource_key:
description: Represents the identifier of the internal Datadog resource
that this asset represents. IDs in this field should be passed in as strings.
example: '12345'
type: string
resource_type:
$ref: '#/components/schemas/MonitorAssetResourceType'
url:
description: URL link for the asset. For links with an internal resource
type set, this should be the relative path to where the Datadog domain
is appended internally. For external links, this should be the full URL
path.
example: /notebooks/12345
type: string
required:
- name
- url
- category
type: object
MonitorAssetCategory:
description: Indicates the type of asset this entity represents on a monitor.
enum:
- runbook
example: runbook
type: string
x-enum-varnames:
- RUNBOOK
MonitorAssetResourceType:
description: Type of internal Datadog resource associated with a monitor asset.
enum:
- notebook
type: string
x-enum-varnames:
- NOTEBOOK
MonitorDeviceID:
description: ID of the device the Synthetics monitor is running on. Same as
`SyntheticsDeviceID`.
Expand Down Expand Up @@ -8452,6 +8504,13 @@ components:
MonitorUpdateRequest:
description: Object describing a monitor update request.
properties:
assets:
description: The list of monitor assets tied to a monitor, which represents
key links for users to take action on monitor alerts (for example, runbooks).
items:
$ref: '#/components/schemas/MonitorAsset'
nullable: true
type: array
created:
description: Timestamp of the monitor creation.
format: date-time
Expand Down Expand Up @@ -31584,6 +31643,13 @@ paths:
required: false
schema:
type: boolean
- description: If this argument is set to `true`, the returned data includes
all assets tied to this monitor.
in: query
name: with_assets
required: false
schema:
type: boolean
responses:
'200':
content:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2024-10-10T16:41:03.364Z"
"2025-11-21T18:03:25.715Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"entries": [
{
"_id": "62c1e3defa62bf481b4b4353145ae62f",
"_id": "64369370ce789bf70440a5c00ccb482e",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -32,17 +32,17 @@
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Check_if_a_monitor_can_be_deleted_returns_OK_response-1728578463\",\"options\":{\"enable_logs_sample\":true,\"escalation_message\":\"the situation has escalated\",\"evaluation_delay\":700,\"include_tags\":true,\"locked\":false,\"new_host_delay\":600,\"no_data_timeframe\":null,\"notification_preset_name\":\"hide_handles\",\"notify_audit\":false,\"notify_no_data\":false,\"on_missing_data\":\"show_and_notify_no_data\",\"renotify_interval\":60,\"require_full_window\":true,\"thresholds\":{\"critical\":2,\"warning\":1},\"timeout_h\":24},\"priority\":3,\"query\":\"logs(\\\"service:foo AND type:error\\\").index(\\\"main\\\").rollup(\\\"count\\\").by(\\\"source\\\").last(\\\"5m\\\") > 2\",\"tags\":[\"test:testcheckifamonitorcanbedeletedreturnsokresponse1728578463\",\"env:ci\"],\"type\":\"log alert\"}"
"text": "{\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Check_if_a_monitor_can_be_deleted_returns_OK_response-1763748205\",\"options\":{\"enable_logs_sample\":true,\"escalation_message\":\"the situation has escalated\",\"evaluation_delay\":700,\"include_tags\":true,\"locked\":false,\"new_host_delay\":600,\"no_data_timeframe\":null,\"notification_preset_name\":\"hide_handles\",\"notify_audit\":false,\"notify_no_data\":false,\"on_missing_data\":\"show_and_notify_no_data\",\"renotify_interval\":60,\"require_full_window\":true,\"thresholds\":{\"critical\":2,\"warning\":1},\"timeout_h\":24},\"priority\":3,\"query\":\"logs(\\\"service:foo AND type:error\\\").index(\\\"main\\\").rollup(\\\"count\\\").by(\\\"source\\\").last(\\\"5m\\\") > 2\",\"tags\":[\"test:testcheckifamonitorcanbedeletedreturnsokresponse1763748205\",\"env:ci\"],\"type\":\"log alert\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/monitor"
},
"response": {
"bodySize": 1216,
"bodySize": 1279,
"content": {
"mimeType": "application/json",
"size": 1216,
"text": "{\"id\":155845287,\"org_id\":321813,\"type\":\"log alert\",\"name\":\"Test-Check_if_a_monitor_can_be_deleted_returns_OK_response-1728578463\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[\"test:testcheckifamonitorcanbedeletedreturnsokresponse1728578463\",\"env:ci\"],\"query\":\"logs(\\\"service:foo AND type:error\\\").index(\\\"main\\\").rollup(\\\"count\\\").by(\\\"source\\\").last(\\\"5m\\\") > 2\",\"options\":{\"enable_logs_sample\":true,\"escalation_message\":\"the situation has escalated\",\"evaluation_delay\":700,\"include_tags\":true,\"locked\":false,\"new_host_delay\":600,\"no_data_timeframe\":null,\"notification_preset_name\":\"hide_handles\",\"notify_audit\":false,\"notify_no_data\":false,\"on_missing_data\":\"show_and_notify_no_data\",\"renotify_interval\":60,\"require_full_window\":true,\"thresholds\":{\"critical\":2.0,\"warning\":1.0},\"timeout_h\":24,\"groupby_simple_monitor\":false,\"silenced\":{}},\"multi\":true,\"created_at\":1728578463000,\"created\":\"2024-10-10T16:41:03.666877+00:00\",\"modified\":\"2024-10-10T16:41:03.666877+00:00\",\"deleted\":null,\"restricted_roles\":null,\"priority\":3,\"restriction_policy\":null,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\",\"id\":1445416}}\n"
"size": 1279,
"text": "{\"id\":238669218,\"org_id\":197728,\"type\":\"log alert\",\"name\":\"Test-Check_if_a_monitor_can_be_deleted_returns_OK_response-1763748205\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[\"test:testcheckifamonitorcanbedeletedreturnsokresponse1763748205\",\"env:ci\"],\"query\":\"logs(\\\"service:foo AND type:error\\\").index(\\\"main\\\").rollup(\\\"count\\\").by(\\\"source\\\").last(\\\"5m\\\") > 2\",\"options\":{\"enable_logs_sample\":true,\"escalation_message\":\"the situation has escalated\",\"evaluation_delay\":700,\"include_tags\":true,\"locked\":false,\"new_host_delay\":600,\"no_data_timeframe\":null,\"notification_preset_name\":\"hide_handles\",\"notify_audit\":false,\"notify_no_data\":false,\"on_missing_data\":\"show_and_notify_no_data\",\"renotify_interval\":60,\"require_full_window\":true,\"thresholds\":{\"critical\":2.0,\"warning\":1.0},\"timeout_h\":24,\"groupby_simple_monitor\":false,\"silenced\":{}},\"multi\":true,\"created_at\":1763748206000,\"created\":\"2025-11-21T18:03:26.123200+00:00\",\"modified\":\"2025-11-21T18:03:26.123200+00:00\",\"deleted\":null,\"priority\":3,\"restricted_roles\":null,\"restriction_policy\":null,\"draft_status\":\"published\",\"assets\":[],\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":\"Kevin Pombo\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\",\"id\":25712273}}\n"
},
"cookies": [],
"headers": [
Expand All @@ -51,17 +51,17 @@
"value": "application/json"
}
],
"headersSize": 649,
"headersSize": 680,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-10-10T16:41:03.374Z",
"time": 304
"startedDateTime": "2025-11-21T18:03:25.718Z",
"time": 548
},
{
"_id": "fe8eb62109884b2c2e0ca4de081e1292",
"_id": "b910a25a9bfd243ae785136906d2686b",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -80,17 +80,17 @@
"queryString": [
{
"name": "monitor_ids",
"value": "155845287"
"value": "238669218"
}
],
"url": "https://api.datadoghq.com/api/v1/monitor/can_delete?monitor_ids=155845287"
"url": "https://api.datadoghq.com/api/v1/monitor/can_delete?monitor_ids=238669218"
},
"response": {
"bodySize": 42,
"content": {
"mimeType": "application/json",
"size": 42,
"text": "{\"data\":{\"ok\":[155845287]},\"errors\":null}\n"
"text": "{\"data\":{\"ok\":[238669218]},\"errors\":null}\n"
},
"cookies": [],
"headers": [
Expand All @@ -99,17 +99,17 @@
"value": "application/json"
}
],
"headersSize": 649,
"headersSize": 680,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-10-10T16:41:03.695Z",
"startedDateTime": "2025-11-21T18:03:26.277Z",
"time": 208
},
{
"_id": "7b83b1dbcc7a0c778618976742a2bf71",
"_id": "15cac4bb0036071dd3bbe58080377ecc",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -126,14 +126,14 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/monitor/155845287"
"url": "https://api.datadoghq.com/api/v1/monitor/238669218"
},
"response": {
"bodySize": 33,
"content": {
"mimeType": "application/json",
"size": 33,
"text": "{\"deleted_monitor_id\":155845287}\n"
"text": "{\"deleted_monitor_id\":238669218}\n"
},
"cookies": [],
"headers": [
Expand All @@ -142,14 +142,14 @@
"value": "application/json"
}
],
"headersSize": 516,
"headersSize": 547,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-10-10T16:41:03.918Z",
"time": 274
"startedDateTime": "2025-11-21T18:03:26.495Z",
"time": 302
}
],
"pages": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2025-11-21T19:04:55.769Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"log": {
"_recordingName": "Monitors/Create a monitor with assets returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "ec3506ee213b45ef4679b54a52344b5e",
"_order": 0,
"cache": {},
"request": {
"bodySize": 460,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 555,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"assets\":[{\"category\":\"runbook\",\"name\":\"Monitor Runbook\",\"resource_key\":\"12345\",\"resource_type\":\"notebook\",\"url\":\"/notebooks/12345\"}],\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Create_a_monitor_with_assets_returns_OK_response-1763751895\",\"options\":{\"scheduling_options\":{\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5}},\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"type\":\"metric alert\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/monitor"
},
"response": {
"bodySize": 1099,
"content": {
"mimeType": "application/json",
"size": 1099,
"text": "{\"id\":238681257,\"org_id\":321813,\"type\":\"query alert\",\"name\":\"Test-Create_a_monitor_with_assets_returns_OK_response-1763751895\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[],\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"options\":{\"scheduling_options\":{\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5},\"notify_no_data\":false,\"notify_audit\":false,\"new_host_delay\":300,\"include_tags\":true,\"silenced\":{}},\"multi\":false,\"created_at\":1763751896000,\"created\":\"2025-11-21T19:04:56.060346+00:00\",\"modified\":\"2025-11-21T19:04:56.060346+00:00\",\"deleted\":null,\"priority\":null,\"restricted_roles\":null,\"restriction_policy\":null,\"draft_status\":\"published\",\"assets\":[{\"monitor_id\":238681257,\"name\":\"Monitor Runbook\",\"category\":\"runbook\",\"url\":\"/notebooks/12345\",\"template_variables\":{},\"options\":{},\"resource_key\":\"12345\",\"resource_type\":\"notebook\"}],\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"[email protected]\",\"id\":2320499}}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 680,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2025-11-21T19:04:55.777Z",
"time": 359
},
{
"_id": "f18e695b1d8fa348c5c01a0547585bd4",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
}
],
"headersSize": 514,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/monitor/238681257"
},
"response": {
"bodySize": 33,
"content": {
"mimeType": "application/json",
"size": 33,
"text": "{\"deleted_monitor_id\":238681257}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 547,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2025-11-21T19:04:56.146Z",
"time": 354
}
],
"pages": [],
"version": "1.2"
}
}
Loading