Back to Collection Items
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' 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")
set http = Server.CreateObject("Chilkat.Http")
http.SetRequestHeader "Accept","application/json"
' resp is a Chilkat.HttpResponse
Set resp = http.QuickRequest("DELETE","https://api.app.ddog-gov.com/api/v2/downtime/:downtime_id")
If (http.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>"
Response.End
End If
respStatusCode = resp.StatusCode
Response.Write "<pre>" & Server.HTMLEncode( "Response Status Code = " & respStatusCode) & "</pre>"
If (respStatusCode <> 204) Then
Response.Write "<pre>" & Server.HTMLEncode( "Response Header:") & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( resp.Header) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "Response Body:") & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( resp.BodyStr) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "Failed.") & "</pre>"
Response.End
End If
Response.Write "<pre>" & Server.HTMLEncode( "Success.") & "</pre>"
%>
</body>
</html>
Curl Command
curl -X DELETE
-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v2/downtime/:downtime_id
Postman Collection Item JSON
{
"name": "Cancel a downtime",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id",
"value": "<string>"
}
]
},
"description": "Cancel a downtime."
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
},
{
"name": "Forbidden",
"originalRequest": {
"method": "DELETE",
"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/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id"
}
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"<string>\",\n \"<string>\"\n ]\n}"
},
{
"name": "Downtime not found",
"originalRequest": {
"method": "DELETE",
"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/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"<string>\",\n \"<string>\"\n ]\n}"
},
{
"name": "Too many requests",
"originalRequest": {
"method": "DELETE",
"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/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"<string>\",\n \"<string>\"\n ]\n}"
}
]
}