Chilkat Online Tools

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

Back to Collection Items

load ./chilkat.dll

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

set http [new_CkHttp]

set queryParams [new_CkJsonObject]

CkJsonObject_UpdateInt $queryParams "from_ts" -62147425
CkJsonObject_UpdateInt $queryParams "to_ts" -62147425
CkJsonObject_UpdateString $queryParams "target" "49.34019051965387"
CkJsonObject_UpdateString $queryParams "apply_correction" "true"

CkHttp_SetRequestHeader $http "Accept" "application/json"

# resp is a CkHttpResponse
set resp [CkHttp_QuickRequestParams $http "GET" "https://api.app.ddog-gov.com/api/v1/slo/:slo_id/history" $queryParams]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkJsonObject $queryParams
    exit
}

set sbResponseBody [new_CkStringBuilder]

CkHttpResponse_GetBodySb $resp $sbResponseBody

set jResp [new_CkJsonObject]

CkJsonObject_LoadSb $jResp $sbResponseBody
CkJsonObject_put_EmitCompact $jResp 0

puts "Response Body:"
puts [CkJsonObject_emit $jResp]

set respStatusCode [CkHttpResponse_get_StatusCode $resp]
puts "Response Status Code = $respStatusCode"
if {$respStatusCode >= 400} then {
    puts "Response Header:"
    puts [CkHttpResponse_header $resp]
    puts "Failed."
    delete_CkHttpResponse $resp

    delete_CkHttp $http
    delete_CkJsonObject $queryParams
    delete_CkStringBuilder $sbResponseBody
    delete_CkJsonObject $jResp
    exit
}

delete_CkHttpResponse $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

set From_ts [CkJsonObject_IntOf $jResp "data.from_ts"]
set v_7d [CkJsonObject_IntOf $jResp "data.overall.error_budget_remaining.7d"]
set Group [CkJsonObject_stringOf $jResp "data.overall.group"]
set Monitor_modified [CkJsonObject_IntOf $jResp "data.overall.monitor_modified"]
set Monitor_type [CkJsonObject_stringOf $jResp "data.overall.monitor_type"]
set Name [CkJsonObject_stringOf $jResp "data.overall.name"]
set v_30d [CkJsonObject_IntOf $jResp "data.overall.precision.30d"]
set Precision7d [CkJsonObject_IntOf $jResp "data.overall.precision.7d"]
set Preview [CkJsonObject_BoolOf $jResp "data.overall.preview"]
set Sli_value [CkJsonObject_stringOf $jResp "data.overall.sli_value"]
set Span_precision [CkJsonObject_IntOf $jResp "data.overall.span_precision"]
set Uptime [CkJsonObject_stringOf $jResp "data.overall.uptime"]
set Res_type [CkJsonObject_stringOf $jResp "data.series.res_type"]
set Interval [CkJsonObject_IntOf $jResp "data.series.interval"]
set Resp_version [CkJsonObject_IntOf $jResp "data.series.resp_version"]
set Query [CkJsonObject_stringOf $jResp "data.series.query"]
set Count [CkJsonObject_IntOf $jResp "data.series.numerator.count"]
set Sum [CkJsonObject_IntOf $jResp "data.series.numerator.sum"]
set DenominatorCount [CkJsonObject_IntOf $jResp "data.series.denominator.count"]
set DenominatorSum [CkJsonObject_IntOf $jResp "data.series.denominator.sum"]
set Message [CkJsonObject_stringOf $jResp "data.series.message"]
set Target [CkJsonObject_IntOf $jResp "data.thresholds.my_service.target"]
set Timeframe [CkJsonObject_stringOf $jResp "data.thresholds.my_service.timeframe"]
set To_ts [CkJsonObject_IntOf $jResp "data.to_ts"]
set v_Type [CkJsonObject_stringOf $jResp "data.type"]
set Type_id [CkJsonObject_IntOf $jResp "data.type_id"]
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "data.group_by"]
while {$i < $count_i} {
    CkJsonObject_put_I $jResp $i
    set strVal [CkJsonObject_stringOf $jResp "data.group_by[i]"]
    set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "data.groups"]
while {$i < $count_i} {
    CkJsonObject_put_I $jResp $i
    set error_budget_remaining7d [CkJsonObject_IntOf $jResp "data.groups[i].error_budget_remaining.7d"]
    set group [CkJsonObject_stringOf $jResp "data.groups[i].group"]
    set monitor_modified [CkJsonObject_IntOf $jResp "data.groups[i].monitor_modified"]
    set monitor_type [CkJsonObject_stringOf $jResp "data.groups[i].monitor_type"]
    set name [CkJsonObject_stringOf $jResp "data.groups[i].name"]
    set precision [CkJsonObject_IntOf $jResp "data.groups[i].precision"]
    set preview [CkJsonObject_BoolOf $jResp "data.groups[i].preview"]
    set sli_value [CkJsonObject_stringOf $jResp "data.groups[i].sli_value"]
    set span_precision [CkJsonObject_IntOf $jResp "data.groups[i].span_precision"]
    set uptime [CkJsonObject_stringOf $jResp "data.groups[i].uptime"]
    set j 0
    set count_j [CkJsonObject_SizeOfArray $jResp "data.groups[i].errors"]
    while {$j < $count_j} {
        CkJsonObject_put_J $jResp $j
        set error_type [CkJsonObject_stringOf $jResp "data.groups[i].errors[j].error_type"]
        set error_message [CkJsonObject_stringOf $jResp "data.groups[i].errors[j].error_message"]
        set j [expr $j + 1]
    }
    set j 0
    set count_j [CkJsonObject_SizeOfArray $jResp "data.groups[i].history"]
    while {$j < $count_j} {
        CkJsonObject_put_J $jResp $j
        set k 0
        set count_k [CkJsonObject_SizeOfArray $jResp "data.groups[i].history[j]"]
        while {$k < $count_k} {
            CkJsonObject_put_K $jResp $k
            set intVal [CkJsonObject_IntOf $jResp "data.groups[i].history[j][k]"]
            set k [expr $k + 1]
        }
        set j [expr $j + 1]
    }
    set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "data.monitors"]
while {$i < $count_i} {
    CkJsonObject_put_I $jResp $i
    set error_budget_remaining7d [CkJsonObject_IntOf $jResp "data.monitors[i].error_budget_remaining.7d"]
    set group [CkJsonObject_stringOf $jResp "data.monitors[i].group"]
    set monitor_modified [CkJsonObject_IntOf $jResp "data.monitors[i].monitor_modified"]
    set monitor_type [CkJsonObject_stringOf $jResp "data.monitors[i].monitor_type"]
    set name [CkJsonObject_stringOf $jResp "data.monitors[i].name"]
    set precision [CkJsonObject_IntOf $jResp "data.monitors[i].precision"]
    set preview [CkJsonObject_BoolOf $jResp "data.monitors[i].preview"]
    set sli_value [CkJsonObject_stringOf $jResp "data.monitors[i].sli_value"]
    set span_precision [CkJsonObject_IntOf $jResp "data.monitors[i].span_precision"]
    set uptime [CkJsonObject_stringOf $jResp "data.monitors[i].uptime"]
    set j 0
    set count_j [CkJsonObject_SizeOfArray $jResp "data.monitors[i].errors"]
    while {$j < $count_j} {
        CkJsonObject_put_J $jResp $j
        set error_type [CkJsonObject_stringOf $jResp "data.monitors[i].errors[j].error_type"]
        set error_message [CkJsonObject_stringOf $jResp "data.monitors[i].errors[j].error_message"]
        set j [expr $j + 1]
    }
    set j 0
    set count_j [CkJsonObject_SizeOfArray $jResp "data.monitors[i].history"]
    while {$j < $count_j} {
        CkJsonObject_put_J $jResp $j
        set k 0
        set count_k [CkJsonObject_SizeOfArray $jResp "data.monitors[i].history[j]"]
        while {$k < $count_k} {
            CkJsonObject_put_K $jResp $k
            set intVal [CkJsonObject_IntOf $jResp "data.monitors[i].history[j][k]"]
            set k [expr $k + 1]
        }
        set j [expr $j + 1]
    }
    set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "data.overall.errors"]
while {$i < $count_i} {
    CkJsonObject_put_I $jResp $i
    set error_type [CkJsonObject_stringOf $jResp "data.overall.errors[i].error_type"]
    set error_message [CkJsonObject_stringOf $jResp "data.overall.errors[i].error_message"]
    set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "data.overall.history"]
while {$i < $count_i} {
    CkJsonObject_put_I $jResp $i
    set j 0
    set count_j [CkJsonObject_SizeOfArray $jResp "data.overall.history[i]"]
    while {$j < $count_j} {
        CkJsonObject_put_J $jResp $j
        set intVal [CkJsonObject_IntOf $jResp "data.overall.history[i][j]"]
        set j [expr $j + 1]
    }
    set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "data.series.times"]
while {$i < $count_i} {
    CkJsonObject_put_I $jResp $i
    set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "errors"]
while {$i < $count_i} {
    CkJsonObject_put_I $jResp $i
    set error [CkJsonObject_stringOf $jResp "errors[i].error"]
    set i [expr $i + 1]
}

delete_CkHttp $http
delete_CkJsonObject $queryParams
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $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}"
    }
  ]
}