Chilkat Online Tools

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

Back to Collection Items

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

    let http = CkoHttp()!
    var success: Bool

    let queryParams = CkoJsonObject()!
    queryParams.updateInt("from_ts", value: -62147425)
    queryParams.updateInt("to_ts", value: -62147425)
    queryParams.update("target", value: "49.34019051965387")
    queryParams.update("apply_correction", value: "true")

    http.setRequestHeader("Accept", value: "application/json")

    var resp: CkoHttpResponse? = http.quickRequestParams("GET", url: "https://api.app.ddog-gov.com/api/v1/slo/:slo_id/history", json: queryParams)
    if http.lastMethodSuccess == false {
        print("\(http.lastErrorText!)")
        return
    }

    let sbResponseBody = CkoStringBuilder()!
    resp!.getBodySb(sbResponseBody)

    let jResp = CkoJsonObject()!
    jResp.loadSb(sbResponseBody)
    jResp.emitCompact = false

    print("Response Body:")
    print("\(jResp.emit()!)")

    var respStatusCode: Int = resp!.statusCode.intValue
    print("Response Status Code = \(respStatusCode)")
    if respStatusCode >= 400 {
        print("Response Header:")
        print("\(resp!.header!)")
        print("Failed.")
        resp = nil
        return
    }

    resp = nil

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

    var strVal: String?
    var error_budget_remaining7d: Int
    var group: String?
    var monitor_modified: Int
    var monitor_type: String?
    var name: String?
    var precision: Int
    var preview: Bool
    var sli_value: String?
    var span_precision: Int
    var uptime: String?
    var j: Int
    var count_j: Int
    var error_type: String?
    var error_message: String?
    var k: Int
    var count_k: Int
    var intVal: Int
    var error: String?

    var From_ts: Int = jResp.int(of: "data.from_ts").intValue
    var v_7d: Int = jResp.int(of: "data.overall.error_budget_remaining.7d").intValue
    var Group: String? = jResp.string(of: "data.overall.group")
    var Monitor_modified: Int = jResp.int(of: "data.overall.monitor_modified").intValue
    var Monitor_type: String? = jResp.string(of: "data.overall.monitor_type")
    var Name: String? = jResp.string(of: "data.overall.name")
    var v_30d: Int = jResp.int(of: "data.overall.precision.30d").intValue
    var Precision7d: Int = jResp.int(of: "data.overall.precision.7d").intValue
    var Preview: Bool = jResp.bool(of: "data.overall.preview")
    var Sli_value: String? = jResp.string(of: "data.overall.sli_value")
    var Span_precision: Int = jResp.int(of: "data.overall.span_precision").intValue
    var Uptime: String? = jResp.string(of: "data.overall.uptime")
    var Res_type: String? = jResp.string(of: "data.series.res_type")
    var Interval: Int = jResp.int(of: "data.series.interval").intValue
    var Resp_version: Int = jResp.int(of: "data.series.resp_version").intValue
    var Query: String? = jResp.string(of: "data.series.query")
    var Count: Int = jResp.int(of: "data.series.numerator.count").intValue
    var Sum: Int = jResp.int(of: "data.series.numerator.sum").intValue
    var DenominatorCount: Int = jResp.int(of: "data.series.denominator.count").intValue
    var DenominatorSum: Int = jResp.int(of: "data.series.denominator.sum").intValue
    var Message: String? = jResp.string(of: "data.series.message")
    var Target: Int = jResp.int(of: "data.thresholds.my_service.target").intValue
    var Timeframe: String? = jResp.string(of: "data.thresholds.my_service.timeframe")
    var To_ts: Int = jResp.int(of: "data.to_ts").intValue
    var v_Type: String? = jResp.string(of: "data.type")
    var Type_id: Int = jResp.int(of: "data.type_id").intValue
    var i: Int = 0
    var count_i: Int = jResp.size(ofArray: "data.group_by").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "data.group_by[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "data.groups").intValue
    while i < count_i {
        jResp.i = i
        error_budget_remaining7d = jResp.int(of: "data.groups[i].error_budget_remaining.7d").intValue
        group = jResp.string(of: "data.groups[i].group")
        monitor_modified = jResp.int(of: "data.groups[i].monitor_modified").intValue
        monitor_type = jResp.string(of: "data.groups[i].monitor_type")
        name = jResp.string(of: "data.groups[i].name")
        precision = jResp.int(of: "data.groups[i].precision").intValue
        preview = jResp.bool(of: "data.groups[i].preview")
        sli_value = jResp.string(of: "data.groups[i].sli_value")
        span_precision = jResp.int(of: "data.groups[i].span_precision").intValue
        uptime = jResp.string(of: "data.groups[i].uptime")
        j = 0
        count_j = jResp.size(ofArray: "data.groups[i].errors").intValue
        while j < count_j {
            jResp.j = j
            error_type = jResp.string(of: "data.groups[i].errors[j].error_type")
            error_message = jResp.string(of: "data.groups[i].errors[j].error_message")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "data.groups[i].history").intValue
        while j < count_j {
            jResp.j = j
            k = 0
            count_k = jResp.size(ofArray: "data.groups[i].history[j]").intValue
            while k < count_k {
                jResp.k = k
                intVal = jResp.int(of: "data.groups[i].history[j][k]").intValue
                k = k + 1
            }

            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "data.monitors").intValue
    while i < count_i {
        jResp.i = i
        error_budget_remaining7d = jResp.int(of: "data.monitors[i].error_budget_remaining.7d").intValue
        group = jResp.string(of: "data.monitors[i].group")
        monitor_modified = jResp.int(of: "data.monitors[i].monitor_modified").intValue
        monitor_type = jResp.string(of: "data.monitors[i].monitor_type")
        name = jResp.string(of: "data.monitors[i].name")
        precision = jResp.int(of: "data.monitors[i].precision").intValue
        preview = jResp.bool(of: "data.monitors[i].preview")
        sli_value = jResp.string(of: "data.monitors[i].sli_value")
        span_precision = jResp.int(of: "data.monitors[i].span_precision").intValue
        uptime = jResp.string(of: "data.monitors[i].uptime")
        j = 0
        count_j = jResp.size(ofArray: "data.monitors[i].errors").intValue
        while j < count_j {
            jResp.j = j
            error_type = jResp.string(of: "data.monitors[i].errors[j].error_type")
            error_message = jResp.string(of: "data.monitors[i].errors[j].error_message")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "data.monitors[i].history").intValue
        while j < count_j {
            jResp.j = j
            k = 0
            count_k = jResp.size(ofArray: "data.monitors[i].history[j]").intValue
            while k < count_k {
                jResp.k = k
                intVal = jResp.int(of: "data.monitors[i].history[j][k]").intValue
                k = k + 1
            }

            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "data.overall.errors").intValue
    while i < count_i {
        jResp.i = i
        error_type = jResp.string(of: "data.overall.errors[i].error_type")
        error_message = jResp.string(of: "data.overall.errors[i].error_message")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "data.overall.history").intValue
    while i < count_i {
        jResp.i = i
        j = 0
        count_j = jResp.size(ofArray: "data.overall.history[i]").intValue
        while j < count_j {
            jResp.j = j
            intVal = jResp.int(of: "data.overall.history[i][j]").intValue
            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "data.series.times").intValue
    while i < count_i {
        jResp.i = i
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "errors").intValue
    while i < count_i {
        jResp.i = i
        error = jResp.string(of: "errors[i].error")
        i = i + 1
    }


}

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}"
    }
  ]
}