Chilkat Online Tools

Unicode C++ / Datadog API Collection / List all APM retention filters

Back to Collection Items

void ChilkatSample(void)
    {
    success = http.QuickGetSb(L"https://api.app.ddog-gov.com/api/v2/apm/config/retention-filters",sbResponseBody);    jResp.LoadSb(sbResponseBody);    jResp.put_EmitCompact(false);    jResp.put_I(i);    id = jResp.stringOf(L"data[i].id");    v_type = jResp.stringOf(L"data[i].type");    Created_at = jResp.stringOf(L"data[i].attributes.created_at");    Created_by = jResp.stringOf(L"data[i].attributes.created_by");    Editable = jResp.stringOf(L"data[i].attributes.editable");    Enabled = jResp.stringOf(L"data[i].attributes.enabled");    Execution_order = jResp.stringOf(L"data[i].attributes.execution_order");    Query = jResp.stringOf(L"data[i].attributes.filter.query");    Filter_type = jResp.stringOf(L"data[i].attributes.filter_type");    Modified_at = jResp.stringOf(L"data[i].attributes.modified_at");    Modified_by = jResp.stringOf(L"data[i].attributes.modified_by");    Name = jResp.stringOf(L"data[i].attributes.name");    Rate = jResp.stringOf(L"data[i].attributes.rate");    i = i + 1;
    }

Curl Command

curl -X GET
	-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v2/apm/config/retention-filters

Postman Collection Item JSON

{
  "name": "List all APM retention filters",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v2/apm/config/retention-filters",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "apm",
        "config",
        "retention-filters"
      ]
    },
    "description": "Get the list of APM retention filters."
  },
  "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/apm/config/retention-filters",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "apm",
            "config",
            "retention-filters"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"data\": [\n    {\n      \"id\": \"<string>\",\n      \"type\": \"apm_retention_filter\",\n      \"attributes\": {\n        \"created_at\": \"<long>\",\n        \"created_by\": \"<string>\",\n        \"editable\": \"<boolean>\",\n        \"enabled\": \"<boolean>\",\n        \"execution_order\": \"<long>\",\n        \"filter\": {\n          \"query\": \"<string>\"\n        },\n        \"filter_type\": \"spans-sampling-processor\",\n        \"modified_at\": \"<long>\",\n        \"modified_by\": \"<string>\",\n        \"name\": \"<string>\",\n        \"rate\": \"<double>\"\n      }\n    },\n    {\n      \"id\": \"<string>\",\n      \"type\": \"apm_retention_filter\",\n      \"attributes\": {\n        \"created_at\": \"<long>\",\n        \"created_by\": \"<string>\",\n        \"editable\": \"<boolean>\",\n        \"enabled\": \"<boolean>\",\n        \"execution_order\": \"<long>\",\n        \"filter\": {\n          \"query\": \"<string>\"\n        },\n        \"filter_type\": \"spans-sampling-processor\",\n        \"modified_at\": \"<long>\",\n        \"modified_by\": \"<string>\",\n        \"name\": \"<string>\",\n        \"rate\": \"<double>\"\n      }\n    }\n  ]\n}"
    },
    {
      "name": "Not Authorized",
      "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/apm/config/retention-filters",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "apm",
            "config",
            "retention-filters"
          ]
        }
      },
      "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": "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/apm/config/retention-filters",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "apm",
            "config",
            "retention-filters"
          ]
        }
      },
      "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}"
    }
  ]
}