Back to Collection Items
var
http: HCkHttp;
success: Boolean;
resp: HCkHttpResponse;
sbResponseBody: HCkStringBuilder;
jResp: HCkJsonObject;
respStatusCode: Integer;
v_end: Integer;
start: Integer;
j: Integer;
count_j: Integer;
strVal: PWideChar;
data_source: PWideChar;
Aggregation: PWideChar;
Interval: Integer;
computeMetric: PWideChar;
Query: PWideChar;
facet: PWideChar;
limit: Integer;
sortAggregation: PWideChar;
sortMetric: PWideChar;
Order: PWideChar;
v_type: PWideChar;
query: PWideChar;
created: PWideChar;
v_Email: PWideChar;
Handle: PWideChar;
Name: PWideChar;
deleted: PWideChar;
id: Integer;
message: PWideChar;
modified: PWideChar;
multi: Boolean;
name: PWideChar;
Group_by: PWideChar;
Metric: PWideChar;
v_Type: PWideChar;
Enable_logs_sample: Boolean;
Enable_samples: Boolean;
Escalation_message: PWideChar;
Evaluation_delay: Integer;
Group_retention_duration: PWideChar;
Groupby_simple_monitor: Boolean;
Include_tags: Boolean;
Locked: Boolean;
Min_failure_duration: Integer;
Min_location_failed: Integer;
New_group_delay: Integer;
New_host_delay: Integer;
No_data_timeframe: Integer;
Notification_preset_name: PWideChar;
Notify_audit: Boolean;
Notify_no_data: Boolean;
On_missing_data: PWideChar;
Renotify_interval: PWideChar;
Renotify_occurrences: Integer;
Require_full_window: Boolean;
Day_starts: PWideChar;
Hour_starts: Integer;
Month_starts: Integer;
Non_6f_: Integer;
Synthetics_check_id: PWideChar;
Recovery_window: PWideChar;
Trigger_window: PWideChar;
Critical: PWideChar;
Critical_recovery: PWideChar;
Ok: PWideChar;
Unknown: PWideChar;
Warning: PWideChar;
Warning_recovery: PWideChar;
Timeout_h: PWideChar;
overall_state: PWideChar;
priority: Integer;
Last_nodata_ts: Integer;
Last_notified_ts: Integer;
Last_resolved_ts: Integer;
Last_triggered_ts: Integer;
Lorem_1Name: PWideChar;
Status: PWideChar;
Nisi_c43Last_nodata_ts: Integer;
Nisi_c43Last_notified_ts: Integer;
Nisi_c43Last_resolved_ts: Integer;
Nisi_c43Last_triggered_ts: Integer;
Nisi_c43Name: PWideChar;
Nisi_c43Status: PWideChar;
Minim_cLast_nodata_ts: Integer;
Minim_cLast_notified_ts: Integer;
Minim_cLast_resolved_ts: Integer;
Minim_cLast_triggered_ts: Integer;
Minim_cName: PWideChar;
Minim_cStatus: PWideChar;
i: Integer;
count_i: Integer;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := CkHttp_Create();
CkHttp_SetRequestHeader(http,'Accept','application/json');
resp := CkHttp_QuickRequest(http,'POST','https://api.app.ddog-gov.com/api/v1/monitor/:monitor_id/unmute?scope=role:db&all_scopes=false');
if (CkHttp_getLastMethodSuccess(http) = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
sbResponseBody := CkStringBuilder_Create();
CkHttpResponse_GetBodySb(resp,sbResponseBody);
jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
CkJsonObject_putEmitCompact(jResp,False);
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkJsonObject__emit(jResp));
respStatusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(CkHttpResponse__header(resp));
Memo1.Lines.Add('Failed.');
CkHttpResponse_Dispose(resp);
Exit;
end;
CkHttpResponse_Dispose(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": "1989-12-01T14:28:43.831Z",
// "creator": {
// "email": "officia sunt",
// "handle": "pariatur",
// "name": "aute do"
// },
// "deleted": "2020-10-30T20:46:24.520Z",
// "id": -50675854,
// "matching_downtimes": [
// {
// "id": 1625,
// "end": 1412792983,
// "scope": [
// "env:staging"
// ],
// "start": 1412792983
// },
// {
// "id": 1625,
// "end": 1412792983,
// "scope": [
// "env:staging"
// ],
// "start": 1412792983
// }
// ],
// "message": "ullamco incididunt cupidatat",
// "modified": "1981-03-27T05:04:03.098Z",
// "multi": false,
// "name": "My monitor",
// "options": {
// "aggregation": {
// "group_by": "host",
// "metric": "metrics.name",
// "type": "count"
// },
// "device_ids": [
// "mobile_small",
// "chrome.tablet"
// ],
// "enable_logs_sample": false,
// "enable_samples": false,
// "escalation_message": "none",
// "evaluation_delay": -52819274,
// "group_retention_duration": "dolor Lorem qui",
// "groupby_simple_monitor": false,
// "include_tags": true,
// "locked": false,
// "min_failure_duration": 0,
// "min_location_failed": 1,
// "new_group_delay": -94315945,
// "new_host_delay": 300,
// "no_data_timeframe": -86360342,
// "notification_preset_name": "show_all",
// "notify_audit": false,
// "notify_by": [
// "labore dolore",
// "deserunt commodo consectetur"
// ],
// "notify_no_data": false,
// "on_missing_data": "resolve",
// "renotify_interval": null,
// "renotify_occurrences": 56355858,
// "renotify_statuses": [
// "warn",
// "no data"
// ],
// "require_full_window": false,
// "scheduling_options": {
// "evaluation_window": {
// "day_starts": "04:00",
// "hour_starts": 0,
// "month_starts": 1
// }
// },
// "silenced": {
// "non_6f_": 77287100
// },
// "synthetics_check_id": "culpa in laborum irure",
// "threshold_windows": {
// "recovery_window": "culpa cupidatat Lorem ut",
// "trigger_window": "fugiat officia mollit esse quis"
// },
// "thresholds": {
// "critical": -44507487.0891542,
// "critical_recovery": 94365870.17342958,
// "ok": 26645340.31156695,
// "unknown": -32772943.396166816,
// "warning": 75330874.10211122,
// "warning_recovery": 30665996.226613894
// },
// "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": "minim tempor i",
// "order": "desc"
// }
// },
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "Ut fugiat officia",
// "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": "do velit",
// "order": "desc"
// }
// },
// {
// "facet": "status",
// "limit": 10,
// "sort": {
// "aggregation": "avg",
// "metric": "amet proident anim in",
// "order": "desc"
// }
// }
// ],
// "indexes": [
// "days-3",
// "days-7"
// ],
// "search": {
// "query": "service:query"
// }
// }
// ]
// },
// "overall_state": "Warn",
// "priority": 1,
// "restricted_roles": [
// "enim qui cillum est",
// "quis ut"
// ],
// "state": {
// "groups": {
// "Lorem_1": {
// "last_nodata_ts": -12653992,
// "last_notified_ts": -66141067,
// "last_resolved_ts": 5643925,
// "last_triggered_ts": -6121593,
// "name": "dolore nulla i",
// "status": "OK"
// },
// "nisi_c43": {
// "last_nodata_ts": -66061060,
// "last_notified_ts": -86988012,
// "last_resolved_ts": -39919633,
// "last_triggered_ts": 13467862,
// "name": "Ut fugiat eiusmod anim",
// "status": "Ignored"
// },
// "minim_c": {
// "last_nodata_ts": 6509669,
// "last_notified_ts": 39348490,
// "last_resolved_ts": 13221088,
// "last_triggered_ts": 21889420,
// "name": "in velit Duis",
// "status": "Alert"
// }
// }
// },
// "tags": [
// "ex tempor",
// "enim veniam dolore"
// ]
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
v_type := CkJsonObject__stringOf(jResp,'type');
query := CkJsonObject__stringOf(jResp,'query');
created := CkJsonObject__stringOf(jResp,'created');
v_Email := CkJsonObject__stringOf(jResp,'creator.email');
Handle := CkJsonObject__stringOf(jResp,'creator.handle');
Name := CkJsonObject__stringOf(jResp,'creator.name');
deleted := CkJsonObject__stringOf(jResp,'deleted');
id := CkJsonObject_IntOf(jResp,'id');
message := CkJsonObject__stringOf(jResp,'message');
modified := CkJsonObject__stringOf(jResp,'modified');
multi := CkJsonObject_BoolOf(jResp,'multi');
name := CkJsonObject__stringOf(jResp,'name');
Group_by := CkJsonObject__stringOf(jResp,'options.aggregation.group_by');
Metric := CkJsonObject__stringOf(jResp,'options.aggregation.metric');
v_Type := CkJsonObject__stringOf(jResp,'options.aggregation.type');
Enable_logs_sample := CkJsonObject_BoolOf(jResp,'options.enable_logs_sample');
Enable_samples := CkJsonObject_BoolOf(jResp,'options.enable_samples');
Escalation_message := CkJsonObject__stringOf(jResp,'options.escalation_message');
Evaluation_delay := CkJsonObject_IntOf(jResp,'options.evaluation_delay');
Group_retention_duration := CkJsonObject__stringOf(jResp,'options.group_retention_duration');
Groupby_simple_monitor := CkJsonObject_BoolOf(jResp,'options.groupby_simple_monitor');
Include_tags := CkJsonObject_BoolOf(jResp,'options.include_tags');
Locked := CkJsonObject_BoolOf(jResp,'options.locked');
Min_failure_duration := CkJsonObject_IntOf(jResp,'options.min_failure_duration');
Min_location_failed := CkJsonObject_IntOf(jResp,'options.min_location_failed');
New_group_delay := CkJsonObject_IntOf(jResp,'options.new_group_delay');
New_host_delay := CkJsonObject_IntOf(jResp,'options.new_host_delay');
No_data_timeframe := CkJsonObject_IntOf(jResp,'options.no_data_timeframe');
Notification_preset_name := CkJsonObject__stringOf(jResp,'options.notification_preset_name');
Notify_audit := CkJsonObject_BoolOf(jResp,'options.notify_audit');
Notify_no_data := CkJsonObject_BoolOf(jResp,'options.notify_no_data');
On_missing_data := CkJsonObject__stringOf(jResp,'options.on_missing_data');
Renotify_interval := CkJsonObject__stringOf(jResp,'options.renotify_interval');
Renotify_occurrences := CkJsonObject_IntOf(jResp,'options.renotify_occurrences');
Require_full_window := CkJsonObject_BoolOf(jResp,'options.require_full_window');
Day_starts := CkJsonObject__stringOf(jResp,'options.scheduling_options.evaluation_window.day_starts');
Hour_starts := CkJsonObject_IntOf(jResp,'options.scheduling_options.evaluation_window.hour_starts');
Month_starts := CkJsonObject_IntOf(jResp,'options.scheduling_options.evaluation_window.month_starts');
Non_6f_ := CkJsonObject_IntOf(jResp,'options.silenced.non_6f_');
Synthetics_check_id := CkJsonObject__stringOf(jResp,'options.synthetics_check_id');
Recovery_window := CkJsonObject__stringOf(jResp,'options.threshold_windows.recovery_window');
Trigger_window := CkJsonObject__stringOf(jResp,'options.threshold_windows.trigger_window');
Critical := CkJsonObject__stringOf(jResp,'options.thresholds.critical');
Critical_recovery := CkJsonObject__stringOf(jResp,'options.thresholds.critical_recovery');
Ok := CkJsonObject__stringOf(jResp,'options.thresholds.ok');
Unknown := CkJsonObject__stringOf(jResp,'options.thresholds.unknown');
Warning := CkJsonObject__stringOf(jResp,'options.thresholds.warning');
Warning_recovery := CkJsonObject__stringOf(jResp,'options.thresholds.warning_recovery');
Timeout_h := CkJsonObject__stringOf(jResp,'options.timeout_h');
overall_state := CkJsonObject__stringOf(jResp,'overall_state');
priority := CkJsonObject_IntOf(jResp,'priority');
Last_nodata_ts := CkJsonObject_IntOf(jResp,'state.groups.Lorem_1.last_nodata_ts');
Last_notified_ts := CkJsonObject_IntOf(jResp,'state.groups.Lorem_1.last_notified_ts');
Last_resolved_ts := CkJsonObject_IntOf(jResp,'state.groups.Lorem_1.last_resolved_ts');
Last_triggered_ts := CkJsonObject_IntOf(jResp,'state.groups.Lorem_1.last_triggered_ts');
Lorem_1Name := CkJsonObject__stringOf(jResp,'state.groups.Lorem_1.name');
Status := CkJsonObject__stringOf(jResp,'state.groups.Lorem_1.status');
Nisi_c43Last_nodata_ts := CkJsonObject_IntOf(jResp,'state.groups.nisi_c43.last_nodata_ts');
Nisi_c43Last_notified_ts := CkJsonObject_IntOf(jResp,'state.groups.nisi_c43.last_notified_ts');
Nisi_c43Last_resolved_ts := CkJsonObject_IntOf(jResp,'state.groups.nisi_c43.last_resolved_ts');
Nisi_c43Last_triggered_ts := CkJsonObject_IntOf(jResp,'state.groups.nisi_c43.last_triggered_ts');
Nisi_c43Name := CkJsonObject__stringOf(jResp,'state.groups.nisi_c43.name');
Nisi_c43Status := CkJsonObject__stringOf(jResp,'state.groups.nisi_c43.status');
Minim_cLast_nodata_ts := CkJsonObject_IntOf(jResp,'state.groups.minim_c.last_nodata_ts');
Minim_cLast_notified_ts := CkJsonObject_IntOf(jResp,'state.groups.minim_c.last_notified_ts');
Minim_cLast_resolved_ts := CkJsonObject_IntOf(jResp,'state.groups.minim_c.last_resolved_ts');
Minim_cLast_triggered_ts := CkJsonObject_IntOf(jResp,'state.groups.minim_c.last_triggered_ts');
Minim_cName := CkJsonObject__stringOf(jResp,'state.groups.minim_c.name');
Minim_cStatus := CkJsonObject__stringOf(jResp,'state.groups.minim_c.status');
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'matching_downtimes');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
id := CkJsonObject_IntOf(jResp,'matching_downtimes[i].id');
v_end := CkJsonObject_IntOf(jResp,'matching_downtimes[i].end');
start := CkJsonObject_IntOf(jResp,'matching_downtimes[i].start');
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'matching_downtimes[i].scope');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
strVal := CkJsonObject__stringOf(jResp,'matching_downtimes[i].scope[j]');
j := j + 1;
end;
i := i + 1;
end;
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'options.device_ids');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
strVal := CkJsonObject__stringOf(jResp,'options.device_ids[i]');
i := i + 1;
end;
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'options.notify_by');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
strVal := CkJsonObject__stringOf(jResp,'options.notify_by[i]');
i := i + 1;
end;
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'options.renotify_statuses');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
strVal := CkJsonObject__stringOf(jResp,'options.renotify_statuses[i]');
i := i + 1;
end;
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'options.variables');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
data_source := CkJsonObject__stringOf(jResp,'options.variables[i].data_source');
Aggregation := CkJsonObject__stringOf(jResp,'options.variables[i].compute.aggregation');
Interval := CkJsonObject_IntOf(jResp,'options.variables[i].compute.interval');
computeMetric := CkJsonObject__stringOf(jResp,'options.variables[i].compute.metric');
name := CkJsonObject__stringOf(jResp,'options.variables[i].name');
Query := CkJsonObject__stringOf(jResp,'options.variables[i].search.query');
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'options.variables[i].group_by');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
facet := CkJsonObject__stringOf(jResp,'options.variables[i].group_by[j].facet');
limit := CkJsonObject_IntOf(jResp,'options.variables[i].group_by[j].limit');
sortAggregation := CkJsonObject__stringOf(jResp,'options.variables[i].group_by[j].sort.aggregation');
sortMetric := CkJsonObject__stringOf(jResp,'options.variables[i].group_by[j].sort.metric');
Order := CkJsonObject__stringOf(jResp,'options.variables[i].group_by[j].sort.order');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'options.variables[i].indexes');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
strVal := CkJsonObject__stringOf(jResp,'options.variables[i].indexes[j]');
j := j + 1;
end;
i := i + 1;
end;
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'restricted_roles');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
strVal := CkJsonObject__stringOf(jResp,'restricted_roles[i]');
i := i + 1;
end;
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'tags');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
strVal := CkJsonObject__stringOf(jResp,'tags[i]');
i := i + 1;
end;
CkHttp_Dispose(http);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);
Curl Command
curl -X POST
-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/monitor/:monitor_id/unmute?scope=role:db&all_scopes=false
Postman Collection Item JSON
{
"name": "Unmute a monitor",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/monitor/:monitor_id/unmute?scope=role:db&all_scopes=false",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor",
":monitor_id",
"unmute"
],
"query": [
{
"key": "scope",
"value": "role:db",
"description": "The scope to apply the mute to.\nFor example, if your alert is grouped by `{host}`, you might mute `host:app1`."
},
{
"key": "all_scopes",
"value": "false",
"description": "Clear muting across all scopes. Default is `false`."
}
],
"variable": [
{
"key": "monitor_id",
"value": "-62147425"
}
]
},
"description": "Unmute the specified monitor."
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "POST",
"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/:monitor_id/unmute?scope=role:db&all_scopes=false",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor",
":monitor_id",
"unmute"
],
"query": [
{
"key": "scope",
"value": "role:db",
"description": "The scope to apply the mute to.\nFor example, if your alert is grouped by `{host}`, you might mute `host:app1`."
},
{
"key": "all_scopes",
"value": "false",
"description": "Clear muting across all scopes. Default is `false`."
}
],
"variable": [
{
"key": "monitor_id"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"type\": \"query alert\",\n \"query\": \"avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100\",\n \"created\": \"1989-12-01T14:28:43.831Z\",\n \"creator\": {\n \"email\": \"officia sunt\",\n \"handle\": \"pariatur\",\n \"name\": \"aute do\"\n },\n \"deleted\": \"2020-10-30T20:46:24.520Z\",\n \"id\": -50675854,\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\": \"ullamco incididunt cupidatat\",\n \"modified\": \"1981-03-27T05:04:03.098Z\",\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 \"mobile_small\",\n \"chrome.tablet\"\n ],\n \"enable_logs_sample\": false,\n \"enable_samples\": false,\n \"escalation_message\": \"none\",\n \"evaluation_delay\": -52819274,\n \"group_retention_duration\": \"dolor Lorem qui\",\n \"groupby_simple_monitor\": false,\n \"include_tags\": true,\n \"locked\": false,\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"new_group_delay\": -94315945,\n \"new_host_delay\": 300,\n \"no_data_timeframe\": -86360342,\n \"notification_preset_name\": \"show_all\",\n \"notify_audit\": false,\n \"notify_by\": [\n \"labore dolore\",\n \"deserunt commodo consectetur\"\n ],\n \"notify_no_data\": false,\n \"on_missing_data\": \"resolve\",\n \"renotify_interval\": null,\n \"renotify_occurrences\": 56355858,\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 \"non_6f_\": 77287100\n },\n \"synthetics_check_id\": \"culpa in laborum irure\",\n \"threshold_windows\": {\n \"recovery_window\": \"culpa cupidatat Lorem ut\",\n \"trigger_window\": \"fugiat officia mollit esse quis\"\n },\n \"thresholds\": {\n \"critical\": -44507487.0891542,\n \"critical_recovery\": 94365870.17342958,\n \"ok\": 26645340.31156695,\n \"unknown\": -32772943.396166816,\n \"warning\": 75330874.10211122,\n \"warning_recovery\": 30665996.226613894\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\": \"minim tempor i\",\n \"order\": \"desc\"\n }\n },\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"Ut fugiat officia\",\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\": \"do velit\",\n \"order\": \"desc\"\n }\n },\n {\n \"facet\": \"status\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"avg\",\n \"metric\": \"amet proident anim in\",\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\": \"Warn\",\n \"priority\": 1,\n \"restricted_roles\": [\n \"enim qui cillum est\",\n \"quis ut\"\n ],\n \"state\": {\n \"groups\": {\n \"Lorem_1\": {\n \"last_nodata_ts\": -12653992,\n \"last_notified_ts\": -66141067,\n \"last_resolved_ts\": 5643925,\n \"last_triggered_ts\": -6121593,\n \"name\": \"dolore nulla i\",\n \"status\": \"OK\"\n },\n \"nisi_c43\": {\n \"last_nodata_ts\": -66061060,\n \"last_notified_ts\": -86988012,\n \"last_resolved_ts\": -39919633,\n \"last_triggered_ts\": 13467862,\n \"name\": \"Ut fugiat eiusmod anim\",\n \"status\": \"Ignored\"\n },\n \"minim_c\": {\n \"last_nodata_ts\": 6509669,\n \"last_notified_ts\": 39348490,\n \"last_resolved_ts\": 13221088,\n \"last_triggered_ts\": 21889420,\n \"name\": \"in velit Duis\",\n \"status\": \"Alert\"\n }\n }\n },\n \"tags\": [\n \"ex tempor\",\n \"enim veniam dolore\"\n ]\n}"
},
{
"name": "Bad Request",
"originalRequest": {
"method": "POST",
"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/:monitor_id/unmute?scope=role:db&all_scopes=false",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor",
":monitor_id",
"unmute"
],
"query": [
{
"key": "scope",
"value": "role:db",
"description": "The scope to apply the mute to.\nFor example, if your alert is grouped by `{host}`, you might mute `host:app1`."
},
{
"key": "all_scopes",
"value": "false",
"description": "Clear muting across all scopes. Default is `false`."
}
],
"variable": [
{
"key": "monitor_id"
}
]
}
},
"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": "Authentication error",
"originalRequest": {
"method": "POST",
"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/:monitor_id/unmute?scope=role:db&all_scopes=false",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor",
":monitor_id",
"unmute"
],
"query": [
{
"key": "scope",
"value": "role:db",
"description": "The scope to apply the mute to.\nFor example, if your alert is grouped by `{host}`, you might mute `host:app1`."
},
{
"key": "all_scopes",
"value": "false",
"description": "Clear muting across all scopes. Default is `false`."
}
],
"variable": [
{
"key": "monitor_id"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"Bad Request\",\n \"Bad Request\"\n ]\n}"
},
{
"name": "Monitor Not Found error",
"originalRequest": {
"method": "POST",
"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/:monitor_id/unmute?scope=role:db&all_scopes=false",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor",
":monitor_id",
"unmute"
],
"query": [
{
"key": "scope",
"value": "role:db",
"description": "The scope to apply the mute to.\nFor example, if your alert is grouped by `{host}`, you might mute `host:app1`."
},
{
"key": "all_scopes",
"value": "false",
"description": "Clear muting across all scopes. Default is `false`."
}
],
"variable": [
{
"key": "monitor_id"
}
]
}
},
"status": "Not Found",
"code": 404,
"_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": "POST",
"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/:monitor_id/unmute?scope=role:db&all_scopes=false",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"monitor",
":monitor_id",
"unmute"
],
"query": [
{
"key": "scope",
"value": "role:db",
"description": "The scope to apply the mute to.\nFor example, if your alert is grouped by `{host}`, you might mute `host:app1`."
},
{
"key": "all_scopes",
"value": "false",
"description": "Clear muting across all scopes. Default is `false`."
}
],
"variable": [
{
"key": "monitor_id"
}
]
}
},
"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}"
}
]
}