Chilkat Online Tools

unicodeC / Datadog API Collection / Get an SLO's history

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 *strVal;
    int error_budget_remaining7d;
    const wchar_t *group;
    int monitor_modified;
    const wchar_t *monitor_type;
    const wchar_t *name;
    int precision;
    BOOL preview;
    const wchar_t *sli_value;
    int span_precision;
    const wchar_t *uptime;
    int j;
    int count_j;
    const wchar_t *error_type;
    const wchar_t *error_message;
    int k;
    int count_k;
    int intVal;
    const wchar_t *error;
    int From_ts;
    int v_7d;
    const wchar_t *Group;
    int Monitor_modified;
    const wchar_t *Monitor_type;
    const wchar_t *Name;
    int v_30d;
    int Precision7d;
    BOOL Preview;
    const wchar_t *Sli_value;
    int Span_precision;
    const wchar_t *Uptime;
    const wchar_t *Res_type;
    int Interval;
    int Resp_version;
    const wchar_t *Query;
    int Count;
    int Sum;
    int DenominatorCount;
    int DenominatorSum;
    const wchar_t *Message;
    int Target;
    const wchar_t *Timeframe;
    int To_ts;
    const wchar_t *v_Type;
    int Type_id;
    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"from_ts",-62147425);
    CkJsonObjectW_UpdateInt(queryParams,L"to_ts",-62147425);
    CkJsonObjectW_UpdateString(queryParams,L"target",L"49.34019051965387");
    CkJsonObjectW_UpdateString(queryParams,L"apply_correction",L"true");

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

    resp = CkHttpW_QuickRequestParams(http,L"GET",L"https://api.app.ddog-gov.com/api/v1/slo/:slo_id/history",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": {
    //     "from_ts": 1615323990,
    //     "group_by": [
    //       "aliqua pariatur",
    //       "labor"
    //     ],
    //     "groups": [
    //       {
    //         "error_budget_remaining": {
    //           "7d": 100
    //         },
    //         "errors": [
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           },
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           }
    //         ],
    //         "group": "name",
    //         "history": [
    //           [
    //             1579212382,
    //             0
    //           ]
    //         ],
    //         "monitor_modified": 1615867200,
    //         "monitor_type": "string",
    //         "name": "string",
    //         "precision": 2,
    //         "preview": true,
    //         "sli_value": 99.99,
    //         "span_precision": 2,
    //         "uptime": 99.99
    //       },
    //       {
    //         "error_budget_remaining": {
    //           "7d": 100
    //         },
    //         "errors": [
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           },
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           }
    //         ],
    //         "group": "name",
    //         "history": [
    //           [
    //             1579212382,
    //             0
    //           ]
    //         ],
    //         "monitor_modified": 1615867200,
    //         "monitor_type": "string",
    //         "name": "string",
    //         "precision": 2,
    //         "preview": true,
    //         "sli_value": 99.99,
    //         "span_precision": 2,
    //         "uptime": 99.99
    //       }
    //     ],
    //     "monitors": [
    //       {
    //         "error_budget_remaining": {
    //           "7d": 100
    //         },
    //         "errors": [
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           },
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           }
    //         ],
    //         "group": "name",
    //         "history": [
    //           [
    //             1579212382,
    //             0
    //           ]
    //         ],
    //         "monitor_modified": 1615867200,
    //         "monitor_type": "string",
    //         "name": "string",
    //         "precision": 2,
    //         "preview": true,
    //         "sli_value": 99.99,
    //         "span_precision": 2,
    //         "uptime": 99.99
    //       },
    //       {
    //         "error_budget_remaining": {
    //           "7d": 100
    //         },
    //         "errors": [
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           },
    //           {
    //             "error_type": "",
    //             "error_message": ""
    //           }
    //         ],
    //         "group": "name",
    //         "history": [
    //           [
    //             1579212382,
    //             0
    //           ]
    //         ],
    //         "monitor_modified": 1615867200,
    //         "monitor_type": "string",
    //         "name": "string",
    //         "precision": 2,
    //         "preview": true,
    //         "sli_value": 99.99,
    //         "span_precision": 2,
    //         "uptime": 99.99
    //       }
    //     ],
    //     "overall": {
    //       "error_budget_remaining": {
    //         "7d": 100
    //       },
    //       "errors": [
    //         {
    //           "error_type": "",
    //           "error_message": ""
    //         },
    //         {
    //           "error_type": "",
    //           "error_message": ""
    //         }
    //       ],
    //       "group": "name",
    //       "history": [
    //         [
    //           1579212382,
    //           0
    //         ]
    //       ],
    //       "monitor_modified": 1615867200,
    //       "monitor_type": "string",
    //       "name": "string",
    //       "precision": {
    //         "30d": 1,
    //         "7d": 2
    //       },
    //       "preview": true,
    //       "sli_value": 99.99,
    //       "span_precision": 2,
    //       "uptime": 99.99
    //     },
    //     "series": {
    //       "res_type": "",
    //       "interval": 0,
    //       "resp_version": 0,
    //       "query": "",
    //       "times": [
    //       ],
    //       "numerator": {
    //         "count": 0,
    //         "sum": 0,
    //         "metadata": {}
    //       },
    //       "denominator": {
    //         "count": 0,
    //         "sum": 0,
    //         "metadata": {}
    //       },
    //       "message": ""
    //     },
    //     "thresholds": {
    //       "my_service": {
    //         "target": 95,
    //         "timeframe": "7d"
    //       }
    //     },
    //     "to_ts": 1615928790,
    //     "type": "metric",
    //     "type_id": 0
    //   },
    //   "errors": [
    //     {
    //       "error": "ullamco pariatur"
    //     },
    //     {
    //       "error": "aliquip anim do laborum commodo"
    //     }
    //   ]
    // }

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

    From_ts = CkJsonObjectW_IntOf(jResp,L"data.from_ts");
    v_7d = CkJsonObjectW_IntOf(jResp,L"data.overall.error_budget_remaining.7d");
    Group = CkJsonObjectW_stringOf(jResp,L"data.overall.group");
    Monitor_modified = CkJsonObjectW_IntOf(jResp,L"data.overall.monitor_modified");
    Monitor_type = CkJsonObjectW_stringOf(jResp,L"data.overall.monitor_type");
    Name = CkJsonObjectW_stringOf(jResp,L"data.overall.name");
    v_30d = CkJsonObjectW_IntOf(jResp,L"data.overall.precision.30d");
    Precision7d = CkJsonObjectW_IntOf(jResp,L"data.overall.precision.7d");
    Preview = CkJsonObjectW_BoolOf(jResp,L"data.overall.preview");
    Sli_value = CkJsonObjectW_stringOf(jResp,L"data.overall.sli_value");
    Span_precision = CkJsonObjectW_IntOf(jResp,L"data.overall.span_precision");
    Uptime = CkJsonObjectW_stringOf(jResp,L"data.overall.uptime");
    Res_type = CkJsonObjectW_stringOf(jResp,L"data.series.res_type");
    Interval = CkJsonObjectW_IntOf(jResp,L"data.series.interval");
    Resp_version = CkJsonObjectW_IntOf(jResp,L"data.series.resp_version");
    Query = CkJsonObjectW_stringOf(jResp,L"data.series.query");
    Count = CkJsonObjectW_IntOf(jResp,L"data.series.numerator.count");
    Sum = CkJsonObjectW_IntOf(jResp,L"data.series.numerator.sum");
    DenominatorCount = CkJsonObjectW_IntOf(jResp,L"data.series.denominator.count");
    DenominatorSum = CkJsonObjectW_IntOf(jResp,L"data.series.denominator.sum");
    Message = CkJsonObjectW_stringOf(jResp,L"data.series.message");
    Target = CkJsonObjectW_IntOf(jResp,L"data.thresholds.my_service.target");
    Timeframe = CkJsonObjectW_stringOf(jResp,L"data.thresholds.my_service.timeframe");
    To_ts = CkJsonObjectW_IntOf(jResp,L"data.to_ts");
    v_Type = CkJsonObjectW_stringOf(jResp,L"data.type");
    Type_id = CkJsonObjectW_IntOf(jResp,L"data.type_id");
    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"data.group_by");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"data.group_by[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"data.groups");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        error_budget_remaining7d = CkJsonObjectW_IntOf(jResp,L"data.groups[i].error_budget_remaining.7d");
        group = CkJsonObjectW_stringOf(jResp,L"data.groups[i].group");
        monitor_modified = CkJsonObjectW_IntOf(jResp,L"data.groups[i].monitor_modified");
        monitor_type = CkJsonObjectW_stringOf(jResp,L"data.groups[i].monitor_type");
        name = CkJsonObjectW_stringOf(jResp,L"data.groups[i].name");
        precision = CkJsonObjectW_IntOf(jResp,L"data.groups[i].precision");
        preview = CkJsonObjectW_BoolOf(jResp,L"data.groups[i].preview");
        sli_value = CkJsonObjectW_stringOf(jResp,L"data.groups[i].sli_value");
        span_precision = CkJsonObjectW_IntOf(jResp,L"data.groups[i].span_precision");
        uptime = CkJsonObjectW_stringOf(jResp,L"data.groups[i].uptime");
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"data.groups[i].errors");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            error_type = CkJsonObjectW_stringOf(jResp,L"data.groups[i].errors[j].error_type");
            error_message = CkJsonObjectW_stringOf(jResp,L"data.groups[i].errors[j].error_message");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"data.groups[i].history");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            k = 0;
            count_k = CkJsonObjectW_SizeOfArray(jResp,L"data.groups[i].history[j]");
            while (k < count_k) {
                CkJsonObjectW_putK(jResp,k);
                intVal = CkJsonObjectW_IntOf(jResp,L"data.groups[i].history[j][k]");
                k = k + 1;
            }

            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"data.monitors");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        error_budget_remaining7d = CkJsonObjectW_IntOf(jResp,L"data.monitors[i].error_budget_remaining.7d");
        group = CkJsonObjectW_stringOf(jResp,L"data.monitors[i].group");
        monitor_modified = CkJsonObjectW_IntOf(jResp,L"data.monitors[i].monitor_modified");
        monitor_type = CkJsonObjectW_stringOf(jResp,L"data.monitors[i].monitor_type");
        name = CkJsonObjectW_stringOf(jResp,L"data.monitors[i].name");
        precision = CkJsonObjectW_IntOf(jResp,L"data.monitors[i].precision");
        preview = CkJsonObjectW_BoolOf(jResp,L"data.monitors[i].preview");
        sli_value = CkJsonObjectW_stringOf(jResp,L"data.monitors[i].sli_value");
        span_precision = CkJsonObjectW_IntOf(jResp,L"data.monitors[i].span_precision");
        uptime = CkJsonObjectW_stringOf(jResp,L"data.monitors[i].uptime");
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"data.monitors[i].errors");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            error_type = CkJsonObjectW_stringOf(jResp,L"data.monitors[i].errors[j].error_type");
            error_message = CkJsonObjectW_stringOf(jResp,L"data.monitors[i].errors[j].error_message");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"data.monitors[i].history");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            k = 0;
            count_k = CkJsonObjectW_SizeOfArray(jResp,L"data.monitors[i].history[j]");
            while (k < count_k) {
                CkJsonObjectW_putK(jResp,k);
                intVal = CkJsonObjectW_IntOf(jResp,L"data.monitors[i].history[j][k]");
                k = k + 1;
            }

            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"data.overall.errors");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        error_type = CkJsonObjectW_stringOf(jResp,L"data.overall.errors[i].error_type");
        error_message = CkJsonObjectW_stringOf(jResp,L"data.overall.errors[i].error_message");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"data.overall.history");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"data.overall.history[i]");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            intVal = CkJsonObjectW_IntOf(jResp,L"data.overall.history[i][j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"data.series.times");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        i = i + 1;
    }

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



    CkHttpW_Dispose(http);
    CkJsonObjectW_Dispose(queryParams);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }

Curl Command

curl -G -d "from_ts=-62147425"
	-d "to_ts=-62147425"
	-d "target=49.34019051965387"
	-d "apply_correction=true"
	-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/slo/:slo_id/history

Postman Collection Item JSON

{
  "name": "Get an SLO's history",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v1/slo/:slo_id/history?from_ts=-62147425&to_ts=-62147425&target=49.34019051965387&apply_correction=true",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "slo",
        ":slo_id",
        "history"
      ],
      "query": [
        {
          "key": "from_ts",
          "value": "-62147425",
          "description": "(Required) The `from` timestamp for the query window in epoch seconds."
        },
        {
          "key": "to_ts",
          "value": "-62147425",
          "description": "(Required) The `to` timestamp for the query window in epoch seconds."
        },
        {
          "key": "target",
          "value": "49.34019051965387",
          "description": "The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`."
        },
        {
          "key": "apply_correction",
          "value": "true",
          "description": "Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`,\nthen the corrections will not be applied and the SLI values will not be affected."
        }
      ],
      "variable": [
        {
          "key": "slo_id",
          "value": "tempor Ut sed velit"
        }
      ]
    },
    "description": "Get a specific SLO’s history, regardless of its SLO type.\n\nThe detailed history data is structured according to the source data type.\nFor example, metric data is included for event SLOs that use\nthe metric source, and monitor SLO types include the monitor transition history.\n\n**Note:** There are different response formats for event based and time based SLOs.\nExamples of both are shown."
  },
  "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/slo/:slo_id/history?from_ts=-62147425&to_ts=-62147425&target=49.34019051965387&apply_correction=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "slo",
            ":slo_id",
            "history"
          ],
          "query": [
            {
              "key": "from_ts",
              "value": "-62147425",
              "description": "(Required) The `from` timestamp for the query window in epoch seconds."
            },
            {
              "key": "to_ts",
              "value": "-62147425",
              "description": "(Required) The `to` timestamp for the query window in epoch seconds."
            },
            {
              "key": "target",
              "value": "49.34019051965387",
              "description": "The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`."
            },
            {
              "key": "apply_correction",
              "value": "true",
              "description": "Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`,\nthen the corrections will not be applied and the SLI values will not be affected."
            }
          ],
          "variable": [
            {
              "key": "slo_id"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"data\": {\n    \"from_ts\": 1615323990,\n    \"group_by\": [\n      \"aliqua pariatur\",\n      \"labor\"\n    ],\n    \"groups\": [\n      {\n        \"error_budget_remaining\": {\n          \"7d\": 100\n        },\n        \"errors\": [\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          },\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          }\n        ],\n        \"group\": \"name\",\n        \"history\": [\n          [\n            1579212382,\n            0\n          ]\n        ],\n        \"monitor_modified\": 1615867200,\n        \"monitor_type\": \"string\",\n        \"name\": \"string\",\n        \"precision\": 2,\n        \"preview\": true,\n        \"sli_value\": 99.99,\n        \"span_precision\": 2,\n        \"uptime\": 99.99\n      },\n      {\n        \"error_budget_remaining\": {\n          \"7d\": 100\n        },\n        \"errors\": [\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          },\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          }\n        ],\n        \"group\": \"name\",\n        \"history\": [\n          [\n            1579212382,\n            0\n          ]\n        ],\n        \"monitor_modified\": 1615867200,\n        \"monitor_type\": \"string\",\n        \"name\": \"string\",\n        \"precision\": 2,\n        \"preview\": true,\n        \"sli_value\": 99.99,\n        \"span_precision\": 2,\n        \"uptime\": 99.99\n      }\n    ],\n    \"monitors\": [\n      {\n        \"error_budget_remaining\": {\n          \"7d\": 100\n        },\n        \"errors\": [\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          },\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          }\n        ],\n        \"group\": \"name\",\n        \"history\": [\n          [\n            1579212382,\n            0\n          ]\n        ],\n        \"monitor_modified\": 1615867200,\n        \"monitor_type\": \"string\",\n        \"name\": \"string\",\n        \"precision\": 2,\n        \"preview\": true,\n        \"sli_value\": 99.99,\n        \"span_precision\": 2,\n        \"uptime\": 99.99\n      },\n      {\n        \"error_budget_remaining\": {\n          \"7d\": 100\n        },\n        \"errors\": [\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          },\n          {\n            \"error_type\": \"\",\n            \"error_message\": \"\"\n          }\n        ],\n        \"group\": \"name\",\n        \"history\": [\n          [\n            1579212382,\n            0\n          ]\n        ],\n        \"monitor_modified\": 1615867200,\n        \"monitor_type\": \"string\",\n        \"name\": \"string\",\n        \"precision\": 2,\n        \"preview\": true,\n        \"sli_value\": 99.99,\n        \"span_precision\": 2,\n        \"uptime\": 99.99\n      }\n    ],\n    \"overall\": {\n      \"error_budget_remaining\": {\n        \"7d\": 100\n      },\n      \"errors\": [\n        {\n          \"error_type\": \"\",\n          \"error_message\": \"\"\n        },\n        {\n          \"error_type\": \"\",\n          \"error_message\": \"\"\n        }\n      ],\n      \"group\": \"name\",\n      \"history\": [\n        [\n          1579212382,\n          0\n        ]\n      ],\n      \"monitor_modified\": 1615867200,\n      \"monitor_type\": \"string\",\n      \"name\": \"string\",\n      \"precision\": {\n        \"30d\": 1,\n        \"7d\": 2\n      },\n      \"preview\": true,\n      \"sli_value\": 99.99,\n      \"span_precision\": 2,\n      \"uptime\": 99.99\n    },\n    \"series\": {\n      \"res_type\": \"\",\n      \"interval\": 0,\n      \"resp_version\": 0,\n      \"query\": \"\",\n      \"times\": [],\n      \"numerator\": {\n        \"count\": 0,\n        \"sum\": 0,\n        \"metadata\": {}\n      },\n      \"denominator\": {\n        \"count\": 0,\n        \"sum\": 0,\n        \"metadata\": {}\n      },\n      \"message\": \"\"\n    },\n    \"thresholds\": {\n      \"my_service\": {\n        \"target\": 95,\n        \"timeframe\": \"7d\"\n      }\n    },\n    \"to_ts\": 1615928790,\n    \"type\": \"metric\",\n    \"type_id\": 0\n  },\n  \"errors\": [\n    {\n      \"error\": \"ullamco pariatur\"\n    },\n    {\n      \"error\": \"aliquip anim do laborum commodo\"\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/v1/slo/:slo_id/history?from_ts=-62147425&to_ts=-62147425&target=49.34019051965387&apply_correction=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "slo",
            ":slo_id",
            "history"
          ],
          "query": [
            {
              "key": "from_ts",
              "value": "-62147425",
              "description": "(Required) The `from` timestamp for the query window in epoch seconds."
            },
            {
              "key": "to_ts",
              "value": "-62147425",
              "description": "(Required) The `to` timestamp for the query window in epoch seconds."
            },
            {
              "key": "target",
              "value": "49.34019051965387",
              "description": "The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`."
            },
            {
              "key": "apply_correction",
              "value": "true",
              "description": "Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`,\nthen the corrections will not be applied and the SLI values will not be affected."
            }
          ],
          "variable": [
            {
              "key": "slo_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": "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/slo/:slo_id/history?from_ts=-62147425&to_ts=-62147425&target=49.34019051965387&apply_correction=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "slo",
            ":slo_id",
            "history"
          ],
          "query": [
            {
              "key": "from_ts",
              "value": "-62147425",
              "description": "(Required) The `from` timestamp for the query window in epoch seconds."
            },
            {
              "key": "to_ts",
              "value": "-62147425",
              "description": "(Required) The `to` timestamp for the query window in epoch seconds."
            },
            {
              "key": "target",
              "value": "49.34019051965387",
              "description": "The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`."
            },
            {
              "key": "apply_correction",
              "value": "true",
              "description": "Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`,\nthen the corrections will not be applied and the SLI values will not be affected."
            }
          ],
          "variable": [
            {
              "key": "slo_id"
            }
          ]
        }
      },
      "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": "Not Found",
      "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/slo/:slo_id/history?from_ts=-62147425&to_ts=-62147425&target=49.34019051965387&apply_correction=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "slo",
            ":slo_id",
            "history"
          ],
          "query": [
            {
              "key": "from_ts",
              "value": "-62147425",
              "description": "(Required) The `from` timestamp for the query window in epoch seconds."
            },
            {
              "key": "to_ts",
              "value": "-62147425",
              "description": "(Required) The `to` timestamp for the query window in epoch seconds."
            },
            {
              "key": "target",
              "value": "49.34019051965387",
              "description": "The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`."
            },
            {
              "key": "apply_correction",
              "value": "true",
              "description": "Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`,\nthen the corrections will not be applied and the SLI values will not be affected."
            }
          ],
          "variable": [
            {
              "key": "slo_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": "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/slo/:slo_id/history?from_ts=-62147425&to_ts=-62147425&target=49.34019051965387&apply_correction=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "slo",
            ":slo_id",
            "history"
          ],
          "query": [
            {
              "key": "from_ts",
              "value": "-62147425",
              "description": "(Required) The `from` timestamp for the query window in epoch seconds."
            },
            {
              "key": "to_ts",
              "value": "-62147425",
              "description": "(Required) The `to` timestamp for the query window in epoch seconds."
            },
            {
              "key": "target",
              "value": "49.34019051965387",
              "description": "The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`."
            },
            {
              "key": "apply_correction",
              "value": "true",
              "description": "Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`,\nthen the corrections will not be applied and the SLI values will not be affected."
            }
          ],
          "variable": [
            {
              "key": "slo_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}"
    }
  ]
}