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
-- Use this online tool to generate code from sample JSON: Generate Code to Create JSON
-- The following JSON is sent in the request body.
-- {
-- "name": "Custom Metric SLO",
-- "thresholds": [
-- {
-- "target": 95,
-- "timeframe": "7d"
-- },
-- {
-- "target": 95,
-- "timeframe": "30d",
-- "warning": 97
-- }
-- ],
-- "type": "metric",
-- "created_at": -99964498,
-- "creator": {
-- "email": "nostrud aliqua dolore adipisicing",
-- "handle": "esse ad",
-- "name": "est"
-- },
-- "description": "adipisicing est quis ipsum",
-- "groups": [
-- "env:prod",
-- "role:mysql"
-- ],
-- "id": "nostrud officia",
-- "modified_at": -83338646,
-- "monitor_ids": [
-- -42604664,
-- -6863832
-- ],
-- "monitor_tags": [
-- "sint",
-- "cillum nisi ipsum"
-- ],
-- "query": {
-- "numerator": "sum:my.custom.metric{type:good}.as_count()",
-- "denominator": "sum:my.custom.metric{*}.as_count()"
-- },
-- "tags": [
-- "env:prod",
-- "app:core"
-- ],
-- "target_threshold": 99.9,
-- "timeframe": "30d",
-- "warning_threshold": 99.95
-- }
DECLARE @json int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @json OUT
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'name', 'Custom Metric SLO'
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'thresholds[0].target', 95
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'thresholds[0].timeframe', '7d'
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'thresholds[1].target', 95
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'thresholds[1].timeframe', '30d'
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'thresholds[1].warning', 97
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'type', 'metric'
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'created_at', -99964498
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'creator.email', 'nostrud aliqua dolore adipisicing'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'creator.handle', 'esse ad'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'creator.name', 'est'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'description', 'adipisicing est quis ipsum'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'groups[0]', 'env:prod'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'groups[1]', 'role:mysql'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'id', 'nostrud officia'
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'modified_at', -83338646
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'monitor_ids[0]', -42604664
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'monitor_ids[1]', -6863832
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'monitor_tags[0]', 'sint'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'monitor_tags[1]', 'cillum nisi ipsum'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'query.numerator', 'sum:my.custom.metric{type:good}.as_count()'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'query.denominator', 'sum:my.custom.metric{*}.as_count()'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tags[0]', 'env:prod'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tags[1]', 'app:core'
EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'target_threshold', '99.9'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'timeframe', '30d'
EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'warning_threshold', '99.95'
EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'
EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'
DECLARE @sbRequestBody int
-- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbRequestBody OUT
EXEC sp_OAMethod @json, 'EmitSb', @success OUT, @sbRequestBody
DECLARE @resp int
EXEC sp_OAMethod @http, 'PTextSb', @resp OUT, 'PUT', 'https://api.app.ddog-gov.com/api/v1/slo/:slo_id', @sbRequestBody, 'utf-8', 'application/json', 0, 0
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 @json
EXEC @hr = sp_OADestroy @sbRequestBody
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 @json
EXEC @hr = sp_OADestroy @sbRequestBody
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": [
-- {
-- "name": "Custom Metric SLO",
-- "thresholds": [
-- {
-- "target": 95,
-- "timeframe": "7d"
-- },
-- {
-- "target": 95,
-- "timeframe": "30d",
-- "warning": 97
-- }
-- ],
-- "type": "metric",
-- "created_at": -94400396,
-- "creator": {
-- "email": "esse ullamco",
-- "handle": "pariatur irure sit non",
-- "name": "in proident laborum"
-- },
-- "description": "est proident magna reprehenderit",
-- "groups": [
-- "env:prod",
-- "role:mysql"
-- ],
-- "id": "ipsum laboris consequat",
-- "modified_at": -34908193,
-- "monitor_ids": [
-- 35412081,
-- -51315393
-- ],
-- "monitor_tags": [
-- "voluptate adipisicing fugiat elit",
-- "reprehenderit et nostrud pariatur Excepteur"
-- ],
-- "query": {
-- "numerator": "sum:my.custom.metric{type:good}.as_count()",
-- "denominator": "sum:my.custom.metric{*}.as_count()"
-- },
-- "tags": [
-- "env:prod",
-- "app:core"
-- ],
-- "target_threshold": 99.9,
-- "timeframe": "30d",
-- "warning_threshold": 99.95
-- },
-- {
-- "name": "Custom Metric SLO",
-- "thresholds": [
-- {
-- "target": 95,
-- "timeframe": "7d"
-- },
-- {
-- "target": 95,
-- "timeframe": "30d",
-- "warning": 97
-- }
-- ],
-- "type": "metric",
-- "created_at": -83055437,
-- "creator": {
-- "email": "exercitation",
-- "handle": "commodo aute incididunt ut",
-- "name": "Lorem dolor irure"
-- },
-- "description": "do nostrud ex sit",
-- "groups": [
-- "env:prod",
-- "role:mysql"
-- ],
-- "id": "ut elit commodo",
-- "modified_at": -65512371,
-- "monitor_ids": [
-- 70922825,
-- -10561601
-- ],
-- "monitor_tags": [
-- "laborum aliqua proident",
-- "ullamco cillum ea consectetur"
-- ],
-- "query": {
-- "numerator": "sum:my.custom.metric{type:good}.as_count()",
-- "denominator": "sum:my.custom.metric{*}.as_count()"
-- },
-- "tags": [
-- "env:prod",
-- "app:core"
-- ],
-- "target_threshold": 99.9,
-- "timeframe": "30d",
-- "warning_threshold": 99.95
-- }
-- ],
-- "errors": [
-- "deserunt in fugiat",
-- "proident"
-- ],
-- "metadata": {
-- "page": {
-- "total_count": 69715777,
-- "total_filtered_count": -16033264
-- }
-- }
-- }
-- Sample code for parsing the JSON response...
-- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
DECLARE @name nvarchar(4000)
DECLARE @v_type nvarchar(4000)
DECLARE @created_at int
DECLARE @v_Email nvarchar(4000)
DECLARE @Handle nvarchar(4000)
DECLARE @Name nvarchar(4000)
DECLARE @description nvarchar(4000)
DECLARE @id nvarchar(4000)
DECLARE @modified_at int
DECLARE @Numerator nvarchar(4000)
DECLARE @Denominator nvarchar(4000)
DECLARE @target_threshold nvarchar(4000)
DECLARE @timeframe nvarchar(4000)
DECLARE @warning_threshold nvarchar(4000)
DECLARE @j int
DECLARE @count_j int
DECLARE @target int
DECLARE @warning int
DECLARE @strVal nvarchar(4000)
DECLARE @intVal int
DECLARE @Total_count int
EXEC sp_OAMethod @jResp, 'IntOf', @Total_count OUT, 'metadata.page.total_count'
DECLARE @Total_filtered_count int
EXEC sp_OAMethod @jResp, 'IntOf', @Total_filtered_count OUT, 'metadata.page.total_filtered_count'
DECLARE @i int
SELECT @i = 0
DECLARE @count_i int
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'data[i].name'
EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'data[i].type'
EXEC sp_OAMethod @jResp, 'IntOf', @created_at OUT, 'data[i].created_at'
EXEC sp_OAMethod @jResp, 'StringOf', @v_Email OUT, 'data[i].creator.email'
EXEC sp_OAMethod @jResp, 'StringOf', @Handle OUT, 'data[i].creator.handle'
EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'data[i].creator.name'
EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'data[i].description'
EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'data[i].id'
EXEC sp_OAMethod @jResp, 'IntOf', @modified_at OUT, 'data[i].modified_at'
EXEC sp_OAMethod @jResp, 'StringOf', @Numerator OUT, 'data[i].query.numerator'
EXEC sp_OAMethod @jResp, 'StringOf', @Denominator OUT, 'data[i].query.denominator'
EXEC sp_OAMethod @jResp, 'StringOf', @target_threshold OUT, 'data[i].target_threshold'
EXEC sp_OAMethod @jResp, 'StringOf', @timeframe OUT, 'data[i].timeframe'
EXEC sp_OAMethod @jResp, 'StringOf', @warning_threshold OUT, 'data[i].warning_threshold'
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data[i].thresholds'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @target OUT, 'data[i].thresholds[j].target'
EXEC sp_OAMethod @jResp, 'StringOf', @timeframe OUT, 'data[i].thresholds[j].timeframe'
EXEC sp_OAMethod @jResp, 'IntOf', @warning OUT, 'data[i].thresholds[j].warning'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data[i].groups'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'data[i].groups[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data[i].monitor_ids'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @intVal OUT, 'data[i].monitor_ids[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data[i].monitor_tags'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'data[i].monitor_tags[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data[i].tags'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'data[i].tags[j]'
SELECT @j = @j + 1
END
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', @strVal OUT, 'errors[i]'
SELECT @i = @i + 1
END
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @json
EXEC @hr = sp_OADestroy @sbRequestBody
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
Curl Command
curl -X PUT
-H "Content-Type: application/json"
-H "Accept: application/json"
-d '{
"name": "Custom Metric SLO",
"thresholds": [
{
"target": 95,
"timeframe": "7d"
},
{
"target": 95,
"timeframe": "30d",
"warning": 97
}
],
"type": "metric",
"created_at": -99964498,
"creator": {
"email": "nostrud aliqua dolore adipisicing",
"handle": "esse ad",
"name": "est"
},
"description": "adipisicing est quis ipsum",
"groups": [
"env:prod",
"role:mysql"
],
"id": "nostrud officia",
"modified_at": -83338646,
"monitor_ids": [
-42604664,
-6863832
],
"monitor_tags": [
"sint",
"cillum nisi ipsum"
],
"query": {
"numerator": "sum:my.custom.metric{type:good}.as_count()",
"denominator": "sum:my.custom.metric{*}.as_count()"
},
"tags": [
"env:prod",
"app:core"
],
"target_threshold": 99.9,
"timeframe": "30d",
"warning_threshold": 99.95
}'
https://api.app.ddog-gov.com/api/v1/slo/:slo_id
Postman Collection Item JSON
{
"name": "Update an SLO",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -99964498,\n \"creator\": {\n \"email\": \"nostrud aliqua dolore adipisicing\",\n \"handle\": \"esse ad\",\n \"name\": \"est\"\n },\n \"description\": \"adipisicing est quis ipsum\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"nostrud officia\",\n \"modified_at\": -83338646,\n \"monitor_ids\": [\n -42604664,\n -6863832\n ],\n \"monitor_tags\": [\n \"sint\",\n \"cillum nisi ipsum\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/slo/:slo_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"slo",
":slo_id"
],
"variable": [
{
"key": "slo_id",
"value": "tempor Ut sed velit"
}
]
},
"description": "Update the specified service level objective object."
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -99964498,\n \"creator\": {\n \"email\": \"nostrud aliqua dolore adipisicing\",\n \"handle\": \"esse ad\",\n \"name\": \"est\"\n },\n \"description\": \"adipisicing est quis ipsum\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"nostrud officia\",\n \"modified_at\": -83338646,\n \"monitor_ids\": [\n -42604664,\n -6863832\n ],\n \"monitor_tags\": [\n \"sint\",\n \"cillum nisi ipsum\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/slo/:slo_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"slo",
":slo_id"
],
"variable": [
{
"key": "slo_id"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"data\": [\n {\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -94400396,\n \"creator\": {\n \"email\": \"esse ullamco\",\n \"handle\": \"pariatur irure sit non\",\n \"name\": \"in proident laborum\"\n },\n \"description\": \"est proident magna reprehenderit\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"ipsum laboris consequat\",\n \"modified_at\": -34908193,\n \"monitor_ids\": [\n 35412081,\n -51315393\n ],\n \"monitor_tags\": [\n \"voluptate adipisicing fugiat elit\",\n \"reprehenderit et nostrud pariatur Excepteur\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n },\n {\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -83055437,\n \"creator\": {\n \"email\": \"exercitation\",\n \"handle\": \"commodo aute incididunt ut\",\n \"name\": \"Lorem dolor irure\"\n },\n \"description\": \"do nostrud ex sit\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"ut elit commodo\",\n \"modified_at\": -65512371,\n \"monitor_ids\": [\n 70922825,\n -10561601\n ],\n \"monitor_tags\": [\n \"laborum aliqua proident\",\n \"ullamco cillum ea consectetur\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n }\n ],\n \"errors\": [\n \"deserunt in fugiat\",\n \"proident\"\n ],\n \"metadata\": {\n \"page\": {\n \"total_count\": 69715777,\n \"total_filtered_count\": -16033264\n }\n }\n}"
},
{
"name": "Bad Request",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -99964498,\n \"creator\": {\n \"email\": \"nostrud aliqua dolore adipisicing\",\n \"handle\": \"esse ad\",\n \"name\": \"est\"\n },\n \"description\": \"adipisicing est quis ipsum\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"nostrud officia\",\n \"modified_at\": -83338646,\n \"monitor_ids\": [\n -42604664,\n -6863832\n ],\n \"monitor_tags\": [\n \"sint\",\n \"cillum nisi ipsum\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/slo/:slo_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"slo",
":slo_id"
],
"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": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -99964498,\n \"creator\": {\n \"email\": \"nostrud aliqua dolore adipisicing\",\n \"handle\": \"esse ad\",\n \"name\": \"est\"\n },\n \"description\": \"adipisicing est quis ipsum\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"nostrud officia\",\n \"modified_at\": -83338646,\n \"monitor_ids\": [\n -42604664,\n -6863832\n ],\n \"monitor_tags\": [\n \"sint\",\n \"cillum nisi ipsum\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/slo/:slo_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"slo",
":slo_id"
],
"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": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -99964498,\n \"creator\": {\n \"email\": \"nostrud aliqua dolore adipisicing\",\n \"handle\": \"esse ad\",\n \"name\": \"est\"\n },\n \"description\": \"adipisicing est quis ipsum\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"nostrud officia\",\n \"modified_at\": -83338646,\n \"monitor_ids\": [\n -42604664,\n -6863832\n ],\n \"monitor_tags\": [\n \"sint\",\n \"cillum nisi ipsum\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/slo/:slo_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"slo",
":slo_id"
],
"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": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Custom Metric SLO\",\n \"thresholds\": [\n {\n \"target\": 95,\n \"timeframe\": \"7d\"\n },\n {\n \"target\": 95,\n \"timeframe\": \"30d\",\n \"warning\": 97\n }\n ],\n \"type\": \"metric\",\n \"created_at\": -99964498,\n \"creator\": {\n \"email\": \"nostrud aliqua dolore adipisicing\",\n \"handle\": \"esse ad\",\n \"name\": \"est\"\n },\n \"description\": \"adipisicing est quis ipsum\",\n \"groups\": [\n \"env:prod\",\n \"role:mysql\"\n ],\n \"id\": \"nostrud officia\",\n \"modified_at\": -83338646,\n \"monitor_ids\": [\n -42604664,\n -6863832\n ],\n \"monitor_tags\": [\n \"sint\",\n \"cillum nisi ipsum\"\n ],\n \"query\": {\n \"numerator\": \"sum:my.custom.metric{type:good}.as_count()\",\n \"denominator\": \"sum:my.custom.metric{*}.as_count()\"\n },\n \"tags\": [\n \"env:prod\",\n \"app:core\"\n ],\n \"target_threshold\": 99.9,\n \"timeframe\": \"30d\",\n \"warning_threshold\": 99.95\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/slo/:slo_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"slo",
":slo_id"
],
"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}"
}
]
}