Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @iTmp0 int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
DECLARE @queryParams int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @queryParams OUT
EXEC sp_OAMethod @queryParams, 'UpdateInt', @success OUT, 'from_ts', -62147425
EXEC sp_OAMethod @queryParams, 'UpdateInt', @success OUT, 'to_ts', -62147425
EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'target', '49.34019051965387'
EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'apply_correction', 'true'
EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'
DECLARE @resp int
EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://api.app.ddog-gov.com/api/v1/slo/:slo_id/history', @queryParams
EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
IF @iTmp0 = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
RETURN
END
DECLARE @sbResponseBody int
-- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT
EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody
DECLARE @jResp int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT
EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
EXEC sp_OASetProperty @jResp, 'EmitCompact', 0
PRINT 'Response Body:'
EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
PRINT @sTmp0
DECLARE @respStatusCode int
EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT
PRINT 'Response Status Code = ' + @respStatusCode
IF @respStatusCode >= 400
BEGIN
PRINT 'Response Header:'
EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
PRINT @sTmp0
PRINT 'Failed.'
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
RETURN
END
EXEC @hr = sp_OADestroy @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
DECLARE @strVal nvarchar(4000)
DECLARE @error_budget_remaining7d int
DECLARE @group nvarchar(4000)
DECLARE @monitor_modified int
DECLARE @monitor_type nvarchar(4000)
DECLARE @name nvarchar(4000)
DECLARE @precision int
DECLARE @preview int
DECLARE @sli_value nvarchar(4000)
DECLARE @span_precision int
DECLARE @uptime nvarchar(4000)
DECLARE @j int
DECLARE @count_j int
DECLARE @error_type nvarchar(4000)
DECLARE @error_message nvarchar(4000)
DECLARE @k int
DECLARE @count_k int
DECLARE @intVal int
DECLARE @error nvarchar(4000)
DECLARE @From_ts int
EXEC sp_OAMethod @jResp, 'IntOf', @From_ts OUT, 'data.from_ts'
DECLARE @v_7d int
EXEC sp_OAMethod @jResp, 'IntOf', @v_7d OUT, 'data.overall.error_budget_remaining.7d'
DECLARE @Group nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Group OUT, 'data.overall.group'
DECLARE @Monitor_modified int
EXEC sp_OAMethod @jResp, 'IntOf', @Monitor_modified OUT, 'data.overall.monitor_modified'
DECLARE @Monitor_type nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Monitor_type OUT, 'data.overall.monitor_type'
DECLARE @Name nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'data.overall.name'
DECLARE @v_30d int
EXEC sp_OAMethod @jResp, 'IntOf', @v_30d OUT, 'data.overall.precision.30d'
DECLARE @Precision7d int
EXEC sp_OAMethod @jResp, 'IntOf', @Precision7d OUT, 'data.overall.precision.7d'
DECLARE @Preview int
EXEC sp_OAMethod @jResp, 'BoolOf', @Preview OUT, 'data.overall.preview'
DECLARE @Sli_value nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Sli_value OUT, 'data.overall.sli_value'
DECLARE @Span_precision int
EXEC sp_OAMethod @jResp, 'IntOf', @Span_precision OUT, 'data.overall.span_precision'
DECLARE @Uptime nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Uptime OUT, 'data.overall.uptime'
DECLARE @Res_type nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Res_type OUT, 'data.series.res_type'
DECLARE @Interval int
EXEC sp_OAMethod @jResp, 'IntOf', @Interval OUT, 'data.series.interval'
DECLARE @Resp_version int
EXEC sp_OAMethod @jResp, 'IntOf', @Resp_version OUT, 'data.series.resp_version'
DECLARE @Query nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Query OUT, 'data.series.query'
DECLARE @Count int
EXEC sp_OAMethod @jResp, 'IntOf', @Count OUT, 'data.series.numerator.count'
DECLARE @Sum int
EXEC sp_OAMethod @jResp, 'IntOf', @Sum OUT, 'data.series.numerator.sum'
DECLARE @DenominatorCount int
EXEC sp_OAMethod @jResp, 'IntOf', @DenominatorCount OUT, 'data.series.denominator.count'
DECLARE @DenominatorSum int
EXEC sp_OAMethod @jResp, 'IntOf', @DenominatorSum OUT, 'data.series.denominator.sum'
DECLARE @Message nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Message OUT, 'data.series.message'
DECLARE @Target int
EXEC sp_OAMethod @jResp, 'IntOf', @Target OUT, 'data.thresholds.my_service.target'
DECLARE @Timeframe nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Timeframe OUT, 'data.thresholds.my_service.timeframe'
DECLARE @To_ts int
EXEC sp_OAMethod @jResp, 'IntOf', @To_ts OUT, 'data.to_ts'
DECLARE @v_Type nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'data.type'
DECLARE @Type_id int
EXEC sp_OAMethod @jResp, 'IntOf', @Type_id OUT, 'data.type_id'
DECLARE @i int
SELECT @i = 0
DECLARE @count_i int
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data.group_by'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'data.group_by[i]'
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data.groups'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'IntOf', @error_budget_remaining7d OUT, 'data.groups[i].error_budget_remaining.7d'
EXEC sp_OAMethod @jResp, 'StringOf', @group OUT, 'data.groups[i].group'
EXEC sp_OAMethod @jResp, 'IntOf', @monitor_modified OUT, 'data.groups[i].monitor_modified'
EXEC sp_OAMethod @jResp, 'StringOf', @monitor_type OUT, 'data.groups[i].monitor_type'
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'data.groups[i].name'
EXEC sp_OAMethod @jResp, 'IntOf', @precision OUT, 'data.groups[i].precision'
EXEC sp_OAMethod @jResp, 'BoolOf', @preview OUT, 'data.groups[i].preview'
EXEC sp_OAMethod @jResp, 'StringOf', @sli_value OUT, 'data.groups[i].sli_value'
EXEC sp_OAMethod @jResp, 'IntOf', @span_precision OUT, 'data.groups[i].span_precision'
EXEC sp_OAMethod @jResp, 'StringOf', @uptime OUT, 'data.groups[i].uptime'
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data.groups[i].errors'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @error_type OUT, 'data.groups[i].errors[j].error_type'
EXEC sp_OAMethod @jResp, 'StringOf', @error_message OUT, 'data.groups[i].errors[j].error_message'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data.groups[i].history'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'data.groups[i].history[j]'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'IntOf', @intVal OUT, 'data.groups[i].history[j][k]'
SELECT @k = @k + 1
END
SELECT @j = @j + 1
END
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data.monitors'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'IntOf', @error_budget_remaining7d OUT, 'data.monitors[i].error_budget_remaining.7d'
EXEC sp_OAMethod @jResp, 'StringOf', @group OUT, 'data.monitors[i].group'
EXEC sp_OAMethod @jResp, 'IntOf', @monitor_modified OUT, 'data.monitors[i].monitor_modified'
EXEC sp_OAMethod @jResp, 'StringOf', @monitor_type OUT, 'data.monitors[i].monitor_type'
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'data.monitors[i].name'
EXEC sp_OAMethod @jResp, 'IntOf', @precision OUT, 'data.monitors[i].precision'
EXEC sp_OAMethod @jResp, 'BoolOf', @preview OUT, 'data.monitors[i].preview'
EXEC sp_OAMethod @jResp, 'StringOf', @sli_value OUT, 'data.monitors[i].sli_value'
EXEC sp_OAMethod @jResp, 'IntOf', @span_precision OUT, 'data.monitors[i].span_precision'
EXEC sp_OAMethod @jResp, 'StringOf', @uptime OUT, 'data.monitors[i].uptime'
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data.monitors[i].errors'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @error_type OUT, 'data.monitors[i].errors[j].error_type'
EXEC sp_OAMethod @jResp, 'StringOf', @error_message OUT, 'data.monitors[i].errors[j].error_message'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data.monitors[i].history'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'data.monitors[i].history[j]'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'IntOf', @intVal OUT, 'data.monitors[i].history[j][k]'
SELECT @k = @k + 1
END
SELECT @j = @j + 1
END
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data.overall.errors'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @error_type OUT, 'data.overall.errors[i].error_type'
EXEC sp_OAMethod @jResp, 'StringOf', @error_message OUT, 'data.overall.errors[i].error_message'
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data.overall.history'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data.overall.history[i]'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @intVal OUT, 'data.overall.history[i][j]'
SELECT @j = @j + 1
END
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data.series.times'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'errors'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @error OUT, 'errors[i].error'
SELECT @i = @i + 1
END
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
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}"
}
]
}