Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkJsonObjectW queryParams;
HCkHttpResponseW resp;
HCkStringBuilderW sbResponseBody;
HCkJsonObjectW jResp;
int respStatusCode;
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 j;
int count_j;
const wchar_t *condition;
const wchar_t *status;
int k;
int count_k;
const wchar_t *strVal;
const wchar_t *action;
const wchar_t *query;
const wchar_t *aggregation;
const wchar_t *metric;
const wchar_t *Total_count;
const wchar_t *Total_filtered_count;
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();
queryParams = CkJsonObjectW_Create();
CkJsonObjectW_UpdateInt(queryParams,L"page[size]",10);
CkJsonObjectW_UpdateInt(queryParams,L"page[number]",0);
CkHttpW_SetRequestHeader(http,L"Accept",L"application/json");
resp = CkHttpW_QuickRequestParams(http,L"GET",L"https://api.app.ddog-gov.com/api/v2/security_monitoring/rules",queryParams);
if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
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(queryParams);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
return;
}
CkHttpResponseW_Dispose(resp);
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "data": [
// {
// "cases": [
// {
// "condition": "<string>",
// "name": "<string>",
// "notifications": [
// "<string>",
// "<string>"
// ],
// "status": "medium"
// },
// {
// "condition": "<string>",
// "name": "<string>",
// "notifications": [
// "<string>",
// "<string>"
// ],
// "status": "info"
// }
// ],
// "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>",
// "sunt__": {}
// },
// "decreaseCriticalityBasedOnEnv": "<boolean>",
// "detectionMethod": "threshold",
// "evaluationWindow": 7200,
// "hardcodedEvaluatorType": "log4shell",
// "impossibleTravelOptions": {
// "baselineUserLocations": "<boolean>"
// },
// "keepAlive": 60,
// "maxSignalDuration": 60,
// "newValueOptions": {
// "forgetAfter": 14,
// "learningDuration": 0,
// "learningMethod": "duration",
// "learningThreshold": 0
// }
// },
// "queries": [
// {
// "aggregation": "geo_data",
// "distinctFields": [
// "<string>",
// "<string>"
// ],
// "groupByFields": [
// "<string>",
// "<string>"
// ],
// "metric": "<string>",
// "metrics": [
// "<string>",
// "<string>"
// ],
// "name": "<string>",
// "query": "<string>"
// },
// {
// "aggregation": "new_value",
// "distinctFields": [
// "<string>",
// "<string>"
// ],
// "groupByFields": [
// "<string>",
// "<string>"
// ],
// "metric": "<string>",
// "metrics": [
// "<string>",
// "<string>"
// ],
// "name": "<string>",
// "query": "<string>"
// }
// ],
// "tags": [
// "<string>",
// "<string>"
// ],
// "type": "log_detection",
// "updateAuthorId": "<long>",
// "version": "<long>"
// },
// {
// "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": "suppress",
// "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>",
// "mollit_4": {},
// "culpa_2": {}
// },
// "decreaseCriticalityBasedOnEnv": "<boolean>",
// "detectionMethod": "hardcoded",
// "evaluationWindow": 300,
// "hardcodedEvaluatorType": "log4shell",
// "impossibleTravelOptions": {
// "baselineUserLocations": "<boolean>"
// },
// "keepAlive": 21600,
// "maxSignalDuration": 10800,
// "newValueOptions": {
// "forgetAfter": 2,
// "learningDuration": 0,
// "learningMethod": "duration",
// "learningThreshold": 0
// }
// },
// "queries": [
// {
// "aggregation": "new_value",
// "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>"
// ],
// "type": "infrastructure_configuration",
// "updateAuthorId": "<long>",
// "version": "<long>"
// }
// ],
// "meta": {
// "page": {
// "total_count": "<long>",
// "total_filtered_count": "<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.
Total_count = CkJsonObjectW_stringOf(jResp,L"meta.page.total_count");
Total_filtered_count = CkJsonObjectW_stringOf(jResp,L"meta.page.total_filtered_count");
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"data");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
DefaultActivationStatus = CkJsonObjectW_stringOf(jResp,L"data[i].complianceSignalOptions.defaultActivationStatus");
UserActivationStatus = CkJsonObjectW_stringOf(jResp,L"data[i].complianceSignalOptions.userActivationStatus");
createdAt = CkJsonObjectW_stringOf(jResp,L"data[i].createdAt");
creationAuthorId = CkJsonObjectW_stringOf(jResp,L"data[i].creationAuthorId");
deprecationDate = CkJsonObjectW_stringOf(jResp,L"data[i].deprecationDate");
hasExtendedTitle = CkJsonObjectW_stringOf(jResp,L"data[i].hasExtendedTitle");
id = CkJsonObjectW_stringOf(jResp,L"data[i].id");
isDefault = CkJsonObjectW_stringOf(jResp,L"data[i].isDefault");
isDeleted = CkJsonObjectW_stringOf(jResp,L"data[i].isDeleted");
isEnabled = CkJsonObjectW_stringOf(jResp,L"data[i].isEnabled");
message = CkJsonObjectW_stringOf(jResp,L"data[i].message");
name = CkJsonObjectW_stringOf(jResp,L"data[i].name");
ComplexRule = CkJsonObjectW_stringOf(jResp,L"data[i].options.complianceRuleOptions.complexRule");
Policy = CkJsonObjectW_stringOf(jResp,L"data[i].options.complianceRuleOptions.regoRule.policy");
ResourceType = CkJsonObjectW_stringOf(jResp,L"data[i].options.complianceRuleOptions.resourceType");
DecreaseCriticalityBasedOnEnv = CkJsonObjectW_stringOf(jResp,L"data[i].options.decreaseCriticalityBasedOnEnv");
DetectionMethod = CkJsonObjectW_stringOf(jResp,L"data[i].options.detectionMethod");
EvaluationWindow = CkJsonObjectW_IntOf(jResp,L"data[i].options.evaluationWindow");
HardcodedEvaluatorType = CkJsonObjectW_stringOf(jResp,L"data[i].options.hardcodedEvaluatorType");
BaselineUserLocations = CkJsonObjectW_stringOf(jResp,L"data[i].options.impossibleTravelOptions.baselineUserLocations");
KeepAlive = CkJsonObjectW_IntOf(jResp,L"data[i].options.keepAlive");
MaxSignalDuration = CkJsonObjectW_IntOf(jResp,L"data[i].options.maxSignalDuration");
ForgetAfter = CkJsonObjectW_IntOf(jResp,L"data[i].options.newValueOptions.forgetAfter");
LearningDuration = CkJsonObjectW_IntOf(jResp,L"data[i].options.newValueOptions.learningDuration");
LearningMethod = CkJsonObjectW_stringOf(jResp,L"data[i].options.newValueOptions.learningMethod");
LearningThreshold = CkJsonObjectW_IntOf(jResp,L"data[i].options.newValueOptions.learningThreshold");
v_type = CkJsonObjectW_stringOf(jResp,L"data[i].type");
updateAuthorId = CkJsonObjectW_stringOf(jResp,L"data[i].updateAuthorId");
version = CkJsonObjectW_stringOf(jResp,L"data[i].version");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"data[i].cases");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
condition = CkJsonObjectW_stringOf(jResp,L"data[i].cases[j].condition");
name = CkJsonObjectW_stringOf(jResp,L"data[i].cases[j].name");
status = CkJsonObjectW_stringOf(jResp,L"data[i].cases[j].status");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"data[i].cases[j].notifications");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].cases[j].notifications[k]");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"data[i].complianceSignalOptions.defaultGroupByFields");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].complianceSignalOptions.defaultGroupByFields[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"data[i].complianceSignalOptions.userGroupByFields");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].complianceSignalOptions.userGroupByFields[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"data[i].filters");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
action = CkJsonObjectW_stringOf(jResp,L"data[i].filters[j].action");
query = CkJsonObjectW_stringOf(jResp,L"data[i].filters[j].query");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"data[i].options.complianceRuleOptions.regoRule.resourceTypes");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].options.complianceRuleOptions.regoRule.resourceTypes[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"data[i].queries");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
aggregation = CkJsonObjectW_stringOf(jResp,L"data[i].queries[j].aggregation");
metric = CkJsonObjectW_stringOf(jResp,L"data[i].queries[j].metric");
name = CkJsonObjectW_stringOf(jResp,L"data[i].queries[j].name");
query = CkJsonObjectW_stringOf(jResp,L"data[i].queries[j].query");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"data[i].queries[j].distinctFields");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].queries[j].distinctFields[k]");
k = k + 1;
}
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"data[i].queries[j].groupByFields");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].queries[j].groupByFields[k]");
k = k + 1;
}
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"data[i].queries[j].metrics");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].queries[j].metrics[k]");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"data[i].tags");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"data[i].tags[j]");
j = j + 1;
}
i = i + 1;
}
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
}
Curl Command
curl -G -d "page[size]=10"
-d "page[number]=0"
-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v2/security_monitoring/rules
Postman Collection Item JSON
{
"name": "List rules",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/security_monitoring/rules?page[size]=10&page[number]=0",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"security_monitoring",
"rules"
],
"query": [
{
"key": "page[size]",
"value": "10",
"description": "Size for a given page. The maximum allowed value is 100."
},
{
"key": "page[number]",
"value": "0",
"description": "Specific page number to return."
}
]
},
"description": "List rules."
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/security_monitoring/rules?page[size]=10&page[number]=0",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"security_monitoring",
"rules"
],
"query": [
{
"key": "page[size]",
"value": "10",
"description": "Size for a given page. The maximum allowed value is 100."
},
{
"key": "page[number]",
"value": "0",
"description": "Specific page number to return."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"data\": [\n {\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\": \"info\"\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 \"sunt__\": {}\n },\n \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n \"detectionMethod\": \"threshold\",\n \"evaluationWindow\": 7200,\n \"hardcodedEvaluatorType\": \"log4shell\",\n \"impossibleTravelOptions\": {\n \"baselineUserLocations\": \"<boolean>\"\n },\n \"keepAlive\": 60,\n \"maxSignalDuration\": 60,\n \"newValueOptions\": {\n \"forgetAfter\": 14,\n \"learningDuration\": 0,\n \"learningMethod\": \"duration\",\n \"learningThreshold\": 0\n }\n },\n \"queries\": [\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 \"aggregation\": \"new_value\",\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\": \"log_detection\",\n \"updateAuthorId\": \"<long>\",\n \"version\": \"<long>\"\n },\n {\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\": \"suppress\",\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 \"mollit_4\": {},\n \"culpa_2\": {}\n },\n \"decreaseCriticalityBasedOnEnv\": \"<boolean>\",\n \"detectionMethod\": \"hardcoded\",\n \"evaluationWindow\": 300,\n \"hardcodedEvaluatorType\": \"log4shell\",\n \"impossibleTravelOptions\": {\n \"baselineUserLocations\": \"<boolean>\"\n },\n \"keepAlive\": 21600,\n \"maxSignalDuration\": 10800,\n \"newValueOptions\": {\n \"forgetAfter\": 2,\n \"learningDuration\": 0,\n \"learningMethod\": \"duration\",\n \"learningThreshold\": 0\n }\n },\n \"queries\": [\n {\n \"aggregation\": \"new_value\",\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 \"type\": \"infrastructure_configuration\",\n \"updateAuthorId\": \"<long>\",\n \"version\": \"<long>\"\n }\n ],\n \"meta\": {\n \"page\": {\n \"total_count\": \"<long>\",\n \"total_filtered_count\": \"<long>\"\n }\n }\n}"
},
{
"name": "Bad Request",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/security_monitoring/rules?page[size]=10&page[number]=0",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"security_monitoring",
"rules"
],
"query": [
{
"key": "page[size]",
"value": "10",
"description": "Size for a given page. The maximum allowed value is 100."
},
{
"key": "page[number]",
"value": "0",
"description": "Specific page number to return."
}
]
}
},
"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": "Too many requests",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/security_monitoring/rules?page[size]=10&page[number]=0",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"security_monitoring",
"rules"
],
"query": [
{
"key": "page[size]",
"value": "10",
"description": "Size for a given page. The maximum allowed value is 100."
},
{
"key": "page[number]",
"value": "0",
"description": "Specific page number to return."
}
]
}
},
"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}"
}
]
}