Chilkat Online Tools

unicodeC / Datadog API Collection / Update an existing rule

Back to Collection Items

#include <C_CkHttpW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkHttpResponseW.h>

void ChilkatSample(void)
    {
    HCkHttpW http;
    BOOL success;
    HCkJsonObjectW json;
    HCkStringBuilderW sbRequestBody;
    HCkHttpResponseW resp;
    HCkStringBuilderW sbResponseBody;
    HCkJsonObjectW jResp;
    int respStatusCode;
    const wchar_t *condition;
    const wchar_t *status;
    int j;
    int count_j;
    const wchar_t *strVal;
    const wchar_t *action;
    const wchar_t *query;
    const wchar_t *aggregation;
    const wchar_t *metric;
    const wchar_t *DefaultActivationStatus;
    const wchar_t *UserActivationStatus;
    const wchar_t *createdAt;
    const wchar_t *creationAuthorId;
    const wchar_t *deprecationDate;
    const wchar_t *hasExtendedTitle;
    const wchar_t *id;
    const wchar_t *isDefault;
    const wchar_t *isDeleted;
    const wchar_t *isEnabled;
    const wchar_t *message;
    const wchar_t *name;
    const wchar_t *ComplexRule;
    const wchar_t *Policy;
    const wchar_t *ResourceType;
    const wchar_t *DecreaseCriticalityBasedOnEnv;
    const wchar_t *DetectionMethod;
    int EvaluationWindow;
    const wchar_t *HardcodedEvaluatorType;
    const wchar_t *BaselineUserLocations;
    int KeepAlive;
    int MaxSignalDuration;
    int ForgetAfter;
    int LearningDuration;
    const wchar_t *LearningMethod;
    int LearningThreshold;
    const wchar_t *v_type;
    const wchar_t *updateAuthorId;
    const wchar_t *version;
    int i;
    int count_i;

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

    http = CkHttpW_Create();

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "cases": [
    //     {
    //       "condition": "<string>",
    //       "name": "<string>",
    //       "notifications": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "status": "critical"
    //     },
    //     {
    //       "condition": "<string>",
    //       "name": "<string>",
    //       "notifications": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "status": "critical"
    //     }
    //   ],
    //   "complianceSignalOptions": {
    //     "defaultActivationStatus": "<boolean>",
    //     "defaultGroupByFields": [
    //       "<string>",
    //       "<string>"
    //     ],
    //     "userActivationStatus": "<boolean>",
    //     "userGroupByFields": [
    //       "<string>",
    //       "<string>"
    //     ]
    //   },
    //   "filters": [
    //     {
    //       "action": "suppress",
    //       "query": "<string>"
    //     },
    //     {
    //       "action": "suppress",
    //       "query": "<string>"
    //     }
    //   ],
    //   "hasExtendedTitle": "<boolean>",
    //   "isEnabled": "<boolean>",
    //   "message": "<string>",
    //   "name": "<string>",
    //   "options": {
    //     "complianceRuleOptions": {
    //       "complexRule": "<boolean>",
    //       "regoRule": {
    //         "policy": "<string>",
    //         "resourceTypes": [
    //           "<string>",
    //           "<string>"
    //         ]
    //       },
    //       "resourceType": "<string>",
    //       "nisic3": {}
    //     },
    //     "decreaseCriticalityBasedOnEnv": "<boolean>",
    //     "detectionMethod": "third_party",
    //     "evaluationWindow": 3600,
    //     "hardcodedEvaluatorType": "log4shell",
    //     "impossibleTravelOptions": {
    //       "baselineUserLocations": "<boolean>"
    //     },
    //     "keepAlive": 10800,
    //     "maxSignalDuration": 21600,
    //     "newValueOptions": {
    //       "forgetAfter": 28,
    //       "learningDuration": 0,
    //       "learningMethod": "duration",
    //       "learningThreshold": 0
    //     }
    //   },
    //   "queries": [
    //     {
    //       "aggregation": "max",
    //       "distinctFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "groupByFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "metric": "<string>",
    //       "metrics": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "name": "<string>",
    //       "query": "<string>"
    //     },
    //     {
    //       "aggregation": "geo_data",
    //       "distinctFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "groupByFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "metric": "<string>",
    //       "metrics": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "name": "<string>",
    //       "query": "<string>"
    //     }
    //   ],
    //   "tags": [
    //     "<string>",
    //     "<string>"
    //   ],
    //   "version": "<integer>"
    // }

    json = CkJsonObjectW_Create();
    CkJsonObjectW_UpdateString(json,L"cases[0].condition",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[0].name",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[0].notifications[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[0].notifications[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[0].status",L"critical");
    CkJsonObjectW_UpdateString(json,L"cases[1].condition",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[1].name",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[1].notifications[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[1].notifications[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"cases[1].status",L"critical");
    CkJsonObjectW_UpdateString(json,L"complianceSignalOptions.defaultActivationStatus",L"<boolean>");
    CkJsonObjectW_UpdateString(json,L"complianceSignalOptions.defaultGroupByFields[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"complianceSignalOptions.defaultGroupByFields[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"complianceSignalOptions.userActivationStatus",L"<boolean>");
    CkJsonObjectW_UpdateString(json,L"complianceSignalOptions.userGroupByFields[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"complianceSignalOptions.userGroupByFields[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"filters[0].action",L"suppress");
    CkJsonObjectW_UpdateString(json,L"filters[0].query",L"<string>");
    CkJsonObjectW_UpdateString(json,L"filters[1].action",L"suppress");
    CkJsonObjectW_UpdateString(json,L"filters[1].query",L"<string>");
    CkJsonObjectW_UpdateString(json,L"hasExtendedTitle",L"<boolean>");
    CkJsonObjectW_UpdateString(json,L"isEnabled",L"<boolean>");
    CkJsonObjectW_UpdateString(json,L"message",L"<string>");
    CkJsonObjectW_UpdateString(json,L"name",L"<string>");
    CkJsonObjectW_UpdateString(json,L"options.complianceRuleOptions.complexRule",L"<boolean>");
    CkJsonObjectW_UpdateString(json,L"options.complianceRuleOptions.regoRule.policy",L"<string>");
    CkJsonObjectW_UpdateString(json,L"options.complianceRuleOptions.regoRule.resourceTypes[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"options.complianceRuleOptions.regoRule.resourceTypes[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"options.complianceRuleOptions.resourceType",L"<string>");
    CkJsonObjectW_UpdateNewObject(json,L"options.complianceRuleOptions.nisic3");
    CkJsonObjectW_UpdateString(json,L"options.decreaseCriticalityBasedOnEnv",L"<boolean>");
    CkJsonObjectW_UpdateString(json,L"options.detectionMethod",L"third_party");
    CkJsonObjectW_UpdateInt(json,L"options.evaluationWindow",3600);
    CkJsonObjectW_UpdateString(json,L"options.hardcodedEvaluatorType",L"log4shell");
    CkJsonObjectW_UpdateString(json,L"options.impossibleTravelOptions.baselineUserLocations",L"<boolean>");
    CkJsonObjectW_UpdateInt(json,L"options.keepAlive",10800);
    CkJsonObjectW_UpdateInt(json,L"options.maxSignalDuration",21600);
    CkJsonObjectW_UpdateInt(json,L"options.newValueOptions.forgetAfter",28);
    CkJsonObjectW_UpdateInt(json,L"options.newValueOptions.learningDuration",0);
    CkJsonObjectW_UpdateString(json,L"options.newValueOptions.learningMethod",L"duration");
    CkJsonObjectW_UpdateInt(json,L"options.newValueOptions.learningThreshold",0);
    CkJsonObjectW_UpdateString(json,L"queries[0].aggregation",L"max");
    CkJsonObjectW_UpdateString(json,L"queries[0].distinctFields[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].distinctFields[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].groupByFields[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].groupByFields[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].metric",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].metrics[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].metrics[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].name",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[0].query",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].aggregation",L"geo_data");
    CkJsonObjectW_UpdateString(json,L"queries[1].distinctFields[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].distinctFields[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].groupByFields[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].groupByFields[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].metric",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].metrics[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].metrics[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].name",L"<string>");
    CkJsonObjectW_UpdateString(json,L"queries[1].query",L"<string>");
    CkJsonObjectW_UpdateString(json,L"tags[0]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"tags[1]",L"<string>");
    CkJsonObjectW_UpdateString(json,L"version",L"<integer>");

    CkHttpW_SetRequestHeader(http,L"Content-Type",L"application/json");
    CkHttpW_SetRequestHeader(http,L"Accept",L"application/json");

    sbRequestBody = CkStringBuilderW_Create();
    CkJsonObjectW_EmitSb(json,sbRequestBody);

    resp = CkHttpW_PTextSb(http,L"PUT",L"https://api.app.ddog-gov.com/api/v2/security_monitoring/rules/:rule_id",sbRequestBody,L"utf-8",L"application/json",FALSE,FALSE);
    if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        CkJsonObjectW_Dispose(json);
        CkStringBuilderW_Dispose(sbRequestBody);
        return;
    }

    sbResponseBody = CkStringBuilderW_Create();
    CkHttpResponseW_GetBodySb(resp,sbResponseBody);

    jResp = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(jResp,sbResponseBody);
    CkJsonObjectW_putEmitCompact(jResp,FALSE);

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

    respStatusCode = CkHttpResponseW_getStatusCode(resp);
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkHttpResponseW_header(resp));
        wprintf(L"Failed.\n");
        CkHttpResponseW_Dispose(resp);
        CkHttpW_Dispose(http);
        CkJsonObjectW_Dispose(json);
        CkStringBuilderW_Dispose(sbRequestBody);
        CkStringBuilderW_Dispose(sbResponseBody);
        CkJsonObjectW_Dispose(jResp);
        return;
    }

    CkHttpResponseW_Dispose(resp);

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "cases": [
    //     {
    //       "condition": "<string>",
    //       "name": "<string>",
    //       "notifications": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "status": "medium"
    //     },
    //     {
    //       "condition": "<string>",
    //       "name": "<string>",
    //       "notifications": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "status": "critical"
    //     }
    //   ],
    //   "complianceSignalOptions": {
    //     "defaultActivationStatus": "<boolean>",
    //     "defaultGroupByFields": [
    //       "<string>",
    //       "<string>"
    //     ],
    //     "userActivationStatus": "<boolean>",
    //     "userGroupByFields": [
    //       "<string>",
    //       "<string>"
    //     ]
    //   },
    //   "createdAt": "<long>",
    //   "creationAuthorId": "<long>",
    //   "deprecationDate": "<long>",
    //   "filters": [
    //     {
    //       "action": "suppress",
    //       "query": "<string>"
    //     },
    //     {
    //       "action": "require",
    //       "query": "<string>"
    //     }
    //   ],
    //   "hasExtendedTitle": "<boolean>",
    //   "id": "<string>",
    //   "isDefault": "<boolean>",
    //   "isDeleted": "<boolean>",
    //   "isEnabled": "<boolean>",
    //   "message": "<string>",
    //   "name": "<string>",
    //   "options": {
    //     "complianceRuleOptions": {
    //       "complexRule": "<boolean>",
    //       "regoRule": {
    //         "policy": "<string>",
    //         "resourceTypes": [
    //           "<string>",
    //           "<string>"
    //         ]
    //       },
    //       "resourceType": "<string>"
    //     },
    //     "decreaseCriticalityBasedOnEnv": "<boolean>",
    //     "detectionMethod": "third_party",
    //     "evaluationWindow": 300,
    //     "hardcodedEvaluatorType": "log4shell",
    //     "impossibleTravelOptions": {
    //       "baselineUserLocations": "<boolean>"
    //     },
    //     "keepAlive": 300,
    //     "maxSignalDuration": 900,
    //     "newValueOptions": {
    //       "forgetAfter": 28,
    //       "learningDuration": 0,
    //       "learningMethod": "duration",
    //       "learningThreshold": 0
    //     }
    //   },
    //   "queries": [
    //     {
    //       "aggregation": "max",
    //       "distinctFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "groupByFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "metric": "<string>",
    //       "metrics": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "name": "<string>",
    //       "query": "<string>"
    //     },
    //     {
    //       "aggregation": "max",
    //       "distinctFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "groupByFields": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "metric": "<string>",
    //       "metrics": [
    //         "<string>",
    //         "<string>"
    //       ],
    //       "name": "<string>",
    //       "query": "<string>"
    //     }
    //   ],
    //   "tags": [
    //     "<string>",
    //     "<string>"
    //   ],
    //   "type": "application_security",
    //   "updateAuthorId": "<long>",
    //   "version": "<long>"
    // }

    // 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.

    DefaultActivationStatus = CkJsonObjectW_stringOf(jResp,L"complianceSignalOptions.defaultActivationStatus");
    UserActivationStatus = CkJsonObjectW_stringOf(jResp,L"complianceSignalOptions.userActivationStatus");
    createdAt = CkJsonObjectW_stringOf(jResp,L"createdAt");
    creationAuthorId = CkJsonObjectW_stringOf(jResp,L"creationAuthorId");
    deprecationDate = CkJsonObjectW_stringOf(jResp,L"deprecationDate");
    hasExtendedTitle = CkJsonObjectW_stringOf(jResp,L"hasExtendedTitle");
    id = CkJsonObjectW_stringOf(jResp,L"id");
    isDefault = CkJsonObjectW_stringOf(jResp,L"isDefault");
    isDeleted = CkJsonObjectW_stringOf(jResp,L"isDeleted");
    isEnabled = CkJsonObjectW_stringOf(jResp,L"isEnabled");
    message = CkJsonObjectW_stringOf(jResp,L"message");
    name = CkJsonObjectW_stringOf(jResp,L"name");
    ComplexRule = CkJsonObjectW_stringOf(jResp,L"options.complianceRuleOptions.complexRule");
    Policy = CkJsonObjectW_stringOf(jResp,L"options.complianceRuleOptions.regoRule.policy");
    ResourceType = CkJsonObjectW_stringOf(jResp,L"options.complianceRuleOptions.resourceType");
    DecreaseCriticalityBasedOnEnv = CkJsonObjectW_stringOf(jResp,L"options.decreaseCriticalityBasedOnEnv");
    DetectionMethod = CkJsonObjectW_stringOf(jResp,L"options.detectionMethod");
    EvaluationWindow = CkJsonObjectW_IntOf(jResp,L"options.evaluationWindow");
    HardcodedEvaluatorType = CkJsonObjectW_stringOf(jResp,L"options.hardcodedEvaluatorType");
    BaselineUserLocations = CkJsonObjectW_stringOf(jResp,L"options.impossibleTravelOptions.baselineUserLocations");
    KeepAlive = CkJsonObjectW_IntOf(jResp,L"options.keepAlive");
    MaxSignalDuration = CkJsonObjectW_IntOf(jResp,L"options.maxSignalDuration");
    ForgetAfter = CkJsonObjectW_IntOf(jResp,L"options.newValueOptions.forgetAfter");
    LearningDuration = CkJsonObjectW_IntOf(jResp,L"options.newValueOptions.learningDuration");
    LearningMethod = CkJsonObjectW_stringOf(jResp,L"options.newValueOptions.learningMethod");
    LearningThreshold = CkJsonObjectW_IntOf(jResp,L"options.newValueOptions.learningThreshold");
    v_type = CkJsonObjectW_stringOf(jResp,L"type");
    updateAuthorId = CkJsonObjectW_stringOf(jResp,L"updateAuthorId");
    version = CkJsonObjectW_stringOf(jResp,L"version");
    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"cases");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        condition = CkJsonObjectW_stringOf(jResp,L"cases[i].condition");
        name = CkJsonObjectW_stringOf(jResp,L"cases[i].name");
        status = CkJsonObjectW_stringOf(jResp,L"cases[i].status");
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"cases[i].notifications");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            strVal = CkJsonObjectW_stringOf(jResp,L"cases[i].notifications[j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"complianceSignalOptions.defaultGroupByFields");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"complianceSignalOptions.defaultGroupByFields[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"complianceSignalOptions.userGroupByFields");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"complianceSignalOptions.userGroupByFields[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"filters");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        action = CkJsonObjectW_stringOf(jResp,L"filters[i].action");
        query = CkJsonObjectW_stringOf(jResp,L"filters[i].query");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"options.complianceRuleOptions.regoRule.resourceTypes");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"options.complianceRuleOptions.regoRule.resourceTypes[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"queries");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        aggregation = CkJsonObjectW_stringOf(jResp,L"queries[i].aggregation");
        metric = CkJsonObjectW_stringOf(jResp,L"queries[i].metric");
        name = CkJsonObjectW_stringOf(jResp,L"queries[i].name");
        query = CkJsonObjectW_stringOf(jResp,L"queries[i].query");
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"queries[i].distinctFields");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            strVal = CkJsonObjectW_stringOf(jResp,L"queries[i].distinctFields[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"queries[i].groupByFields");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            strVal = CkJsonObjectW_stringOf(jResp,L"queries[i].groupByFields[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"queries[i].metrics");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            strVal = CkJsonObjectW_stringOf(jResp,L"queries[i].metrics[j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"tags");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"tags[i]");
        i = i + 1;
    }



    CkHttpW_Dispose(http);
    CkJsonObjectW_Dispose(json);
    CkStringBuilderW_Dispose(sbRequestBody);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }

Curl Command

curl -X PUT
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "cases": [
    {
      "condition": "<string>",
      "name": "<string>",
      "notifications": [
        "<string>",
        "<string>"
      ],
      "status": "critical"
    },
    {
      "condition": "<string>",
      "name": "<string>",
      "notifications": [
        "<string>",
        "<string>"
      ],
      "status": "critical"
    }
  ],
  "complianceSignalOptions": {
    "defaultActivationStatus": "<boolean>",
    "defaultGroupByFields": [
      "<string>",
      "<string>"
    ],
    "userActivationStatus": "<boolean>",
    "userGroupByFields": [
      "<string>",
      "<string>"
    ]
  },
  "filters": [
    {
      "action": "suppress",
      "query": "<string>"
    },
    {
      "action": "suppress",
      "query": "<string>"
    }
  ],
  "hasExtendedTitle": "<boolean>",
  "isEnabled": "<boolean>",
  "message": "<string>",
  "name": "<string>",
  "options": {
    "complianceRuleOptions": {
      "complexRule": "<boolean>",
      "regoRule": {
        "policy": "<string>",
        "resourceTypes": [
          "<string>",
          "<string>"
        ]
      },
      "resourceType": "<string>",
      "nisic3": {}
    },
    "decreaseCriticalityBasedOnEnv": "<boolean>",
    "detectionMethod": "third_party",
    "evaluationWindow": 3600,
    "hardcodedEvaluatorType": "log4shell",
    "impossibleTravelOptions": {
      "baselineUserLocations": "<boolean>"
    },
    "keepAlive": 10800,
    "maxSignalDuration": 21600,
    "newValueOptions": {
      "forgetAfter": 28,
      "learningDuration": 0,
      "learningMethod": "duration",
      "learningThreshold": 0
    }
  },
  "queries": [
    {
      "aggregation": "max",
      "distinctFields": [
        "<string>",
        "<string>"
      ],
      "groupByFields": [
        "<string>",
        "<string>"
      ],
      "metric": "<string>",
      "metrics": [
        "<string>",
        "<string>"
      ],
      "name": "<string>",
      "query": "<string>"
    },
    {
      "aggregation": "geo_data",
      "distinctFields": [
        "<string>",
        "<string>"
      ],
      "groupByFields": [
        "<string>",
        "<string>"
      ],
      "metric": "<string>",
      "metrics": [
        "<string>",
        "<string>"
      ],
      "name": "<string>",
      "query": "<string>"
    }
  ],
  "tags": [
    "<string>",
    "<string>"
  ],
  "version": "<integer>"
}'
https://api.app.ddog-gov.com/api/v2/security_monitoring/rules/:rule_id

Postman Collection Item JSON

{
  "name": "Update an existing rule",
  "request": {
    "method": "PUT",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\",\n      \"nisic3\": {}\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 3600,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 10800,\n    \"maxSignalDuration\": 21600,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"geo_data\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"version\": \"<integer>\"\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v2/security_monitoring/rules/:rule_id",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "security_monitoring",
        "rules",
        ":rule_id"
      ],
      "variable": [
        {
          "key": "rule_id",
          "value": "<string>"
        }
      ]
    },
    "description": "Update an existing rule. When updating `cases`, `queries` or `options`, the whole field\nmust be included. For example, when modifying a query all queries must be included.\nDefault rules can only be updated to be enabled and to change notifications."
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\",\n      \"nisic3\": {}\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 3600,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 10800,\n    \"maxSignalDuration\": 21600,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"geo_data\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"version\": \"<integer>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/security_monitoring/rules/:rule_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "security_monitoring",
            "rules",
            ":rule_id"
          ],
          "variable": [
            {
              "key": "rule_id"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"medium\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"createdAt\": \"<long>\",\n  \"creationAuthorId\": \"<long>\",\n  \"deprecationDate\": \"<long>\",\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"require\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"id\": \"<string>\",\n  \"isDefault\": \"<boolean>\",\n  \"isDeleted\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\"\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 300,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 300,\n    \"maxSignalDuration\": 900,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"type\": \"application_security\",\n  \"updateAuthorId\": \"<long>\",\n  \"version\": \"<long>\"\n}"
    },
    {
      "name": "Bad Request",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\",\n      \"nisic3\": {}\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 3600,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 10800,\n    \"maxSignalDuration\": 21600,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"geo_data\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"version\": \"<integer>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/security_monitoring/rules/:rule_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "security_monitoring",
            "rules",
            ":rule_id"
          ],
          "variable": [
            {
              "key": "rule_id"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Concurrent Modification",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\",\n      \"nisic3\": {}\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 3600,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 10800,\n    \"maxSignalDuration\": 21600,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"geo_data\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"version\": \"<integer>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/security_monitoring/rules/:rule_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "security_monitoring",
            "rules",
            ":rule_id"
          ],
          "variable": [
            {
              "key": "rule_id"
            }
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Not Authorized",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\",\n      \"nisic3\": {}\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 3600,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 10800,\n    \"maxSignalDuration\": 21600,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"geo_data\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"version\": \"<integer>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/security_monitoring/rules/:rule_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "security_monitoring",
            "rules",
            ":rule_id"
          ],
          "variable": [
            {
              "key": "rule_id"
            }
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Not Found",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\",\n      \"nisic3\": {}\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 3600,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 10800,\n    \"maxSignalDuration\": 21600,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"geo_data\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"version\": \"<integer>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/security_monitoring/rules/:rule_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "security_monitoring",
            "rules",
            ":rule_id"
          ],
          "variable": [
            {
              "key": "rule_id"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"cases\": [\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    },\n    {\n      \"condition\": \"<string>\",\n      \"name\": \"<string>\",\n      \"notifications\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"status\": \"critical\"\n    }\n  ],\n  \"complianceSignalOptions\": {\n    \"defaultActivationStatus\": \"<boolean>\",\n    \"defaultGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"userActivationStatus\": \"<boolean>\",\n    \"userGroupByFields\": [\n      \"<string>\",\n      \"<string>\"\n    ]\n  },\n  \"filters\": [\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"action\": \"suppress\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"hasExtendedTitle\": \"<boolean>\",\n  \"isEnabled\": \"<boolean>\",\n  \"message\": \"<string>\",\n  \"name\": \"<string>\",\n  \"options\": {\n    \"complianceRuleOptions\": {\n      \"complexRule\": \"<boolean>\",\n      \"regoRule\": {\n        \"policy\": \"<string>\",\n        \"resourceTypes\": [\n          \"<string>\",\n          \"<string>\"\n        ]\n      },\n      \"resourceType\": \"<string>\",\n      \"nisic3\": {}\n    },\n    \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n    \"detectionMethod\": \"third_party\",\n    \"evaluationWindow\": 3600,\n    \"hardcodedEvaluatorType\": \"log4shell\",\n    \"impossibleTravelOptions\": {\n      \"baselineUserLocations\": \"<boolean>\"\n    },\n    \"keepAlive\": 10800,\n    \"maxSignalDuration\": 21600,\n    \"newValueOptions\": {\n      \"forgetAfter\": 28,\n      \"learningDuration\": 0,\n      \"learningMethod\": \"duration\",\n      \"learningThreshold\": 0\n    }\n  },\n  \"queries\": [\n    {\n      \"aggregation\": \"max\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    },\n    {\n      \"aggregation\": \"geo_data\",\n      \"distinctFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"groupByFields\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"metric\": \"<string>\",\n      \"metrics\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"name\": \"<string>\",\n      \"query\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"version\": \"<integer>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/security_monitoring/rules/:rule_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "security_monitoring",
            "rules",
            ":rule_id"
          ],
          "variable": [
            {
              "key": "rule_id"
            }
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    }
  ]
}