Chilkat Online Tools

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

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loQueryParams
LOCAL loResp
LOCAL loSbResponseBody
LOCAL loJResp
LOCAL lnRespStatusCode
LOCAL lcStrVal
LOCAL lnError_budget_remaining7d
LOCAL lcGroup
LOCAL lnMonitor_modified
LOCAL lcMonitor_type
LOCAL lcName
LOCAL lnPrecision
LOCAL lnPreview
LOCAL lcSli_value
LOCAL lnSpan_precision
LOCAL lcUptime
LOCAL j
LOCAL lnCount_j
LOCAL lcError_type
LOCAL lcError_message
LOCAL k
LOCAL lnCount_k
LOCAL lnIntVal
LOCAL lcError
LOCAL lnFrom_ts
LOCAL lnV_7d
LOCAL lcGroup
LOCAL lnMonitor_modified
LOCAL lcMonitor_type
LOCAL lcName
LOCAL lnV_30d
LOCAL lnPrecision7d
LOCAL lnPreview
LOCAL lcSli_value
LOCAL lnSpan_precision
LOCAL lcUptime
LOCAL lcRes_type
LOCAL lnInterval
LOCAL lnResp_version
LOCAL lcQuery
LOCAL lnCount
LOCAL lnSum
LOCAL lnDenominatorCount
LOCAL lnDenominatorSum
LOCAL lcMessage
LOCAL lnTarget
LOCAL lcTimeframe
LOCAL lnTo_ts
LOCAL lcV_Type
LOCAL lnType_id
LOCAL i
LOCAL lnCount_i

* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.

loHttp = CreateObject('Chilkat_9_5_0.Http')

loQueryParams = CreateObject('Chilkat_9_5_0.JsonObject')
loQueryParams.UpdateInt("from_ts",-62147425)
loQueryParams.UpdateInt("to_ts",-62147425)
loQueryParams.UpdateString("target","49.34019051965387")
loQueryParams.UpdateString("apply_correction","true")

loHttp.SetRequestHeader("Accept","application/json")

loResp = loHttp.QuickRequestParams("GET","https://api.app.ddog-gov.com/api/v1/slo/:slo_id/history",loQueryParams)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loQueryParams
    CANCEL
ENDIF

loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
loResp.GetBodySb(loSbResponseBody)

loJResp = CreateObject('Chilkat_9_5_0.JsonObject')
loJResp.LoadSb(loSbResponseBody)
loJResp.EmitCompact = 0

? "Response Body:"
? loJResp.Emit()

lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode >= 400) THEN
    ? "Response Header:"
    ? loResp.Header
    ? "Failed."
    RELEASE loResp
    RELEASE loHttp
    RELEASE loQueryParams
    RELEASE loSbResponseBody
    RELEASE loJResp
    CANCEL
ENDIF

RELEASE loResp

* 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

lnFrom_ts = loJResp.IntOf("data.from_ts")
lnV_7d = loJResp.IntOf("data.overall.error_budget_remaining.7d")
lcGroup = loJResp.StringOf("data.overall.group")
lnMonitor_modified = loJResp.IntOf("data.overall.monitor_modified")
lcMonitor_type = loJResp.StringOf("data.overall.monitor_type")
lcName = loJResp.StringOf("data.overall.name")
lnV_30d = loJResp.IntOf("data.overall.precision.30d")
lnPrecision7d = loJResp.IntOf("data.overall.precision.7d")
lnPreview = loJResp.BoolOf("data.overall.preview")
lcSli_value = loJResp.StringOf("data.overall.sli_value")
lnSpan_precision = loJResp.IntOf("data.overall.span_precision")
lcUptime = loJResp.StringOf("data.overall.uptime")
lcRes_type = loJResp.StringOf("data.series.res_type")
lnInterval = loJResp.IntOf("data.series.interval")
lnResp_version = loJResp.IntOf("data.series.resp_version")
lcQuery = loJResp.StringOf("data.series.query")
lnCount = loJResp.IntOf("data.series.numerator.count")
lnSum = loJResp.IntOf("data.series.numerator.sum")
lnDenominatorCount = loJResp.IntOf("data.series.denominator.count")
lnDenominatorSum = loJResp.IntOf("data.series.denominator.sum")
lcMessage = loJResp.StringOf("data.series.message")
lnTarget = loJResp.IntOf("data.thresholds.my_service.target")
lcTimeframe = loJResp.StringOf("data.thresholds.my_service.timeframe")
lnTo_ts = loJResp.IntOf("data.to_ts")
lcV_Type = loJResp.StringOf("data.type")
lnType_id = loJResp.IntOf("data.type_id")
i = 0
lnCount_i = loJResp.SizeOfArray("data.group_by")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStrVal = loJResp.StringOf("data.group_by[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("data.groups")
DO WHILE i < lnCount_i
    loJResp.I = i
    lnError_budget_remaining7d = loJResp.IntOf("data.groups[i].error_budget_remaining.7d")
    lcGroup = loJResp.StringOf("data.groups[i].group")
    lnMonitor_modified = loJResp.IntOf("data.groups[i].monitor_modified")
    lcMonitor_type = loJResp.StringOf("data.groups[i].monitor_type")
    lcName = loJResp.StringOf("data.groups[i].name")
    lnPrecision = loJResp.IntOf("data.groups[i].precision")
    lnPreview = loJResp.BoolOf("data.groups[i].preview")
    lcSli_value = loJResp.StringOf("data.groups[i].sli_value")
    lnSpan_precision = loJResp.IntOf("data.groups[i].span_precision")
    lcUptime = loJResp.StringOf("data.groups[i].uptime")
    j = 0
    lnCount_j = loJResp.SizeOfArray("data.groups[i].errors")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcError_type = loJResp.StringOf("data.groups[i].errors[j].error_type")
        lcError_message = loJResp.StringOf("data.groups[i].errors[j].error_message")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("data.groups[i].history")
    DO WHILE j < lnCount_j
        loJResp.J = j
        k = 0
        lnCount_k = loJResp.SizeOfArray("data.groups[i].history[j]")
        DO WHILE k < lnCount_k
            loJResp.K = k
            lnIntVal = loJResp.IntOf("data.groups[i].history[j][k]")
            k = k + 1
        ENDDO
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("data.monitors")
DO WHILE i < lnCount_i
    loJResp.I = i
    lnError_budget_remaining7d = loJResp.IntOf("data.monitors[i].error_budget_remaining.7d")
    lcGroup = loJResp.StringOf("data.monitors[i].group")
    lnMonitor_modified = loJResp.IntOf("data.monitors[i].monitor_modified")
    lcMonitor_type = loJResp.StringOf("data.monitors[i].monitor_type")
    lcName = loJResp.StringOf("data.monitors[i].name")
    lnPrecision = loJResp.IntOf("data.monitors[i].precision")
    lnPreview = loJResp.BoolOf("data.monitors[i].preview")
    lcSli_value = loJResp.StringOf("data.monitors[i].sli_value")
    lnSpan_precision = loJResp.IntOf("data.monitors[i].span_precision")
    lcUptime = loJResp.StringOf("data.monitors[i].uptime")
    j = 0
    lnCount_j = loJResp.SizeOfArray("data.monitors[i].errors")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcError_type = loJResp.StringOf("data.monitors[i].errors[j].error_type")
        lcError_message = loJResp.StringOf("data.monitors[i].errors[j].error_message")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("data.monitors[i].history")
    DO WHILE j < lnCount_j
        loJResp.J = j
        k = 0
        lnCount_k = loJResp.SizeOfArray("data.monitors[i].history[j]")
        DO WHILE k < lnCount_k
            loJResp.K = k
            lnIntVal = loJResp.IntOf("data.monitors[i].history[j][k]")
            k = k + 1
        ENDDO
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("data.overall.errors")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcError_type = loJResp.StringOf("data.overall.errors[i].error_type")
    lcError_message = loJResp.StringOf("data.overall.errors[i].error_message")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("data.overall.history")
DO WHILE i < lnCount_i
    loJResp.I = i
    j = 0
    lnCount_j = loJResp.SizeOfArray("data.overall.history[i]")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lnIntVal = loJResp.IntOf("data.overall.history[i][j]")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("data.series.times")
DO WHILE i < lnCount_i
    loJResp.I = i
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("errors")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcError = loJResp.StringOf("errors[i].error")
    i = i + 1
ENDDO

RELEASE loHttp
RELEASE loQueryParams
RELEASE loSbResponseBody
RELEASE loJResp

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