Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_QueryParams
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JarrResp
integer li_RespStatusCode
oleobject loo_Json
string ls_V_type
string ls_Query
string ls_Created
string ls_V_Email
string ls_Handle
string ls_Name
string ls_Deleted
integer li_Id
string ls_Message
string ls_Modified
integer li_Multi
string ls_Name
string ls_Group_by
string ls_Metric
string ls_V_Type
integer li_Enable_logs_sample
integer li_Enable_samples
string ls_Escalation_message
integer li_Evaluation_delay
string ls_Group_retention_duration
integer li_Groupby_simple_monitor
integer li_Include_tags
integer li_Locked
integer li_Min_failure_duration
integer li_Min_location_failed
integer li_New_group_delay
integer li_New_host_delay
integer li_No_data_timeframe
string ls_Notification_preset_name
integer li_Notify_audit
integer li_Notify_no_data
string ls_On_missing_data
string ls_Renotify_interval
integer li_Renotify_occurrences
integer li_Require_full_window
string ls_Day_starts
integer li_Hour_starts
integer li_Month_starts
integer li_Ut_d_e
string ls_Synthetics_check_id
string ls_Recovery_window
string ls_Trigger_window
string ls_Critical
string ls_Critical_recovery
string ls_Ok
string ls_Unknown
string ls_Warning
string ls_Warning_recovery
string ls_Timeout_h
string ls_Overall_state
integer li_Priority
integer li_Last_nodata_ts
integer li_Last_notified_ts
integer li_Last_resolved_ts
integer li_Last_triggered_ts
string ls_Ullamco2Name
string ls_Status
integer li_Voluptate_0cLast_nodata_ts
integer li_Voluptate_0cLast_notified_ts
integer li_Voluptate_0cLast_resolved_ts
integer li_Voluptate_0cLast_triggered_ts
string ls_Voluptate_0cName
string ls_Voluptate_0cStatus
integer li_Ut_8
integer li_Ut7Last_nodata_ts
integer li_Ut7Last_notified_ts
integer li_Ut7Last_resolved_ts
integer li_Ut7Last_triggered_ts
string ls_Ut7Name
string ls_Ut7Status
integer j
integer li_Count_j
integer li_V_end
integer li_Start
integer k
integer li_Count_k
string ls_StrVal
string ls_Data_source
string ls_Aggregation
integer li_Interval
string ls_ComputeMetric
string ls_Query
string ls_Facet
integer li_Limit
string ls_SortAggregation
string ls_SortMetric
string ls_Order
integer i
integer li_Count_i
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_QueryParams = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_QueryParams.ConnectToNewObject("Chilkat.JsonObject")
loo_QueryParams.UpdateString("group_states","alert")
loo_QueryParams.UpdateString("name","tempor Ut sed velit")
loo_QueryParams.UpdateString("tags","host:host0")
loo_QueryParams.UpdateString("monitor_tags","service:my-app")
loo_QueryParams.UpdateString("with_downtimes","true")
loo_QueryParams.UpdateInt("id_offset",-62147425)
loo_QueryParams.UpdateInt("page",0)
loo_QueryParams.UpdateInt("page_size",20)
loo_Http.SetRequestHeader("Accept","application/json")
loo_Resp = loo_Http.QuickRequestParams("GET","https://api.app.ddog-gov.com/api/v1/monitor",loo_QueryParams)
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
destroy loo_QueryParams
return
end if
loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")
loo_Resp.GetBodySb(loo_SbResponseBody)
loo_JarrResp = create oleobject
// Use "Chilkat_9_5_0.JsonArray" for versions of Chilkat < 10.0.0
li_rc = loo_JarrResp.ConnectToNewObject("Chilkat.JsonArray")
loo_JarrResp.LoadSb(loo_SbResponseBody)
loo_JarrResp.EmitCompact = 0
Write-Debug "Response Body:"
Write-Debug loo_JarrResp.Emit()
li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
Write-Debug "Response Header:"
Write-Debug loo_Resp.Header
Write-Debug "Failed."
destroy loo_Resp
destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JarrResp
return
end if
destroy loo_Resp
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// [
// {
// "type": "query alert",
// "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100",
// "created": "1977-10-10T13:08:01.527Z",
// "creator": {
// "email": "eiusmod aliquip pariatur dolore",
// "handle": "fugiat id sint",
// "name": "elit in"
// },
// "deleted": "2015-07-16T18:46:50.390Z",
// "id": 83649643,
// "matching_downtimes": [
// {
// "id": 1625,
// "end": 1412792983,
// "scope": [
// "env:staging"
// ],
// "start": 1412792983
// },
// {
// "id": 1625,
// "end": 1412792983,
// "scope": [
// "env:staging"
// ],
// "start": 1412792983
// }
// ],
// "message": "adi",
// "modified": "1973-08-05T09:10:13.718Z",
// "multi": false,
// "name": "My monitor",
// "options": {
// "aggregation": {
// "group_by": "host",
// "metric": "metrics.name",
// "type": "count"
// },
// "device_ids": [
// "firefox.tablet",
// "mobile_small"
// ],
// "enable_logs_sample": true,
// "enable_samples": true,
// "escalation_message": "none",
// "evaluation_delay": 27121357,
// "group_retention_duration": "esse aliquip ullamco irure",
// "groupby_simple_monitor": true,
// "include_tags": true,
// "locked": false,
// "min_failure_duration": 0,
// "min_location_failed": 1,
// "new_group_delay": -9275927,
// "new_host_delay": 300,
// "no_data_timeframe": 58492166,
// "notification_preset_name": "show_all",
// "notify_audit": false,
// "notify_by": [
// "ut quis e",
// "dolore elit"
// ],
// "notify_no_data": false,
// "on_missing_data": "show_no_data",
// "renotify_interval": null,
// "renotify_occurrences": -27638100,
// "renotify_statuses": [
// "alert",
// "warn"
// ],
// "require_full_window": true,
// "scheduling_options": {
// "evaluation_window": {
// "day_starts": "04:00",
// "hour_starts": 0,
// "month_starts": 1
// }
// },
// "silenced": {
// "Ut_d_e": 94650378
// },
// "synthetics_check_id": "enim et tempor",
// "threshold_windows": {
// "recovery_window": "ipsum eiusmod",
// "trigger_window": "ullamco"
// },
// "thresholds": {
// "critical": -74585739.55469063,
// "critical_recovery": -14449679.792215124,
// "ok": 69468073.65422091,
// "unknown": -35840527.53565459,
// "warning": -78191860.79094723,
// "warning_recovery": 30967604.742167816
// },
// "timeout_h": null,
// "variables": [
// {
// "data_source": "rum",
// "compute": {
// "aggregation": "avg",
// "interval": 60000,
// "metric": "@duration"
// },
// "name": "query_errors",
// "group_by": [
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "qui Ut cupidatat proid",
// "order": "desc"
// }
// },
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "nostrud mollit",
// "order": "desc"
// }
// }
// ],
// "indexes": [
// "days-3",
// "days-7"
// ],
// "search": {
// "query": "service:query"
// }
// },
// {
// "data_source": "rum",
// "compute": {
// "aggregation": "avg",
// "interval": 60000,
// "metric": "@duration"
// },
// "name": "query_errors",
// "group_by": [
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "ut non",
// "order": "desc"
// }
// },
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "reprehenderit sint eu proident",
// "order": "desc"
// }
// }
// ],
// "indexes": [
// "days-3",
// "days-7"
// ],
// "search": {
// "query": "service:query"
// }
// }
// ]
// },
// "overall_state": "Unknown",
// "priority": 4,
// "restricted_roles": [
// "Ut",
// "dolor ad Duis proident"
// ],
// "state": {
// "groups": {
// "ullamco2": {
// "last_nodata_ts": -30657062,
// "last_notified_ts": -69789968,
// "last_resolved_ts": -40935564,
// "last_triggered_ts": 63742261,
// "name": "id",
// "status": "Alert"
// },
// "voluptate_0c": {
// "last_nodata_ts": 13097104,
// "last_notified_ts": 53104444,
// "last_resolved_ts": -69320667,
// "last_triggered_ts": 27152807,
// "name": "quis amet",
// "status": "Alert"
// }
// }
// },
// "tags": [
// "fugiat culpa aliqua consectetur",
// "minim in"
// ]
// },
// {
// "type": "query alert",
// "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100",
// "created": "1952-04-01T14:02:58.093Z",
// "creator": {
// "email": "esse ad veniam qui",
// "handle": "nulla enim non",
// "name": "ut reprehend"
// },
// "deleted": "2005-07-24T20:18:36.078Z",
// "id": 14961847,
// "matching_downtimes": [
// {
// "id": 1625,
// "end": 1412792983,
// "scope": [
// "env:staging"
// ],
// "start": 1412792983
// },
// {
// "id": 1625,
// "end": 1412792983,
// "scope": [
// "env:staging"
// ],
// "start": 1412792983
// }
// ],
// "message": "labore nulla",
// "modified": "2013-05-28T22:30:26.014Z",
// "multi": true,
// "name": "My monitor",
// "options": {
// "aggregation": {
// "group_by": "host",
// "metric": "metrics.name",
// "type": "count"
// },
// "device_ids": [
// "chrome.tablet",
// "firefox.laptop_large"
// ],
// "enable_logs_sample": false,
// "enable_samples": true,
// "escalation_message": "none",
// "evaluation_delay": 48023490,
// "group_retention_duration": "veniam eiusmod anim",
// "groupby_simple_monitor": true,
// "include_tags": true,
// "locked": false,
// "min_failure_duration": 0,
// "min_location_failed": 1,
// "new_group_delay": -78698406,
// "new_host_delay": 300,
// "no_data_timeframe": -29298203,
// "notification_preset_name": "show_all",
// "notify_audit": false,
// "notify_by": [
// "in labore irure reprehenderit",
// "Ut ea"
// ],
// "notify_no_data": false,
// "on_missing_data": "default",
// "renotify_interval": null,
// "renotify_occurrences": 88843653,
// "renotify_statuses": [
// "warn",
// "no data"
// ],
// "require_full_window": false,
// "scheduling_options": {
// "evaluation_window": {
// "day_starts": "04:00",
// "hour_starts": 0,
// "month_starts": 1
// }
// },
// "silenced": {
// "ut_8": -75892703
// },
// "synthetics_check_id": "ut et aute cupidatat",
// "threshold_windows": {
// "recovery_window": "dolor do",
// "trigger_window": "pariatur"
// },
// "thresholds": {
// "critical": -5336230.352944598,
// "critical_recovery": 7945004.71738635,
// "ok": -68115416.21610427,
// "unknown": 89541673.34797806,
// "warning": 66901483.96194494,
// "warning_recovery": -39599171.26178945
// },
// "timeout_h": null,
// "variables": [
// {
// "data_source": "rum",
// "compute": {
// "aggregation": "avg",
// "interval": 60000,
// "metric": "@duration"
// },
// "name": "query_errors",
// "group_by": [
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "deserunt nisi mollit",
// "order": "desc"
// }
// },
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "dolor pariatur",
// "order": "desc"
// }
// }
// ],
// "indexes": [
// "days-3",
// "days-7"
// ],
// "search": {
// "query": "service:query"
// }
// },
// {
// "data_source": "rum",
// "compute": {
// "aggregation": "avg",
// "interval": 60000,
// "metric": "@duration"
// },
// "name": "query_errors",
// "group_by": [
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "l",
// "order": "desc"
// }
// },
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "ut non",
// "order": "desc"
// }
// }
// ],
// "indexes": [
// "days-3",
// "days-7"
// ],
// "search": {
// "query": "service:query"
// }
// }
// ]
// },
// "overall_state": "Unknown",
// "priority": 3,
// "restricted_roles": [
// "ipsum laboris laborum incididunt",
// "fugiat non est"
// ],
// "state": {
// "groups": {
// "Ut7": {
// "last_nodata_ts": 21127128,
// "last_notified_ts": 19208840,
// "last_resolved_ts": 29022384,
// "last_triggered_ts": -96682791,
// "name": "ex tempor",
// "status": "OK"
// }
// }
// },
// "tags": [
// "dolor nulla dolore elit",
// "consequat sunt in"
// ]
// }
// ]
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
i = 0
li_Count_i = loo_JarrResp.Size
do while i < li_Count_i
loo_Json = loo_JarrResp.ObjectAt(i)
ls_V_type = loo_Json.StringOf("type")
ls_Query = loo_Json.StringOf("query")
ls_Created = loo_Json.StringOf("created")
ls_V_Email = loo_Json.StringOf("creator.email")
ls_Handle = loo_Json.StringOf("creator.handle")
ls_Name = loo_Json.StringOf("creator.name")
ls_Deleted = loo_Json.StringOf("deleted")
li_Id = loo_Json.IntOf("id")
ls_Message = loo_Json.StringOf("message")
ls_Modified = loo_Json.StringOf("modified")
li_Multi = loo_Json.BoolOf("multi")
ls_Name = loo_Json.StringOf("name")
ls_Group_by = loo_Json.StringOf("options.aggregation.group_by")
ls_Metric = loo_Json.StringOf("options.aggregation.metric")
ls_V_Type = loo_Json.StringOf("options.aggregation.type")
li_Enable_logs_sample = loo_Json.BoolOf("options.enable_logs_sample")
li_Enable_samples = loo_Json.BoolOf("options.enable_samples")
ls_Escalation_message = loo_Json.StringOf("options.escalation_message")
li_Evaluation_delay = loo_Json.IntOf("options.evaluation_delay")
ls_Group_retention_duration = loo_Json.StringOf("options.group_retention_duration")
li_Groupby_simple_monitor = loo_Json.BoolOf("options.groupby_simple_monitor")
li_Include_tags = loo_Json.BoolOf("options.include_tags")
li_Locked = loo_Json.BoolOf("options.locked")
li_Min_failure_duration = loo_Json.IntOf("options.min_failure_duration")
li_Min_location_failed = loo_Json.IntOf("options.min_location_failed")
li_New_group_delay = loo_Json.IntOf("options.new_group_delay")
li_New_host_delay = loo_Json.IntOf("options.new_host_delay")
li_No_data_timeframe = loo_Json.IntOf("options.no_data_timeframe")
ls_Notification_preset_name = loo_Json.StringOf("options.notification_preset_name")
li_Notify_audit = loo_Json.BoolOf("options.notify_audit")
li_Notify_no_data = loo_Json.BoolOf("options.notify_no_data")
ls_On_missing_data = loo_Json.StringOf("options.on_missing_data")
ls_Renotify_interval = loo_Json.StringOf("options.renotify_interval")
li_Renotify_occurrences = loo_Json.IntOf("options.renotify_occurrences")
li_Require_full_window = loo_Json.BoolOf("options.require_full_window")
ls_Day_starts = loo_Json.StringOf("options.scheduling_options.evaluation_window.day_starts")
li_Hour_starts = loo_Json.IntOf("options.scheduling_options.evaluation_window.hour_starts")
li_Month_starts = loo_Json.IntOf("options.scheduling_options.evaluation_window.month_starts")
li_Ut_d_e = loo_Json.IntOf("options.silenced.Ut_d_e")
ls_Synthetics_check_id = loo_Json.StringOf("options.synthetics_check_id")
ls_Recovery_window = loo_Json.StringOf("options.threshold_windows.recovery_window")
ls_Trigger_window = loo_Json.StringOf("options.threshold_windows.trigger_window")
ls_Critical = loo_Json.StringOf("options.thresholds.critical")
ls_Critical_recovery = loo_Json.StringOf("options.thresholds.critical_recovery")
ls_Ok = loo_Json.StringOf("options.thresholds.ok")
ls_Unknown = loo_Json.StringOf("options.thresholds.unknown")
ls_Warning = loo_Json.StringOf("options.thresholds.warning")
ls_Warning_recovery = loo_Json.StringOf("options.thresholds.warning_recovery")
ls_Timeout_h = loo_Json.StringOf("options.timeout_h")
ls_Overall_state = loo_Json.StringOf("overall_state")
li_Priority = loo_Json.IntOf("priority")
li_Last_nodata_ts = loo_Json.IntOf("state.groups.ullamco2.last_nodata_ts")
li_Last_notified_ts = loo_Json.IntOf("state.groups.ullamco2.last_notified_ts")
li_Last_resolved_ts = loo_Json.IntOf("state.groups.ullamco2.last_resolved_ts")
li_Last_triggered_ts = loo_Json.IntOf("state.groups.ullamco2.last_triggered_ts")
ls_Ullamco2Name = loo_Json.StringOf("state.groups.ullamco2.name")
ls_Status = loo_Json.StringOf("state.groups.ullamco2.status")
li_Voluptate_0cLast_nodata_ts = loo_Json.IntOf("state.groups.voluptate_0c.last_nodata_ts")
li_Voluptate_0cLast_notified_ts = loo_Json.IntOf("state.groups.voluptate_0c.last_notified_ts")
li_Voluptate_0cLast_resolved_ts = loo_Json.IntOf("state.groups.voluptate_0c.last_resolved_ts")
li_Voluptate_0cLast_triggered_ts = loo_Json.IntOf("state.groups.voluptate_0c.last_triggered_ts")
ls_Voluptate_0cName = loo_Json.StringOf("state.groups.voluptate_0c.name")
ls_Voluptate_0cStatus = loo_Json.StringOf("state.groups.voluptate_0c.status")
li_Ut_8 = loo_Json.IntOf("options.silenced.ut_8")
li_Ut7Last_nodata_ts = loo_Json.IntOf("state.groups.Ut7.last_nodata_ts")
li_Ut7Last_notified_ts = loo_Json.IntOf("state.groups.Ut7.last_notified_ts")
li_Ut7Last_resolved_ts = loo_Json.IntOf("state.groups.Ut7.last_resolved_ts")
li_Ut7Last_triggered_ts = loo_Json.IntOf("state.groups.Ut7.last_triggered_ts")
ls_Ut7Name = loo_Json.StringOf("state.groups.Ut7.name")
ls_Ut7Status = loo_Json.StringOf("state.groups.Ut7.status")
j = 0
li_Count_j = loo_Json.SizeOfArray("matching_downtimes")
do while j < li_Count_j
loo_Json.J = j
li_Id = loo_Json.IntOf("matching_downtimes[j].id")
li_V_end = loo_Json.IntOf("matching_downtimes[j].end")
li_Start = loo_Json.IntOf("matching_downtimes[j].start")
k = 0
li_Count_k = loo_Json.SizeOfArray("matching_downtimes[j].scope")
do while k < li_Count_k
loo_Json.K = k
ls_StrVal = loo_Json.StringOf("matching_downtimes[j].scope[k]")
k = k + 1
loop
j = j + 1
loop
j = 0
li_Count_j = loo_Json.SizeOfArray("options.device_ids")
do while j < li_Count_j
loo_Json.J = j
ls_StrVal = loo_Json.StringOf("options.device_ids[j]")
j = j + 1
loop
j = 0
li_Count_j = loo_Json.SizeOfArray("options.notify_by")
do while j < li_Count_j
loo_Json.J = j
ls_StrVal = loo_Json.StringOf("options.notify_by[j]")
j = j + 1
loop
j = 0
li_Count_j = loo_Json.SizeOfArray("options.renotify_statuses")
do while j < li_Count_j
loo_Json.J = j
ls_StrVal = loo_Json.StringOf("options.renotify_statuses[j]")
j = j + 1
loop
j = 0
li_Count_j = loo_Json.SizeOfArray("options.variables")
do while j < li_Count_j
loo_Json.J = j
ls_Data_source = loo_Json.StringOf("options.variables[j].data_source")
ls_Aggregation = loo_Json.StringOf("options.variables[j].compute.aggregation")
li_Interval = loo_Json.IntOf("options.variables[j].compute.interval")
ls_ComputeMetric = loo_Json.StringOf("options.variables[j].compute.metric")
ls_Name = loo_Json.StringOf("options.variables[j].name")
ls_Query = loo_Json.StringOf("options.variables[j].search.query")
k = 0
li_Count_k = loo_Json.SizeOfArray("options.variables[j].group_by")
do while k < li_Count_k
loo_Json.K = k
ls_Facet = loo_Json.StringOf("options.variables[j].group_by[k].facet")
li_Limit = loo_Json.IntOf("options.variables[j].group_by[k].limit")
ls_SortAggregation = loo_Json.StringOf("options.variables[j].group_by[k].sort.aggregation")
ls_SortMetric = loo_Json.StringOf("options.variables[j].group_by[k].sort.metric")
ls_Order = loo_Json.StringOf("options.variables[j].group_by[k].sort.order")
k = k + 1
loop
k = 0
li_Count_k = loo_Json.SizeOfArray("options.variables[j].indexes")
do while k < li_Count_k
loo_Json.K = k
ls_StrVal = loo_Json.StringOf("options.variables[j].indexes[k]")
k = k + 1
loop
j = j + 1
loop
j = 0
li_Count_j = loo_Json.SizeOfArray("restricted_roles")
do while j < li_Count_j
loo_Json.J = j
ls_StrVal = loo_Json.StringOf("restricted_roles[j]")
j = j + 1
loop
j = 0
li_Count_j = loo_Json.SizeOfArray("tags")
do while j < li_Count_j
loo_Json.J = j
ls_StrVal = loo_Json.StringOf("tags[j]")
j = j + 1
loop
destroy loo_Json
i = i + 1
loop
destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JarrResp
Curl Command
curl -G -d "group_states=alert"
-d "name=tempor%20Ut%20sed%20velit"
-d "tags=host%3Ahost0"
-d "monitor_tags=service%3Amy-app"
-d "with_downtimes=true"
-d "id_offset=-62147425"
-d "page=0"
-d "page_size=20"
-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/monitor
Postman Collection Item JSON
{
"name": "Get all monitor details",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/monitor?group_states=alert&name=tempor Ut sed velit&tags=host:host0&monitor_tags=service:my-app&with_downtimes=true&id_offset=-62147425&page=0&page_size=20",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor"
],
"query": [
{
"key": "group_states",
"value": "alert",
"description": "When specified, shows additional information about the group states.\nChoose one or more from `all`, `alert`, `warn`, and `no data`."
},
{
"key": "name",
"value": "tempor Ut sed velit",
"description": "A string to filter monitors by name."
},
{
"key": "tags",
"value": "host:host0",
"description": "A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope.\nFor example, `host:host0`."
},
{
"key": "monitor_tags",
"value": "service:my-app",
"description": "A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors.\nTags created in the Datadog UI automatically have the service key prepended. For example, `service:my-app`."
},
{
"key": "with_downtimes",
"value": "true",
"description": "If this argument is set to true, then the returned data includes all current active downtimes for each monitor."
},
{
"key": "id_offset",
"value": "-62147425",
"description": "Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty."
},
{
"key": "page",
"value": "0",
"description": "The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination."
},
{
"key": "page_size",
"value": "20",
"description": "The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a `page_size` limit. However, if page is specified and `page_size` is not, the argument defaults to 100."
}
]
},
"description": "Get details about the specified monitor from your organization."
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/monitor?group_states=alert&name=tempor Ut sed velit&tags=host:host0&monitor_tags=service:my-app&with_downtimes=true&id_offset=-62147425&page=0&page_size=20",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor"
],
"query": [
{
"key": "group_states",
"value": "alert",
"description": "When specified, shows additional information about the group states.\nChoose one or more from `all`, `alert`, `warn`, and `no data`."
},
{
"key": "name",
"value": "tempor Ut sed velit",
"description": "A string to filter monitors by name."
},
{
"key": "tags",
"value": "host:host0",
"description": "A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope.\nFor example, `host:host0`."
},
{
"key": "monitor_tags",
"value": "service:my-app",
"description": "A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors.\nTags created in the Datadog UI automatically have the service key prepended. For example, `service:my-app`."
},
{
"key": "with_downtimes",
"value": "true",
"description": "If this argument is set to true, then the returned data includes all current active downtimes for each monitor."
},
{
"key": "id_offset",
"value": "-62147425",
"description": "Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty."
},
{
"key": "page",
"value": "0",
"description": "The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination."
},
{
"key": "page_size",
"value": "20",
"description": "The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a `page_size` limit. However, if page is specified and `page_size` is not, the argument defaults to 100."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "[\n {\n \"type\": \"query alert\",\n \"query\": \"avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100\",\n \"created\": \"1977-10-10T13:08:01.527Z\",\n \"creator\": {\n \"email\": \"eiusmod aliquip pariatur dolore\",\n \"handle\": \"fugiat id sint\",\n \"name\": \"elit in\"\n },\n \"deleted\": \"2015-07-16T18:46:50.390Z\",\n \"id\": 83649643,\n \"matching_downtimes\": [\n {\n \"id\": 1625,\n \"end\": 1412792983,\n \"scope\": [\n \"env:staging\"\n ],\n \"start\": 1412792983\n },\n {\n \"id\": 1625,\n \"end\": 1412792983,\n \"scope\": [\n \"env:staging\"\n ],\n \"start\": 1412792983\n }\n ],\n \"message\": \"adi\",\n \"modified\": \"1973-08-05T09:10:13.718Z\",\n \"multi\": false,\n \"name\": \"My monitor\",\n \"options\": {\n \"aggregation\": {\n \"group_by\": \"host\",\n \"metric\": \"metrics.name\",\n \"type\": \"count\"\n },\n \"device_ids\": [\n \"firefox.tablet\",\n \"mobile_small\"\n ],\n \"enable_logs_sample\": true,\n \"enable_samples\": true,\n \"escalation_message\": \"none\",\n \"evaluation_delay\": 27121357,\n \"group_retention_duration\": \"esse aliquip ullamco irure\",\n \"groupby_simple_monitor\": true,\n \"include_tags\": true,\n \"locked\": false,\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"new_group_delay\": -9275927,\n \"new_host_delay\": 300,\n \"no_data_timeframe\": 58492166,\n \"notification_preset_name\": \"show_all\",\n \"notify_audit\": false,\n \"notify_by\": [\n \"ut quis e\",\n \"dolore elit\"\n ],\n \"notify_no_data\": false,\n \"on_missing_data\": \"show_no_data\",\n \"renotify_interval\": null,\n \"renotify_occurrences\": -27638100,\n \"renotify_statuses\": [\n \"alert\",\n \"warn\"\n ],\n \"require_full_window\": true,\n \"scheduling_options\": {\n \"evaluation_window\": {\n \"day_starts\": \"04:00\",\n \"hour_starts\": 0,\n \"month_starts\": 1\n }\n },\n \"silenced\": {\n \"Ut_d_e\": 94650378\n },\n \"synthetics_check_id\": \"enim et tempor\",\n \"threshold_windows\": {\n \"recovery_window\": \"ipsum eiusmod\",\n \"trigger_window\": \"ullamco\"\n },\n \"thresholds\": {\n \"critical\": -74585739.55469063,\n \"critical_recovery\": -14449679.792215124,\n \"ok\": 69468073.65422091,\n \"unknown\": -35840527.53565459,\n \"warning\": -78191860.79094723,\n \"warning_recovery\": 30967604.742167816\n },\n \"timeout_h\": null,\n \"variables\": [\n {\n \"data_source\": \"rum\",\n \"compute\": {\n \"aggregation\": \"avg\",\n \"interval\": 60000,\n \"metric\": \"@duration\"\n },\n \"name\": \"query_errors\",\n \"group_by\": [\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"qui Ut cupidatat proid\",\n \"order\": \"desc\"\n }\n },\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"nostrud mollit\",\n \"order\": \"desc\"\n }\n }\n ],\n \"indexes\": [\n \"days-3\",\n \"days-7\"\n ],\n \"search\": {\n \"query\": \"service:query\"\n }\n },\n {\n \"data_source\": \"rum\",\n \"compute\": {\n \"aggregation\": \"avg\",\n \"interval\": 60000,\n \"metric\": \"@duration\"\n },\n \"name\": \"query_errors\",\n \"group_by\": [\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"ut non\",\n \"order\": \"desc\"\n }\n },\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"reprehenderit sint eu proident\",\n \"order\": \"desc\"\n }\n }\n ],\n \"indexes\": [\n \"days-3\",\n \"days-7\"\n ],\n \"search\": {\n \"query\": \"service:query\"\n }\n }\n ]\n },\n \"overall_state\": \"Unknown\",\n \"priority\": 4,\n \"restricted_roles\": [\n \"Ut\",\n \"dolor ad Duis proident\"\n ],\n \"state\": {\n \"groups\": {\n \"ullamco2\": {\n \"last_nodata_ts\": -30657062,\n \"last_notified_ts\": -69789968,\n \"last_resolved_ts\": -40935564,\n \"last_triggered_ts\": 63742261,\n \"name\": \"id\",\n \"status\": \"Alert\"\n },\n \"voluptate_0c\": {\n \"last_nodata_ts\": 13097104,\n \"last_notified_ts\": 53104444,\n \"last_resolved_ts\": -69320667,\n \"last_triggered_ts\": 27152807,\n \"name\": \"quis amet\",\n \"status\": \"Alert\"\n }\n }\n },\n \"tags\": [\n \"fugiat culpa aliqua consectetur\",\n \"minim in\"\n ]\n },\n {\n \"type\": \"query alert\",\n \"query\": \"avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100\",\n \"created\": \"1952-04-01T14:02:58.093Z\",\n \"creator\": {\n \"email\": \"esse ad veniam qui\",\n \"handle\": \"nulla enim non\",\n \"name\": \"ut reprehend\"\n },\n \"deleted\": \"2005-07-24T20:18:36.078Z\",\n \"id\": 14961847,\n \"matching_downtimes\": [\n {\n \"id\": 1625,\n \"end\": 1412792983,\n \"scope\": [\n \"env:staging\"\n ],\n \"start\": 1412792983\n },\n {\n \"id\": 1625,\n \"end\": 1412792983,\n \"scope\": [\n \"env:staging\"\n ],\n \"start\": 1412792983\n }\n ],\n \"message\": \"labore nulla\",\n \"modified\": \"2013-05-28T22:30:26.014Z\",\n \"multi\": true,\n \"name\": \"My monitor\",\n \"options\": {\n \"aggregation\": {\n \"group_by\": \"host\",\n \"metric\": \"metrics.name\",\n \"type\": \"count\"\n },\n \"device_ids\": [\n \"chrome.tablet\",\n \"firefox.laptop_large\"\n ],\n \"enable_logs_sample\": false,\n \"enable_samples\": true,\n \"escalation_message\": \"none\",\n \"evaluation_delay\": 48023490,\n \"group_retention_duration\": \"veniam eiusmod anim\",\n \"groupby_simple_monitor\": true,\n \"include_tags\": true,\n \"locked\": false,\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"new_group_delay\": -78698406,\n \"new_host_delay\": 300,\n \"no_data_timeframe\": -29298203,\n \"notification_preset_name\": \"show_all\",\n \"notify_audit\": false,\n \"notify_by\": [\n \"in labore irure reprehenderit\",\n \"Ut ea\"\n ],\n \"notify_no_data\": false,\n \"on_missing_data\": \"default\",\n \"renotify_interval\": null,\n \"renotify_occurrences\": 88843653,\n \"renotify_statuses\": [\n \"warn\",\n \"no data\"\n ],\n \"require_full_window\": false,\n \"scheduling_options\": {\n \"evaluation_window\": {\n \"day_starts\": \"04:00\",\n \"hour_starts\": 0,\n \"month_starts\": 1\n }\n },\n \"silenced\": {\n \"ut_8\": -75892703\n },\n \"synthetics_check_id\": \"ut et aute cupidatat\",\n \"threshold_windows\": {\n \"recovery_window\": \"dolor do\",\n \"trigger_window\": \"pariatur\"\n },\n \"thresholds\": {\n \"critical\": -5336230.352944598,\n \"critical_recovery\": 7945004.71738635,\n \"ok\": -68115416.21610427,\n \"unknown\": 89541673.34797806,\n \"warning\": 66901483.96194494,\n \"warning_recovery\": -39599171.26178945\n },\n \"timeout_h\": null,\n \"variables\": [\n {\n \"data_source\": \"rum\",\n \"compute\": {\n \"aggregation\": \"avg\",\n \"interval\": 60000,\n \"metric\": \"@duration\"\n },\n \"name\": \"query_errors\",\n \"group_by\": [\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"deserunt nisi mollit\",\n \"order\": \"desc\"\n }\n },\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"dolor pariatur\",\n \"order\": \"desc\"\n }\n }\n ],\n \"indexes\": [\n \"days-3\",\n \"days-7\"\n ],\n \"search\": {\n \"query\": \"service:query\"\n }\n },\n {\n \"data_source\": \"rum\",\n \"compute\": {\n \"aggregation\": \"avg\",\n \"interval\": 60000,\n \"metric\": \"@duration\"\n },\n \"name\": \"query_errors\",\n \"group_by\": [\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"l\",\n \"order\": \"desc\"\n }\n },\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"ut non\",\n \"order\": \"desc\"\n }\n }\n ],\n \"indexes\": [\n \"days-3\",\n \"days-7\"\n ],\n \"search\": {\n \"query\": \"service:query\"\n }\n }\n ]\n },\n \"overall_state\": \"Unknown\",\n \"priority\": 3,\n \"restricted_roles\": [\n \"ipsum laboris laborum incididunt\",\n \"fugiat non est\"\n ],\n \"state\": {\n \"groups\": {\n \"Ut7\": {\n \"last_nodata_ts\": 21127128,\n \"last_notified_ts\": 19208840,\n \"last_resolved_ts\": 29022384,\n \"last_triggered_ts\": -96682791,\n \"name\": \"ex tempor\",\n \"status\": \"OK\"\n }\n }\n },\n \"tags\": [\n \"dolor nulla dolore elit\",\n \"consequat sunt in\"\n ]\n }\n]"
},
{
"name": "Bad Request",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/monitor?group_states=alert&name=tempor Ut sed velit&tags=host:host0&monitor_tags=service:my-app&with_downtimes=true&id_offset=-62147425&page=0&page_size=20",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor"
],
"query": [
{
"key": "group_states",
"value": "alert",
"description": "When specified, shows additional information about the group states.\nChoose one or more from `all`, `alert`, `warn`, and `no data`."
},
{
"key": "name",
"value": "tempor Ut sed velit",
"description": "A string to filter monitors by name."
},
{
"key": "tags",
"value": "host:host0",
"description": "A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope.\nFor example, `host:host0`."
},
{
"key": "monitor_tags",
"value": "service:my-app",
"description": "A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors.\nTags created in the Datadog UI automatically have the service key prepended. For example, `service:my-app`."
},
{
"key": "with_downtimes",
"value": "true",
"description": "If this argument is set to true, then the returned data includes all current active downtimes for each monitor."
},
{
"key": "id_offset",
"value": "-62147425",
"description": "Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty."
},
{
"key": "page",
"value": "0",
"description": "The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination."
},
{
"key": "page_size",
"value": "20",
"description": "The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a `page_size` limit. However, if page is specified and `page_size` is not, the argument defaults to 100."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"Bad Request\",\n \"Bad Request\"\n ]\n}"
},
{
"name": "Forbidden",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/monitor?group_states=alert&name=tempor Ut sed velit&tags=host:host0&monitor_tags=service:my-app&with_downtimes=true&id_offset=-62147425&page=0&page_size=20",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor"
],
"query": [
{
"key": "group_states",
"value": "alert",
"description": "When specified, shows additional information about the group states.\nChoose one or more from `all`, `alert`, `warn`, and `no data`."
},
{
"key": "name",
"value": "tempor Ut sed velit",
"description": "A string to filter monitors by name."
},
{
"key": "tags",
"value": "host:host0",
"description": "A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope.\nFor example, `host:host0`."
},
{
"key": "monitor_tags",
"value": "service:my-app",
"description": "A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors.\nTags created in the Datadog UI automatically have the service key prepended. For example, `service:my-app`."
},
{
"key": "with_downtimes",
"value": "true",
"description": "If this argument is set to true, then the returned data includes all current active downtimes for each monitor."
},
{
"key": "id_offset",
"value": "-62147425",
"description": "Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty."
},
{
"key": "page",
"value": "0",
"description": "The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination."
},
{
"key": "page_size",
"value": "20",
"description": "The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a `page_size` limit. However, if page is specified and `page_size` is not, the argument defaults to 100."
}
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"Bad Request\",\n \"Bad Request\"\n ]\n}"
},
{
"name": "Too many requests",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/monitor?group_states=alert&name=tempor Ut sed velit&tags=host:host0&monitor_tags=service:my-app&with_downtimes=true&id_offset=-62147425&page=0&page_size=20",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor"
],
"query": [
{
"key": "group_states",
"value": "alert",
"description": "When specified, shows additional information about the group states.\nChoose one or more from `all`, `alert`, `warn`, and `no data`."
},
{
"key": "name",
"value": "tempor Ut sed velit",
"description": "A string to filter monitors by name."
},
{
"key": "tags",
"value": "host:host0",
"description": "A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope.\nFor example, `host:host0`."
},
{
"key": "monitor_tags",
"value": "service:my-app",
"description": "A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors.\nTags created in the Datadog UI automatically have the service key prepended. For example, `service:my-app`."
},
{
"key": "with_downtimes",
"value": "true",
"description": "If this argument is set to true, then the returned data includes all current active downtimes for each monitor."
},
{
"key": "id_offset",
"value": "-62147425",
"description": "Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty."
},
{
"key": "page",
"value": "0",
"description": "The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination."
},
{
"key": "page_size",
"value": "20",
"description": "The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a `page_size` limit. However, if page is specified and `page_size` is not, the argument defaults to 100."
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"Bad Request\",\n \"Bad Request\"\n ]\n}"
}
]
}