Chilkat Online Tools

Unicode C++ / Datadog API Collection / Get indexes order

Back to Collection Items

void ChilkatSample(void)
    {
    success = http.QuickGetSb(L"https://api.app.ddog-gov.com/api/v1/logs/config/index-order",sbResponseBody);    jResp.LoadSb(sbResponseBody);    jResp.put_EmitCompact(false);    jResp.put_I(i);    strVal = jResp.stringOf(L"index_names[i]");    i = i + 1;
    }

Curl Command

curl -X GET
	-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/logs/config/index-order

Postman Collection Item JSON

{
  "name": "Get indexes order",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v1/logs/config/index-order",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "logs",
        "config",
        "index-order"
      ]
    },
    "description": "Get the current order of your log indexes. This endpoint takes no JSON arguments."
  },
  "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/v1/logs/config/index-order",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "logs",
            "config",
            "index-order"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"index_names\": [\n    \"main\",\n    \"payments\",\n    \"web\"\n  ]\n}"
    },
    {
      "name": "Forbidden",
      "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/v1/logs/config/index-order",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "logs",
            "config",
            "index-order"
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_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": "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/v1/logs/config/index-order",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "logs",
            "config",
            "index-order"
          ]
        }
      },
      "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}"
    }
  ]
}