Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_Json
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Operator
integer li_Target
string ls_StrVal
integer li_Day
string ls_From
string ls_V_to
string ls_Name
string ls_Method
string ls_V_Url
integer li_Accept_self_signed
integer li_Allow_insecure
integer li_CheckCertificateRevocation
string ls_ExecutionRule
integer li_DisableCors
integer li_DisableCsp
integer li_Follow_redirects
string ls_HttpVersion
integer li_IgnoreServerCertificateError
integer li_InitialNavigationTimeout
integer li_Min_failure_duration
integer li_Min_location_failed
string ls_Monitor_name
integer li_Renotify_interval
integer li_Monitor_priority
integer li_NoScreenshot
integer li_Count
string ls_Interval
string ls_ApplicationId
integer li_ClientTokenId
integer li_IsEnabled
string ls_Timezone
integer li_Tick_every
string ls_V_type
string ls_Message
integer li_Monitor_id
string ls_Public_id
string ls_Status
string ls_Subtype
integer i
integer li_Count_i
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {
// "config": {
// "assertions": [
// {
// "operator": "lessThan",
// "target": 1000,
// "type": "responseTime"
// },
// {
// "operator": "is",
// "target": 200,
// "type": "statusCode"
// },
// {
// "operator": "is",
// "property": "content-type",
// "target": "text/html; charset=UTF-8",
// "type": "header"
// }
// ],
// "request": {
// "method": "GET",
// "url": "https://example.com"
// }
// },
// "locations": [
// "azure:eastus",
// "aws:eu-west-3"
// ],
// "message": "MY_NOTIFICATION_MESSAGE",
// "name": "MY_TEST_NAME",
// "options": {
// "min_failure_duration": 0,
// "min_location_failed": 1,
// "monitor_options": {
// "include_tags": true,
// "locked": false,
// "new_host_delay": 300,
// "notify_audit": false,
// "notify_no_data": false,
// "renotify_interval": 0
// },
// "tick_every": 60
// },
// "status": "live",
// "subtype": "http",
// "tags": [
// "env:production"
// ],
// "type": "api"
// }
loo_Json = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_Json.ConnectToNewObject("Chilkat.JsonObject")
loo_Json.UpdateString("config.assertions[0].operator","lessThan")
loo_Json.UpdateInt("config.assertions[0].target",1000)
loo_Json.UpdateString("config.assertions[0].type","responseTime")
loo_Json.UpdateString("config.assertions[1].operator","is")
loo_Json.UpdateInt("config.assertions[1].target",200)
loo_Json.UpdateString("config.assertions[1].type","statusCode")
loo_Json.UpdateString("config.assertions[2].operator","is")
loo_Json.UpdateString("config.assertions[2].property","content-type")
loo_Json.UpdateString("config.assertions[2].target","text/html; charset=UTF-8")
loo_Json.UpdateString("config.assertions[2].type","header")
loo_Json.UpdateString("config.request.method","GET")
loo_Json.UpdateString("config.request.url","https://example.com")
loo_Json.UpdateString("locations[0]","azure:eastus")
loo_Json.UpdateString("locations[1]","aws:eu-west-3")
loo_Json.UpdateString("message","MY_NOTIFICATION_MESSAGE")
loo_Json.UpdateString("name","MY_TEST_NAME")
loo_Json.UpdateInt("options.min_failure_duration",0)
loo_Json.UpdateInt("options.min_location_failed",1)
loo_Json.UpdateBool("options.monitor_options.include_tags",1)
loo_Json.UpdateBool("options.monitor_options.locked",0)
loo_Json.UpdateInt("options.monitor_options.new_host_delay",300)
loo_Json.UpdateBool("options.monitor_options.notify_audit",0)
loo_Json.UpdateBool("options.monitor_options.notify_no_data",0)
loo_Json.UpdateInt("options.monitor_options.renotify_interval",0)
loo_Json.UpdateInt("options.tick_every",60)
loo_Json.UpdateString("status","live")
loo_Json.UpdateString("subtype","http")
loo_Json.UpdateString("tags[0]","env:production")
loo_Json.UpdateString("type","api")
loo_Http.SetRequestHeader("Content-Type","application/json")
loo_Http.SetRequestHeader("Accept","application/json")
loo_Resp = loo_Http.PostJson3("https://api.app.ddog-gov.com/api/v1/synthetics/tests/api","application/json",loo_Json)
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
destroy loo_Json
return
end if
loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")
loo_Resp.GetBodySb(loo_SbResponseBody)
loo_JResp = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JResp.ConnectToNewObject("Chilkat.JsonObject")
loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0
Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()
li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
Write-Debug "Response Header:"
Write-Debug loo_Resp.Header
Write-Debug "Failed."
destroy loo_Resp
destroy loo_Http
destroy loo_Json
destroy loo_SbResponseBody
destroy loo_JResp
return
end if
destroy loo_Resp
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "name": "Example test name",
// "config": {
// "assertions": [
// {
// "operator": "lessThan",
// "target": 1000,
// "type": "responseTime"
// }
// ],
// "request": {
// "method": "GET",
// "url": "https://example.com"
// }
// },
// "locations": [
// "aws:eu-west-3"
// ],
// "options": {
// "accept_self_signed": true,
// "allow_insecure": true,
// "checkCertificateRevocation": true,
// "ci": {
// "executionRule": "non_blocking"
// },
// "device_ids": [
// "laptop_large",
// "laptop_large"
// ],
// "disableCors": false,
// "disableCsp": false,
// "follow_redirects": true,
// "httpVersion": "http1",
// "ignoreServerCertificateError": false,
// "initialNavigationTimeout": 87780679,
// "min_failure_duration": -32472759,
// "min_location_failed": -5806955,
// "monitor_name": "et deserunt ",
// "monitor_options": {
// "renotify_interval": 834
// },
// "monitor_priority": 3,
// "noScreenshot": false,
// "restricted_roles": [
// "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
// ],
// "retry": {
// "count": -50657150,
// "interval": -91565669.0691471
// },
// "rumSettings": {
// "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
// "clientTokenId": 12345,
// "isEnabled": true
// },
// "scheduling": {
// "timeframes": [
// {
// "day": 1,
// "from": "07:00",
// "to": "16:00"
// },
// {
// "day": 3,
// "from": "07:00",
// "to": "16:00"
// }
// ],
// "timezone": "America/New_York"
// },
// "tick_every": 384020
// },
// "type": "api",
// "message": "Notification message",
// "monitor_id": 12345678,
// "public_id": "123-abc-456",
// "status": "live",
// "subtype": "http",
// "tags": [
// "env:production"
// ]
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
ls_Name = loo_JResp.StringOf("name")
ls_Method = loo_JResp.StringOf("config.request.method")
ls_V_Url = loo_JResp.StringOf("config.request.url")
li_Accept_self_signed = loo_JResp.BoolOf("options.accept_self_signed")
li_Allow_insecure = loo_JResp.BoolOf("options.allow_insecure")
li_CheckCertificateRevocation = loo_JResp.BoolOf("options.checkCertificateRevocation")
ls_ExecutionRule = loo_JResp.StringOf("options.ci.executionRule")
li_DisableCors = loo_JResp.BoolOf("options.disableCors")
li_DisableCsp = loo_JResp.BoolOf("options.disableCsp")
li_Follow_redirects = loo_JResp.BoolOf("options.follow_redirects")
ls_HttpVersion = loo_JResp.StringOf("options.httpVersion")
li_IgnoreServerCertificateError = loo_JResp.BoolOf("options.ignoreServerCertificateError")
li_InitialNavigationTimeout = loo_JResp.IntOf("options.initialNavigationTimeout")
li_Min_failure_duration = loo_JResp.IntOf("options.min_failure_duration")
li_Min_location_failed = loo_JResp.IntOf("options.min_location_failed")
ls_Monitor_name = loo_JResp.StringOf("options.monitor_name")
li_Renotify_interval = loo_JResp.IntOf("options.monitor_options.renotify_interval")
li_Monitor_priority = loo_JResp.IntOf("options.monitor_priority")
li_NoScreenshot = loo_JResp.BoolOf("options.noScreenshot")
li_Count = loo_JResp.IntOf("options.retry.count")
ls_Interval = loo_JResp.StringOf("options.retry.interval")
ls_ApplicationId = loo_JResp.StringOf("options.rumSettings.applicationId")
li_ClientTokenId = loo_JResp.IntOf("options.rumSettings.clientTokenId")
li_IsEnabled = loo_JResp.BoolOf("options.rumSettings.isEnabled")
ls_Timezone = loo_JResp.StringOf("options.scheduling.timezone")
li_Tick_every = loo_JResp.IntOf("options.tick_every")
ls_V_type = loo_JResp.StringOf("type")
ls_Message = loo_JResp.StringOf("message")
li_Monitor_id = loo_JResp.IntOf("monitor_id")
ls_Public_id = loo_JResp.StringOf("public_id")
ls_Status = loo_JResp.StringOf("status")
ls_Subtype = loo_JResp.StringOf("subtype")
i = 0
li_Count_i = loo_JResp.SizeOfArray("config.assertions")
do while i < li_Count_i
loo_JResp.I = i
ls_Operator = loo_JResp.StringOf("config.assertions[i].operator")
li_Target = loo_JResp.IntOf("config.assertions[i].target")
ls_V_type = loo_JResp.StringOf("config.assertions[i].type")
i = i + 1
loop
i = 0
li_Count_i = loo_JResp.SizeOfArray("locations")
do while i < li_Count_i
loo_JResp.I = i
ls_StrVal = loo_JResp.StringOf("locations[i]")
i = i + 1
loop
i = 0
li_Count_i = loo_JResp.SizeOfArray("options.device_ids")
do while i < li_Count_i
loo_JResp.I = i
ls_StrVal = loo_JResp.StringOf("options.device_ids[i]")
i = i + 1
loop
i = 0
li_Count_i = loo_JResp.SizeOfArray("options.restricted_roles")
do while i < li_Count_i
loo_JResp.I = i
ls_StrVal = loo_JResp.StringOf("options.restricted_roles[i]")
i = i + 1
loop
i = 0
li_Count_i = loo_JResp.SizeOfArray("options.scheduling.timeframes")
do while i < li_Count_i
loo_JResp.I = i
li_Day = loo_JResp.IntOf("options.scheduling.timeframes[i].day")
ls_From = loo_JResp.StringOf("options.scheduling.timeframes[i].from")
ls_V_to = loo_JResp.StringOf("options.scheduling.timeframes[i].to")
i = i + 1
loop
i = 0
li_Count_i = loo_JResp.SizeOfArray("tags")
do while i < li_Count_i
loo_JResp.I = i
ls_StrVal = loo_JResp.StringOf("tags[i]")
i = i + 1
loop
destroy loo_Http
destroy loo_Json
destroy loo_SbResponseBody
destroy loo_JResp
Curl Command
curl -X POST
-H "Content-Type: application/json"
-H "Accept: application/json"
-d '{
"config": {
"assertions": [
{
"operator": "lessThan",
"target": 1000,
"type": "responseTime"
},
{
"operator": "is",
"target": 200,
"type": "statusCode"
},
{
"operator": "is",
"property": "content-type",
"target": "text/html; charset=UTF-8",
"type": "header"
}
],
"request": {
"method": "GET",
"url": "https://example.com"
}
},
"locations": [
"azure:eastus",
"aws:eu-west-3"
],
"message": "MY_NOTIFICATION_MESSAGE",
"name": "MY_TEST_NAME",
"options": {
"min_failure_duration": 0,
"min_location_failed": 1,
"monitor_options": {
"include_tags": true,
"locked": false,
"new_host_delay": 300,
"notify_audit": false,
"notify_no_data": false,
"renotify_interval": 0
},
"tick_every": 60
},
"status": "live",
"subtype": "http",
"tags": [
"env:production"
],
"type": "api"
}'
https://api.app.ddog-gov.com/api/v1/synthetics/tests/api
Postman Collection Item JSON
{
"name": "Create an API test",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"target\": 1000,\n \"type\": \"responseTime\"\n },\n {\n \"operator\": \"is\",\n \"target\": 200,\n \"type\": \"statusCode\"\n },\n {\n \"operator\": \"is\",\n \"property\": \"content-type\",\n \"target\": \"text/html; charset=UTF-8\",\n \"type\": \"header\"\n }\n ],\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"https://example.com\"\n }\n },\n \"locations\": [\n \"azure:eastus\",\n \"aws:eu-west-3\"\n ],\n \"message\": \"MY_NOTIFICATION_MESSAGE\",\n \"name\": \"MY_TEST_NAME\",\n \"options\": {\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"monitor_options\": {\n \"include_tags\": true,\n \"locked\": false,\n \"new_host_delay\": 300,\n \"notify_audit\": false,\n \"notify_no_data\": false,\n \"renotify_interval\": 0\n },\n \"tick_every\": 60\n },\n \"status\": \"live\",\n \"subtype\": \"http\",\n \"tags\": [\n \"env:production\"\n ],\n \"type\": \"api\"\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/synthetics/tests/api",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"synthetics",
"tests",
"api"
]
},
"description": "Create a Synthetic API test."
},
"response": [
{
"name": "OK - Returns the created test details.",
"originalRequest": {
"method": "POST",
"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 \"config\": {\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"target\": 1000,\n \"type\": \"responseTime\"\n },\n {\n \"operator\": \"is\",\n \"target\": 200,\n \"type\": \"statusCode\"\n },\n {\n \"operator\": \"is\",\n \"property\": \"content-type\",\n \"target\": \"text/html; charset=UTF-8\",\n \"type\": \"header\"\n }\n ],\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"https://example.com\"\n }\n },\n \"locations\": [\n \"azure:eastus\",\n \"aws:eu-west-3\"\n ],\n \"message\": \"MY_NOTIFICATION_MESSAGE\",\n \"name\": \"MY_TEST_NAME\",\n \"options\": {\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"monitor_options\": {\n \"include_tags\": true,\n \"locked\": false,\n \"new_host_delay\": 300,\n \"notify_audit\": false,\n \"notify_no_data\": false,\n \"renotify_interval\": 0\n },\n \"tick_every\": 60\n },\n \"status\": \"live\",\n \"subtype\": \"http\",\n \"tags\": [\n \"env:production\"\n ],\n \"type\": \"api\"\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/synthetics/tests/api",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"synthetics",
"tests",
"api"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"name\": \"Example test name\",\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"target\": 1000,\n \"type\": \"responseTime\"\n }\n ],\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"https://example.com\"\n }\n },\n \"locations\": [\n \"aws:eu-west-3\"\n ],\n \"options\": {\n \"accept_self_signed\": true,\n \"allow_insecure\": true,\n \"checkCertificateRevocation\": true,\n \"ci\": {\n \"executionRule\": \"non_blocking\"\n },\n \"device_ids\": [\n \"laptop_large\",\n \"laptop_large\"\n ],\n \"disableCors\": false,\n \"disableCsp\": false,\n \"follow_redirects\": true,\n \"httpVersion\": \"http1\",\n \"ignoreServerCertificateError\": false,\n \"initialNavigationTimeout\": 87780679,\n \"min_failure_duration\": -32472759,\n \"min_location_failed\": -5806955,\n \"monitor_name\": \"et deserunt \",\n \"monitor_options\": {\n \"renotify_interval\": 834\n },\n \"monitor_priority\": 3,\n \"noScreenshot\": false,\n \"restricted_roles\": [\n \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n ],\n \"retry\": {\n \"count\": -50657150,\n \"interval\": -91565669.0691471\n },\n \"rumSettings\": {\n \"applicationId\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n \"clientTokenId\": 12345,\n \"isEnabled\": true\n },\n \"scheduling\": {\n \"timeframes\": [\n {\n \"day\": 1,\n \"from\": \"07:00\",\n \"to\": \"16:00\"\n },\n {\n \"day\": 3,\n \"from\": \"07:00\",\n \"to\": \"16:00\"\n }\n ],\n \"timezone\": \"America/New_York\"\n },\n \"tick_every\": 384020\n },\n \"type\": \"api\",\n \"message\": \"Notification message\",\n \"monitor_id\": 12345678,\n \"public_id\": \"123-abc-456\",\n \"status\": \"live\",\n \"subtype\": \"http\",\n \"tags\": [\n \"env:production\"\n ]\n}"
},
{
"name": "- JSON format is wrong\n- Creation failed",
"originalRequest": {
"method": "POST",
"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 \"config\": {\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"target\": 1000,\n \"type\": \"responseTime\"\n },\n {\n \"operator\": \"is\",\n \"target\": 200,\n \"type\": \"statusCode\"\n },\n {\n \"operator\": \"is\",\n \"property\": \"content-type\",\n \"target\": \"text/html; charset=UTF-8\",\n \"type\": \"header\"\n }\n ],\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"https://example.com\"\n }\n },\n \"locations\": [\n \"azure:eastus\",\n \"aws:eu-west-3\"\n ],\n \"message\": \"MY_NOTIFICATION_MESSAGE\",\n \"name\": \"MY_TEST_NAME\",\n \"options\": {\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"monitor_options\": {\n \"include_tags\": true,\n \"locked\": false,\n \"new_host_delay\": 300,\n \"notify_audit\": false,\n \"notify_no_data\": false,\n \"renotify_interval\": 0\n },\n \"tick_every\": 60\n },\n \"status\": \"live\",\n \"subtype\": \"http\",\n \"tags\": [\n \"env:production\"\n ],\n \"type\": \"api\"\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/synthetics/tests/api",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"synthetics",
"tests",
"api"
]
}
},
"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": "Test quota is reached",
"originalRequest": {
"method": "POST",
"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 \"config\": {\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"target\": 1000,\n \"type\": \"responseTime\"\n },\n {\n \"operator\": \"is\",\n \"target\": 200,\n \"type\": \"statusCode\"\n },\n {\n \"operator\": \"is\",\n \"property\": \"content-type\",\n \"target\": \"text/html; charset=UTF-8\",\n \"type\": \"header\"\n }\n ],\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"https://example.com\"\n }\n },\n \"locations\": [\n \"azure:eastus\",\n \"aws:eu-west-3\"\n ],\n \"message\": \"MY_NOTIFICATION_MESSAGE\",\n \"name\": \"MY_TEST_NAME\",\n \"options\": {\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"monitor_options\": {\n \"include_tags\": true,\n \"locked\": false,\n \"new_host_delay\": 300,\n \"notify_audit\": false,\n \"notify_no_data\": false,\n \"renotify_interval\": 0\n },\n \"tick_every\": 60\n },\n \"status\": \"live\",\n \"subtype\": \"http\",\n \"tags\": [\n \"env:production\"\n ],\n \"type\": \"api\"\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/synthetics/tests/api",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"synthetics",
"tests",
"api"
]
}
},
"status": "Payment Required",
"code": 402,
"_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": "POST",
"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 \"config\": {\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"target\": 1000,\n \"type\": \"responseTime\"\n },\n {\n \"operator\": \"is\",\n \"target\": 200,\n \"type\": \"statusCode\"\n },\n {\n \"operator\": \"is\",\n \"property\": \"content-type\",\n \"target\": \"text/html; charset=UTF-8\",\n \"type\": \"header\"\n }\n ],\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"https://example.com\"\n }\n },\n \"locations\": [\n \"azure:eastus\",\n \"aws:eu-west-3\"\n ],\n \"message\": \"MY_NOTIFICATION_MESSAGE\",\n \"name\": \"MY_TEST_NAME\",\n \"options\": {\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"monitor_options\": {\n \"include_tags\": true,\n \"locked\": false,\n \"new_host_delay\": 300,\n \"notify_audit\": false,\n \"notify_no_data\": false,\n \"renotify_interval\": 0\n },\n \"tick_every\": 60\n },\n \"status\": \"live\",\n \"subtype\": \"http\",\n \"tags\": [\n \"env:production\"\n ],\n \"type\": \"api\"\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/synthetics/tests/api",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"synthetics",
"tests",
"api"
]
}
},
"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": "Too many requests",
"originalRequest": {
"method": "POST",
"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 \"config\": {\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"target\": 1000,\n \"type\": \"responseTime\"\n },\n {\n \"operator\": \"is\",\n \"target\": 200,\n \"type\": \"statusCode\"\n },\n {\n \"operator\": \"is\",\n \"property\": \"content-type\",\n \"target\": \"text/html; charset=UTF-8\",\n \"type\": \"header\"\n }\n ],\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"https://example.com\"\n }\n },\n \"locations\": [\n \"azure:eastus\",\n \"aws:eu-west-3\"\n ],\n \"message\": \"MY_NOTIFICATION_MESSAGE\",\n \"name\": \"MY_TEST_NAME\",\n \"options\": {\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"monitor_options\": {\n \"include_tags\": true,\n \"locked\": false,\n \"new_host_delay\": 300,\n \"notify_audit\": false,\n \"notify_no_data\": false,\n \"renotify_interval\": 0\n },\n \"tick_every\": 60\n },\n \"status\": \"live\",\n \"subtype\": \"http\",\n \"tags\": [\n \"env:production\"\n ],\n \"type\": \"api\"\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v1/synthetics/tests/api",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"synthetics",
"tests",
"api"
]
}
},
"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}"
}
]
}