Chilkat Online Tools

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

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sStrVal
    Integer iError_budget_remaining7d
    String sGroup
    Integer iMonitor_modified
    String sMonitor_type
    String sName
    Integer iPrecision
    Boolean iPreview
    String sSli_value
    Integer iSpan_precision
    String sUptime
    Integer j
    Integer iCount_j
    String sError_type
    String sError_message
    Integer k
    Integer iCount_k
    Integer iIntVal
    String sError
    Integer iFrom_ts
    Integer iV_7d
    String sGroup
    Integer iMonitor_modified
    String sMonitor_type
    String sName
    Integer iV_30d
    Integer iPrecision7d
    Boolean iPreview
    String sSli_value
    Integer iSpan_precision
    String sUptime
    String sRes_type
    Integer iInterval
    Integer iResp_version
    String sQuery
    Integer iCount
    Integer iSum
    Integer iDenominatorCount
    Integer iDenominatorSum
    String sMessage
    Integer iTarget
    String sTimeframe
    Integer iTo_ts
    String sV_Type
    Integer iType_id
    Integer i
    Integer iCount_i
    String sTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateInt Of hoQueryParams "from_ts" -62147425 To iSuccess
    Get ComUpdateInt Of hoQueryParams "to_ts" -62147425 To iSuccess
    Get ComUpdateString Of hoQueryParams "target" "49.34019051965387" To iSuccess
    Get ComUpdateString Of hoQueryParams "apply_correction" "true" To iSuccess

    Send ComSetRequestHeader To hoHttp "Accept" "application/json"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://api.app.ddog-gov.com/api/v1/slo/:slo_id/history" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

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

    Get ComIntOf Of hoJResp "data.from_ts" To iFrom_ts
    Get ComIntOf Of hoJResp "data.overall.error_budget_remaining.7d" To iV_7d
    Get ComStringOf Of hoJResp "data.overall.group" To sGroup
    Get ComIntOf Of hoJResp "data.overall.monitor_modified" To iMonitor_modified
    Get ComStringOf Of hoJResp "data.overall.monitor_type" To sMonitor_type
    Get ComStringOf Of hoJResp "data.overall.name" To sName
    Get ComIntOf Of hoJResp "data.overall.precision.30d" To iV_30d
    Get ComIntOf Of hoJResp "data.overall.precision.7d" To iPrecision7d
    Get ComBoolOf Of hoJResp "data.overall.preview" To iPreview
    Get ComStringOf Of hoJResp "data.overall.sli_value" To sSli_value
    Get ComIntOf Of hoJResp "data.overall.span_precision" To iSpan_precision
    Get ComStringOf Of hoJResp "data.overall.uptime" To sUptime
    Get ComStringOf Of hoJResp "data.series.res_type" To sRes_type
    Get ComIntOf Of hoJResp "data.series.interval" To iInterval
    Get ComIntOf Of hoJResp "data.series.resp_version" To iResp_version
    Get ComStringOf Of hoJResp "data.series.query" To sQuery
    Get ComIntOf Of hoJResp "data.series.numerator.count" To iCount
    Get ComIntOf Of hoJResp "data.series.numerator.sum" To iSum
    Get ComIntOf Of hoJResp "data.series.denominator.count" To iDenominatorCount
    Get ComIntOf Of hoJResp "data.series.denominator.sum" To iDenominatorSum
    Get ComStringOf Of hoJResp "data.series.message" To sMessage
    Get ComIntOf Of hoJResp "data.thresholds.my_service.target" To iTarget
    Get ComStringOf Of hoJResp "data.thresholds.my_service.timeframe" To sTimeframe
    Get ComIntOf Of hoJResp "data.to_ts" To iTo_ts
    Get ComStringOf Of hoJResp "data.type" To sV_Type
    Get ComIntOf Of hoJResp "data.type_id" To iType_id
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data.group_by" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "data.group_by[i]" To sStrVal
        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data.groups" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComIntOf Of hoJResp "data.groups[i].error_budget_remaining.7d" To iError_budget_remaining7d
        Get ComStringOf Of hoJResp "data.groups[i].group" To sGroup
        Get ComIntOf Of hoJResp "data.groups[i].monitor_modified" To iMonitor_modified
        Get ComStringOf Of hoJResp "data.groups[i].monitor_type" To sMonitor_type
        Get ComStringOf Of hoJResp "data.groups[i].name" To sName
        Get ComIntOf Of hoJResp "data.groups[i].precision" To iPrecision
        Get ComBoolOf Of hoJResp "data.groups[i].preview" To iPreview
        Get ComStringOf Of hoJResp "data.groups[i].sli_value" To sSli_value
        Get ComIntOf Of hoJResp "data.groups[i].span_precision" To iSpan_precision
        Get ComStringOf Of hoJResp "data.groups[i].uptime" To sUptime
        Move 0 To j
        Get ComSizeOfArray Of hoJResp "data.groups[i].errors" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "data.groups[i].errors[j].error_type" To sError_type
            Get ComStringOf Of hoJResp "data.groups[i].errors[j].error_message" To sError_message
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "data.groups[i].history" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Move 0 To k
            Get ComSizeOfArray Of hoJResp "data.groups[i].history[j]" To iCount_k
            While (k < iCount_k)
                Set ComK Of hoJResp To k
                Get ComIntOf Of hoJResp "data.groups[i].history[j][k]" To iIntVal
                Move (k + 1) To k
            Loop

            Move (j + 1) To j
        Loop

        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data.monitors" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComIntOf Of hoJResp "data.monitors[i].error_budget_remaining.7d" To iError_budget_remaining7d
        Get ComStringOf Of hoJResp "data.monitors[i].group" To sGroup
        Get ComIntOf Of hoJResp "data.monitors[i].monitor_modified" To iMonitor_modified
        Get ComStringOf Of hoJResp "data.monitors[i].monitor_type" To sMonitor_type
        Get ComStringOf Of hoJResp "data.monitors[i].name" To sName
        Get ComIntOf Of hoJResp "data.monitors[i].precision" To iPrecision
        Get ComBoolOf Of hoJResp "data.monitors[i].preview" To iPreview
        Get ComStringOf Of hoJResp "data.monitors[i].sli_value" To sSli_value
        Get ComIntOf Of hoJResp "data.monitors[i].span_precision" To iSpan_precision
        Get ComStringOf Of hoJResp "data.monitors[i].uptime" To sUptime
        Move 0 To j
        Get ComSizeOfArray Of hoJResp "data.monitors[i].errors" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "data.monitors[i].errors[j].error_type" To sError_type
            Get ComStringOf Of hoJResp "data.monitors[i].errors[j].error_message" To sError_message
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "data.monitors[i].history" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Move 0 To k
            Get ComSizeOfArray Of hoJResp "data.monitors[i].history[j]" To iCount_k
            While (k < iCount_k)
                Set ComK Of hoJResp To k
                Get ComIntOf Of hoJResp "data.monitors[i].history[j][k]" To iIntVal
                Move (k + 1) To k
            Loop

            Move (j + 1) To j
        Loop

        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data.overall.errors" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "data.overall.errors[i].error_type" To sError_type
        Get ComStringOf Of hoJResp "data.overall.errors[i].error_message" To sError_message
        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data.overall.history" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Move 0 To j
        Get ComSizeOfArray Of hoJResp "data.overall.history[i]" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComIntOf Of hoJResp "data.overall.history[i][j]" To iIntVal
            Move (j + 1) To j
        Loop

        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data.series.times" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "errors" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "errors[i].error" To sError
        Move (i + 1) To i
    Loop



End_Procedure

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