Chilkat Online Tools

unicodeCpp / Datadog API Collection / Mute a monitor

Back to Collection Items

#include <CkHttpW.h>
#include <CkHttpResponseW.h>
#include <CkStringBuilderW.h>
#include <CkJsonObjectW.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;
    bool success;

    http.SetRequestHeader(L"Accept",L"application/json");

    CkHttpResponseW *resp = http.QuickRequest(L"POST",L"https://api.app.ddog-gov.com/api/v1/monitor/:monitor_id/mute?scope=role:db&end=-62147425");
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    CkStringBuilderW sbResponseBody;
    resp->GetBodySb(sbResponseBody);

    CkJsonObjectW jResp;
    jResp.LoadSb(sbResponseBody);
    jResp.put_EmitCompact(false);

    wprintf(L"Response Body:\n");
    wprintf(L"%s\n",jResp.emit());

    int respStatusCode = resp->get_StatusCode();
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",resp->header());
        wprintf(L"Failed.\n");
        delete resp;
        return;
    }

    delete 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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    int v_end;
    int start;
    int j;
    int count_j;
    const wchar_t *strVal = 0;
    const wchar_t *data_source = 0;
    const wchar_t *Aggregation = 0;
    int Interval;
    const wchar_t *computeMetric = 0;
    const wchar_t *Query = 0;
    const wchar_t *facet = 0;
    int limit;
    const wchar_t *sortAggregation = 0;
    const wchar_t *sortMetric = 0;
    const wchar_t *Order = 0;

    const wchar_t *v_type = jResp.stringOf(L"type");
    const wchar_t *query = jResp.stringOf(L"query");
    const wchar_t *created = jResp.stringOf(L"created");
    const wchar_t *v_Email = jResp.stringOf(L"creator.email");
    const wchar_t *Handle = jResp.stringOf(L"creator.handle");
    const wchar_t *Name = jResp.stringOf(L"creator.name");
    const wchar_t *deleted = jResp.stringOf(L"deleted");
    int id = jResp.IntOf(L"id");
    const wchar_t *message = jResp.stringOf(L"message");
    const wchar_t *modified = jResp.stringOf(L"modified");
    bool multi = jResp.BoolOf(L"multi");
    const wchar_t *name = jResp.stringOf(L"name");
    const wchar_t *Group_by = jResp.stringOf(L"options.aggregation.group_by");
    const wchar_t *Metric = jResp.stringOf(L"options.aggregation.metric");
    const wchar_t *v_Type = jResp.stringOf(L"options.aggregation.type");
    bool Enable_logs_sample = jResp.BoolOf(L"options.enable_logs_sample");
    bool Enable_samples = jResp.BoolOf(L"options.enable_samples");
    const wchar_t *Escalation_message = jResp.stringOf(L"options.escalation_message");
    int Evaluation_delay = jResp.IntOf(L"options.evaluation_delay");
    const wchar_t *Group_retention_duration = jResp.stringOf(L"options.group_retention_duration");
    bool Groupby_simple_monitor = jResp.BoolOf(L"options.groupby_simple_monitor");
    bool Include_tags = jResp.BoolOf(L"options.include_tags");
    bool Locked = jResp.BoolOf(L"options.locked");
    int Min_failure_duration = jResp.IntOf(L"options.min_failure_duration");
    int Min_location_failed = jResp.IntOf(L"options.min_location_failed");
    int New_group_delay = jResp.IntOf(L"options.new_group_delay");
    int New_host_delay = jResp.IntOf(L"options.new_host_delay");
    int No_data_timeframe = jResp.IntOf(L"options.no_data_timeframe");
    const wchar_t *Notification_preset_name = jResp.stringOf(L"options.notification_preset_name");
    bool Notify_audit = jResp.BoolOf(L"options.notify_audit");
    bool Notify_no_data = jResp.BoolOf(L"options.notify_no_data");
    const wchar_t *On_missing_data = jResp.stringOf(L"options.on_missing_data");
    const wchar_t *Renotify_interval = jResp.stringOf(L"options.renotify_interval");
    int Renotify_occurrences = jResp.IntOf(L"options.renotify_occurrences");
    bool Require_full_window = jResp.BoolOf(L"options.require_full_window");
    const wchar_t *Day_starts = jResp.stringOf(L"options.scheduling_options.evaluation_window.day_starts");
    int Hour_starts = jResp.IntOf(L"options.scheduling_options.evaluation_window.hour_starts");
    int Month_starts = jResp.IntOf(L"options.scheduling_options.evaluation_window.month_starts");
    int Non_6f_ = jResp.IntOf(L"options.silenced.non_6f_");
    const wchar_t *Synthetics_check_id = jResp.stringOf(L"options.synthetics_check_id");
    const wchar_t *Recovery_window = jResp.stringOf(L"options.threshold_windows.recovery_window");
    const wchar_t *Trigger_window = jResp.stringOf(L"options.threshold_windows.trigger_window");
    const wchar_t *Critical = jResp.stringOf(L"options.thresholds.critical");
    const wchar_t *Critical_recovery = jResp.stringOf(L"options.thresholds.critical_recovery");
    const wchar_t *Ok = jResp.stringOf(L"options.thresholds.ok");
    const wchar_t *Unknown = jResp.stringOf(L"options.thresholds.unknown");
    const wchar_t *Warning = jResp.stringOf(L"options.thresholds.warning");
    const wchar_t *Warning_recovery = jResp.stringOf(L"options.thresholds.warning_recovery");
    const wchar_t *Timeout_h = jResp.stringOf(L"options.timeout_h");
    const wchar_t *overall_state = jResp.stringOf(L"overall_state");
    int priority = jResp.IntOf(L"priority");
    int Last_nodata_ts = jResp.IntOf(L"state.groups.Lorem_1.last_nodata_ts");
    int Last_notified_ts = jResp.IntOf(L"state.groups.Lorem_1.last_notified_ts");
    int Last_resolved_ts = jResp.IntOf(L"state.groups.Lorem_1.last_resolved_ts");
    int Last_triggered_ts = jResp.IntOf(L"state.groups.Lorem_1.last_triggered_ts");
    const wchar_t *Lorem_1Name = jResp.stringOf(L"state.groups.Lorem_1.name");
    const wchar_t *Status = jResp.stringOf(L"state.groups.Lorem_1.status");
    int Nisi_c43Last_nodata_ts = jResp.IntOf(L"state.groups.nisi_c43.last_nodata_ts");
    int Nisi_c43Last_notified_ts = jResp.IntOf(L"state.groups.nisi_c43.last_notified_ts");
    int Nisi_c43Last_resolved_ts = jResp.IntOf(L"state.groups.nisi_c43.last_resolved_ts");
    int Nisi_c43Last_triggered_ts = jResp.IntOf(L"state.groups.nisi_c43.last_triggered_ts");
    const wchar_t *Nisi_c43Name = jResp.stringOf(L"state.groups.nisi_c43.name");
    const wchar_t *Nisi_c43Status = jResp.stringOf(L"state.groups.nisi_c43.status");
    int Minim_cLast_nodata_ts = jResp.IntOf(L"state.groups.minim_c.last_nodata_ts");
    int Minim_cLast_notified_ts = jResp.IntOf(L"state.groups.minim_c.last_notified_ts");
    int Minim_cLast_resolved_ts = jResp.IntOf(L"state.groups.minim_c.last_resolved_ts");
    int Minim_cLast_triggered_ts = jResp.IntOf(L"state.groups.minim_c.last_triggered_ts");
    const wchar_t *Minim_cName = jResp.stringOf(L"state.groups.minim_c.name");
    const wchar_t *Minim_cStatus = jResp.stringOf(L"state.groups.minim_c.status");
    int i = 0;
    int count_i = jResp.SizeOfArray(L"matching_downtimes");
    while (i < count_i) {
        jResp.put_I(i);
        id = jResp.IntOf(L"matching_downtimes[i].id");
        v_end = jResp.IntOf(L"matching_downtimes[i].end");
        start = jResp.IntOf(L"matching_downtimes[i].start");
        j = 0;
        count_j = jResp.SizeOfArray(L"matching_downtimes[i].scope");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"matching_downtimes[i].scope[j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"options.device_ids");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"options.device_ids[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"options.notify_by");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"options.notify_by[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"options.renotify_statuses");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"options.renotify_statuses[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"options.variables");
    while (i < count_i) {
        jResp.put_I(i);
        data_source = jResp.stringOf(L"options.variables[i].data_source");
        Aggregation = jResp.stringOf(L"options.variables[i].compute.aggregation");
        Interval = jResp.IntOf(L"options.variables[i].compute.interval");
        computeMetric = jResp.stringOf(L"options.variables[i].compute.metric");
        name = jResp.stringOf(L"options.variables[i].name");
        Query = jResp.stringOf(L"options.variables[i].search.query");
        j = 0;
        count_j = jResp.SizeOfArray(L"options.variables[i].group_by");
        while (j < count_j) {
            jResp.put_J(j);
            facet = jResp.stringOf(L"options.variables[i].group_by[j].facet");
            limit = jResp.IntOf(L"options.variables[i].group_by[j].limit");
            sortAggregation = jResp.stringOf(L"options.variables[i].group_by[j].sort.aggregation");
            sortMetric = jResp.stringOf(L"options.variables[i].group_by[j].sort.metric");
            Order = jResp.stringOf(L"options.variables[i].group_by[j].sort.order");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"options.variables[i].indexes");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"options.variables[i].indexes[j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"restricted_roles");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"restricted_roles[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"tags");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"tags[i]");
        i = i + 1;
    }
    }

Curl Command

curl -X POST
	-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/monitor/:monitor_id/mute?scope=role:db&end=-62147425

Postman Collection Item JSON

{
  "name": "Mute a monitor",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v1/monitor/:monitor_id/mute?scope=role:db&end=-62147425",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "monitor",
        ":monitor_id",
        "mute"
      ],
      "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": "end",
          "value": "-62147425",
          "description": "A POSIX timestamp for when the mute should end."
        }
      ],
      "variable": [
        {
          "key": "monitor_id",
          "value": "-62147425"
        }
      ]
    },
    "description": "Mute 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/mute?scope=role:db&end=-62147425",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "monitor",
            ":monitor_id",
            "mute"
          ],
          "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": "end",
              "value": "-62147425",
              "description": "A POSIX timestamp for when the mute should end."
            }
          ],
          "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/mute?scope=role:db&end=-62147425",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "monitor",
            ":monitor_id",
            "mute"
          ],
          "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": "end",
              "value": "-62147425",
              "description": "A POSIX timestamp for when the mute should end."
            }
          ],
          "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/mute?scope=role:db&end=-62147425",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "monitor",
            ":monitor_id",
            "mute"
          ],
          "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": "end",
              "value": "-62147425",
              "description": "A POSIX timestamp for when the mute should end."
            }
          ],
          "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/mute?scope=role:db&end=-62147425",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "monitor",
            ":monitor_id",
            "mute"
          ],
          "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": "end",
              "value": "-62147425",
              "description": "A POSIX timestamp for when the mute should end."
            }
          ],
          "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/mute?scope=role:db&end=-62147425",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "monitor",
            ":monitor_id",
            "mute"
          ],
          "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": "end",
              "value": "-62147425",
              "description": "A POSIX timestamp for when the mute should end."
            }
          ],
          "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}"
    }
  ]
}