Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loJson
LOCAL loSbRequestBody
LOCAL loResp
LOCAL loSbResponseBody
LOCAL loJResp
LOCAL lnRespStatusCode
LOCAL lcName
LOCAL lcV_type
LOCAL lnCreated_at
LOCAL lcV_Email
LOCAL lcHandle
LOCAL lcName
LOCAL lcDescription
LOCAL lcId
LOCAL lnModified_at
LOCAL lcNumerator
LOCAL lcDenominator
LOCAL lcTarget_threshold
LOCAL lcTimeframe
LOCAL lcWarning_threshold
LOCAL j
LOCAL lnCount_j
LOCAL lnTarget
LOCAL lnWarning
LOCAL lcStrVal
LOCAL lnIntVal
LOCAL lnTotal_count
LOCAL lnTotal_filtered_count
LOCAL i
LOCAL lnCount_i
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')
* 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
* }
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJson = CreateObject('Chilkat.JsonObject')
loJson.UpdateString("name","Custom Metric SLO")
loJson.UpdateInt("thresholds[0].target",95)
loJson.UpdateString("thresholds[0].timeframe","7d")
loJson.UpdateInt("thresholds[1].target",95)
loJson.UpdateString("thresholds[1].timeframe","30d")
loJson.UpdateInt("thresholds[1].warning",97)
loJson.UpdateString("type","metric")
loJson.UpdateInt("created_at",-99964498)
loJson.UpdateString("creator.email","nostrud aliqua dolore adipisicing")
loJson.UpdateString("creator.handle","esse ad")
loJson.UpdateString("creator.name","est")
loJson.UpdateString("description","adipisicing est quis ipsum")
loJson.UpdateString("groups[0]","env:prod")
loJson.UpdateString("groups[1]","role:mysql")
loJson.UpdateString("id","nostrud officia")
loJson.UpdateInt("modified_at",-83338646)
loJson.UpdateInt("monitor_ids[0]",-42604664)
loJson.UpdateInt("monitor_ids[1]",-6863832)
loJson.UpdateString("monitor_tags[0]","sint")
loJson.UpdateString("monitor_tags[1]","cillum nisi ipsum")
loJson.UpdateString("query.numerator","sum:my.custom.metric{type:good}.as_count()")
loJson.UpdateString("query.denominator","sum:my.custom.metric{*}.as_count()")
loJson.UpdateString("tags[0]","env:prod")
loJson.UpdateString("tags[1]","app:core")
loJson.UpdateNumber("target_threshold","99.9")
loJson.UpdateString("timeframe","30d")
loJson.UpdateNumber("warning_threshold","99.95")
loHttp.SetRequestHeader("Content-Type","application/json")
loHttp.SetRequestHeader("Accept","application/json")
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder')
loSbRequestBody = CreateObject('Chilkat.StringBuilder')
loJson.EmitSb(loSbRequestBody)
loResp = loHttp.PTextSb("PUT","https://api.app.ddog-gov.com/api/v1/slo/:slo_id",loSbRequestBody,"utf-8","application/json",0,0)
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loJson
RELEASE loSbRequestBody
CANCEL
ENDIF
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder')
loSbResponseBody = CreateObject('Chilkat.StringBuilder')
loResp.GetBodySb(loSbResponseBody)
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJResp = CreateObject('Chilkat.JsonObject')
loJResp.LoadSb(loSbResponseBody)
loJResp.EmitCompact = 0
? "Response Body:"
? loJResp.Emit()
lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode >= 400) THEN
? "Response Header:"
? loResp.Header
? "Failed."
RELEASE loResp
RELEASE loHttp
RELEASE loJson
RELEASE loSbRequestBody
RELEASE loSbResponseBody
RELEASE loJResp
CANCEL
ENDIF
RELEASE loResp
* 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
lnTotal_count = loJResp.IntOf("metadata.page.total_count")
lnTotal_filtered_count = loJResp.IntOf("metadata.page.total_filtered_count")
i = 0
lnCount_i = loJResp.SizeOfArray("data")
DO WHILE i < lnCount_i
loJResp.I = i
lcName = loJResp.StringOf("data[i].name")
lcV_type = loJResp.StringOf("data[i].type")
lnCreated_at = loJResp.IntOf("data[i].created_at")
lcV_Email = loJResp.StringOf("data[i].creator.email")
lcHandle = loJResp.StringOf("data[i].creator.handle")
lcName = loJResp.StringOf("data[i].creator.name")
lcDescription = loJResp.StringOf("data[i].description")
lcId = loJResp.StringOf("data[i].id")
lnModified_at = loJResp.IntOf("data[i].modified_at")
lcNumerator = loJResp.StringOf("data[i].query.numerator")
lcDenominator = loJResp.StringOf("data[i].query.denominator")
lcTarget_threshold = loJResp.StringOf("data[i].target_threshold")
lcTimeframe = loJResp.StringOf("data[i].timeframe")
lcWarning_threshold = loJResp.StringOf("data[i].warning_threshold")
j = 0
lnCount_j = loJResp.SizeOfArray("data[i].thresholds")
DO WHILE j < lnCount_j
loJResp.J = j
lnTarget = loJResp.IntOf("data[i].thresholds[j].target")
lcTimeframe = loJResp.StringOf("data[i].thresholds[j].timeframe")
lnWarning = loJResp.IntOf("data[i].thresholds[j].warning")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("data[i].groups")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("data[i].groups[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("data[i].monitor_ids")
DO WHILE j < lnCount_j
loJResp.J = j
lnIntVal = loJResp.IntOf("data[i].monitor_ids[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("data[i].monitor_tags")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("data[i].monitor_tags[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("data[i].tags")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("data[i].tags[j]")
j = j + 1
ENDDO
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("errors")
DO WHILE i < lnCount_i
loJResp.I = i
lcStrVal = loJResp.StringOf("errors[i]")
i = i + 1
ENDDO
RELEASE loHttp
RELEASE loJson
RELEASE loSbRequestBody
RELEASE loSbResponseBody
RELEASE loJResp
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}"
}
]
}