Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Handle hoJson
Variant vSbRequestBody
Handle hoSbRequestBody
Variant vResp
Handle hoResp
Variant vSbResponseBody
Handle hoSbResponseBody
Handle hoJResp
Integer iRespStatusCode
String sStrVal
String sDuration
String sRrule
String sStart
String sCreated_at
String sDisabled
String sV_Email
String sHandle
String sIcon
String sModified_at
String sName
String sService_account
String sAttributesStatus
String sTitle
String sVerified
String sId
String sV_type
Integer j
Integer iCount_j
String sCanceled
String sCreated
String sDisplay_timezone
String sMessage
String sModified
String sMonitor_id
String sMute_first_recovery_notification
String sV_End
String sStart
String sTimezone
String sScope
String sStatus
String sId
String sDataId
String sV_Type
String sDataType
String sDataType
Integer i
Integer iCount_i
String sTemp1
Boolean bTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {
// "data": {
// "id": "<string>",
// "type": "downtime",
// "attributes": {
// "display_timezone": "UTC",
// "message": "<string>",
// "monitor_identifier": {
// "monitor_id": "<long>"
// },
// "mute_first_recovery_notification": "<boolean>",
// "notify_end_states": [
// "alert",
// "no data"
// ],
// "notify_end_types": [
// "canceled",
// "expired"
// ],
// "schedule": {
// "recurrences": [
// {
// "duration": "<string>",
// "rrule": "<string>",
// "start": "<string>"
// },
// {
// "duration": "<string>",
// "rrule": "<string>",
// "start": "<string>"
// }
// ],
// "timezone": "UTC"
// },
// "scope": "<string>"
// }
// }
// }
Get Create (RefClass(cComChilkatJsonObject)) To hoJson
If (Not(IsComObjectCreated(hoJson))) Begin
Send CreateComObject of hoJson
End
Get ComUpdateString Of hoJson "data.id" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.type" "downtime" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.display_timezone" "UTC" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.message" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.monitor_identifier.monitor_id" "<long>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.mute_first_recovery_notification" "<boolean>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.notify_end_states[0]" "alert" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.notify_end_states[1]" "no data" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.notify_end_types[0]" "canceled" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.notify_end_types[1]" "expired" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.schedule.recurrences[0].duration" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.schedule.recurrences[0].rrule" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.schedule.recurrences[0].start" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.schedule.recurrences[1].duration" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.schedule.recurrences[1].rrule" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.schedule.recurrences[1].start" "<string>" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.schedule.timezone" "UTC" To iSuccess
Get ComUpdateString Of hoJson "data.attributes.scope" "<string>" To iSuccess
Send ComSetRequestHeader To hoHttp "Content-Type" "application/json"
Send ComSetRequestHeader To hoHttp "Accept" "application/json"
Get Create (RefClass(cComChilkatStringBuilder)) To hoSbRequestBody
If (Not(IsComObjectCreated(hoSbRequestBody))) Begin
Send CreateComObject of hoSbRequestBody
End
Get pvComObject of hoSbRequestBody to vSbRequestBody
Get ComEmitSb Of hoJson vSbRequestBody To iSuccess
Get pvComObject of hoSbRequestBody to vSbRequestBody
Get ComPTextSb Of hoHttp "PATCH" "https://api.app.ddog-gov.com/api/v2/downtime/:downtime_id" vSbRequestBody "utf-8" "application/json" False False To vResp
If (IsComObject(vResp)) Begin
Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
Set pvComObject Of hoResp To vResp
End
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
Send CreateComObject of hoSbResponseBody
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess
Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
If (Not(IsComObjectCreated(hoJResp))) Begin
Send CreateComObject of hoJResp
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
Set ComEmitCompact Of hoJResp To False
Showln "Response Body:"
Get ComEmit Of hoJResp To sTemp1
Showln sTemp1
Get ComStatusCode Of hoResp To iRespStatusCode
Showln "Response Status Code = " iRespStatusCode
If (iRespStatusCode >= 400) Begin
Showln "Response Header:"
Get ComHeader Of hoResp To sTemp1
Showln sTemp1
Showln "Failed."
Send Destroy of hoResp
Procedure_Return
End
Send Destroy of hoResp
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "data": {
// "attributes": {
// "canceled": "<dateTime>",
// "created": "<dateTime>",
// "display_timezone": "UTC",
// "message": "<string>",
// "modified": "<dateTime>",
// "monitor_identifier": {
// "monitor_id": "<long>"
// },
// "mute_first_recovery_notification": "<boolean>",
// "notify_end_states": [
// "alert",
// "alert"
// ],
// "notify_end_types": [
// "canceled",
// "expired"
// ],
// "schedule": {
// "recurrences": [
// {
// "duration": "<string>",
// "rrule": "<string>",
// "start": "<string>"
// }
// ],
// "current_downtime": {
// "end": "<dateTime>",
// "start": "<dateTime>"
// },
// "timezone": "UTC"
// },
// "scope": "<string>",
// "status": "scheduled"
// },
// "id": "<string>",
// "relationships": {
// "created_by": {
// "data": {
// "id": "<string>",
// "type": "users"
// }
// },
// "monitor": {
// "data": {
// "id": "<string>",
// "type": "monitors"
// }
// }
// },
// "type": "downtime"
// },
// "included": [
// {
// "attributes": {
// "created_at": "<dateTime>",
// "disabled": "<boolean>",
// "email": "<string>",
// "handle": "<string>",
// "icon": "<string>",
// "modified_at": "<dateTime>",
// "name": "<string>",
// "service_account": "<boolean>",
// "status": "<string>",
// "title": "<string>",
// "verified": "<boolean>"
// },
// "id": "<string>",
// "relationships": {
// "org": {
// "data": {
// "id": "<string>",
// "type": "orgs"
// }
// },
// "other_orgs": {
// "data": [
// {
// "id": "<string>",
// "type": "orgs"
// },
// {
// "id": "<string>",
// "type": "orgs"
// }
// ]
// },
// "other_users": {
// "data": [
// {
// "id": "<string>",
// "type": "users"
// },
// {
// "id": "<string>",
// "type": "users"
// }
// ]
// },
// "roles": {
// "data": [
// {
// "id": "<string>",
// "type": "roles"
// },
// {
// "id": "<string>",
// "type": "roles"
// }
// ]
// }
// },
// "type": "users"
// },
// {
// "attributes": {
// "created_at": "<dateTime>",
// "disabled": "<boolean>",
// "email": "<string>",
// "handle": "<string>",
// "icon": "<string>",
// "modified_at": "<dateTime>",
// "name": "<string>",
// "service_account": "<boolean>",
// "status": "<string>",
// "title": "<string>",
// "verified": "<boolean>"
// },
// "id": "<string>",
// "relationships": {
// "org": {
// "data": {
// "id": "<string>",
// "type": "orgs"
// }
// },
// "other_orgs": {
// "data": [
// {
// "id": "<string>",
// "type": "orgs"
// },
// {
// "id": "<string>",
// "type": "orgs"
// }
// ]
// },
// "other_users": {
// "data": [
// {
// "id": "<string>",
// "type": "users"
// },
// {
// "id": "<string>",
// "type": "users"
// }
// ]
// },
// "roles": {
// "data": [
// {
// "id": "<string>",
// "type": "roles"
// },
// {
// "id": "<string>",
// "type": "roles"
// }
// ]
// }
// },
// "type": "users"
// }
// ]
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
Get ComStringOf Of hoJResp "data.attributes.canceled" To sCanceled
Get ComStringOf Of hoJResp "data.attributes.created" To sCreated
Get ComStringOf Of hoJResp "data.attributes.display_timezone" To sDisplay_timezone
Get ComStringOf Of hoJResp "data.attributes.message" To sMessage
Get ComStringOf Of hoJResp "data.attributes.modified" To sModified
Get ComStringOf Of hoJResp "data.attributes.monitor_identifier.monitor_id" To sMonitor_id
Get ComStringOf Of hoJResp "data.attributes.mute_first_recovery_notification" To sMute_first_recovery_notification
Get ComStringOf Of hoJResp "data.attributes.schedule.current_downtime.end" To sV_End
Get ComStringOf Of hoJResp "data.attributes.schedule.current_downtime.start" To sStart
Get ComStringOf Of hoJResp "data.attributes.schedule.timezone" To sTimezone
Get ComStringOf Of hoJResp "data.attributes.scope" To sScope
Get ComStringOf Of hoJResp "data.attributes.status" To sStatus
Get ComStringOf Of hoJResp "data.id" To sId
Get ComStringOf Of hoJResp "data.relationships.created_by.data.id" To sDataId
Get ComStringOf Of hoJResp "data.relationships.created_by.data.type" To sV_Type
Get ComStringOf Of hoJResp "data.relationships.monitor.data.id" To sDataId
Get ComStringOf Of hoJResp "data.relationships.monitor.data.type" To sDataType
Get ComStringOf Of hoJResp "data.type" To sDataType
Move 0 To i
Get ComSizeOfArray Of hoJResp "data.attributes.notify_end_states" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "data.attributes.notify_end_states[i]" To sStrVal
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "data.attributes.notify_end_types" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "data.attributes.notify_end_types[i]" To sStrVal
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "data.attributes.schedule.recurrences" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "data.attributes.schedule.recurrences[i].duration" To sDuration
Get ComStringOf Of hoJResp "data.attributes.schedule.recurrences[i].rrule" To sRrule
Get ComStringOf Of hoJResp "data.attributes.schedule.recurrences[i].start" To sStart
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "included" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "included[i].attributes.created_at" To sCreated_at
Get ComStringOf Of hoJResp "included[i].attributes.disabled" To sDisabled
Get ComStringOf Of hoJResp "included[i].attributes.email" To sV_Email
Get ComStringOf Of hoJResp "included[i].attributes.handle" To sHandle
Get ComStringOf Of hoJResp "included[i].attributes.icon" To sIcon
Get ComStringOf Of hoJResp "included[i].attributes.modified_at" To sModified_at
Get ComStringOf Of hoJResp "included[i].attributes.name" To sName
Get ComStringOf Of hoJResp "included[i].attributes.service_account" To sService_account
Get ComStringOf Of hoJResp "included[i].attributes.status" To sAttributesStatus
Get ComStringOf Of hoJResp "included[i].attributes.title" To sTitle
Get ComStringOf Of hoJResp "included[i].attributes.verified" To sVerified
Get ComStringOf Of hoJResp "included[i].id" To sId
Get ComStringOf Of hoJResp "included[i].relationships.org.data.id" To sDataId
Get ComStringOf Of hoJResp "included[i].relationships.org.data.type" To sDataType
Get ComStringOf Of hoJResp "included[i].type" To sV_type
Move 0 To j
Get ComSizeOfArray Of hoJResp "included[i].relationships.other_orgs.data" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "included[i].relationships.other_orgs.data[j].id" To sId
Get ComStringOf Of hoJResp "included[i].relationships.other_orgs.data[j].type" To sV_type
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "included[i].relationships.other_users.data" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "included[i].relationships.other_users.data[j].id" To sId
Get ComStringOf Of hoJResp "included[i].relationships.other_users.data[j].type" To sV_type
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "included[i].relationships.roles.data" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "included[i].relationships.roles.data[j].id" To sId
Get ComStringOf Of hoJResp "included[i].relationships.roles.data[j].type" To sV_type
Move (j + 1) To j
Loop
Move (i + 1) To i
Loop
End_Procedure
Curl Command
curl -X PATCH
-H "Content-Type: application/json"
-H "Accept: application/json"
-d '{
"data": {
"id": "<string>",
"type": "downtime",
"attributes": {
"display_timezone": "UTC",
"message": "<string>",
"monitor_identifier": {
"monitor_id": "<long>"
},
"mute_first_recovery_notification": "<boolean>",
"notify_end_states": [
"alert",
"no data"
],
"notify_end_types": [
"canceled",
"expired"
],
"schedule": {
"recurrences": [
{
"duration": "<string>",
"rrule": "<string>",
"start": "<string>"
},
{
"duration": "<string>",
"rrule": "<string>",
"start": "<string>"
}
],
"timezone": "UTC"
},
"scope": "<string>"
}
}
}'
https://api.app.ddog-gov.com/api/v2/downtime/:downtime_id
Postman Collection Item JSON
{
"name": "Update a downtime",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"downtime\",\n \"attributes\": {\n \"display_timezone\": \"UTC\",\n \"message\": \"<string>\",\n \"monitor_identifier\": {\n \"monitor_id\": \"<long>\"\n },\n \"mute_first_recovery_notification\": \"<boolean>\",\n \"notify_end_states\": [\n \"alert\",\n \"no data\"\n ],\n \"notify_end_types\": [\n \"canceled\",\n \"expired\"\n ],\n \"schedule\": {\n \"recurrences\": [\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n },\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n }\n ],\n \"timezone\": \"UTC\"\n },\n \"scope\": \"<string>\"\n }\n }\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id",
"value": "<string>"
}
]
},
"description": "Update a downtime by `downtime_id`."
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "PATCH",
"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 \"data\": {\n \"id\": \"<string>\",\n \"type\": \"downtime\",\n \"attributes\": {\n \"display_timezone\": \"UTC\",\n \"message\": \"<string>\",\n \"monitor_identifier\": {\n \"monitor_id\": \"<long>\"\n },\n \"mute_first_recovery_notification\": \"<boolean>\",\n \"notify_end_states\": [\n \"alert\",\n \"no data\"\n ],\n \"notify_end_types\": [\n \"canceled\",\n \"expired\"\n ],\n \"schedule\": {\n \"recurrences\": [\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n },\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n }\n ],\n \"timezone\": \"UTC\"\n },\n \"scope\": \"<string>\"\n }\n }\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"data\": {\n \"attributes\": {\n \"canceled\": \"<dateTime>\",\n \"created\": \"<dateTime>\",\n \"display_timezone\": \"UTC\",\n \"message\": \"<string>\",\n \"modified\": \"<dateTime>\",\n \"monitor_identifier\": {\n \"monitor_id\": \"<long>\"\n },\n \"mute_first_recovery_notification\": \"<boolean>\",\n \"notify_end_states\": [\n \"alert\",\n \"alert\"\n ],\n \"notify_end_types\": [\n \"canceled\",\n \"expired\"\n ],\n \"schedule\": {\n \"recurrences\": [\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n }\n ],\n \"current_downtime\": {\n \"end\": \"<dateTime>\",\n \"start\": \"<dateTime>\"\n },\n \"timezone\": \"UTC\"\n },\n \"scope\": \"<string>\",\n \"status\": \"scheduled\"\n },\n \"id\": \"<string>\",\n \"relationships\": {\n \"created_by\": {\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"users\"\n }\n },\n \"monitor\": {\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"monitors\"\n }\n }\n },\n \"type\": \"downtime\"\n },\n \"included\": [\n {\n \"attributes\": {\n \"created_at\": \"<dateTime>\",\n \"disabled\": \"<boolean>\",\n \"email\": \"<string>\",\n \"handle\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_at\": \"<dateTime>\",\n \"name\": \"<string>\",\n \"service_account\": \"<boolean>\",\n \"status\": \"<string>\",\n \"title\": \"<string>\",\n \"verified\": \"<boolean>\"\n },\n \"id\": \"<string>\",\n \"relationships\": {\n \"org\": {\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"orgs\"\n }\n },\n \"other_orgs\": {\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"orgs\"\n },\n {\n \"id\": \"<string>\",\n \"type\": \"orgs\"\n }\n ]\n },\n \"other_users\": {\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"users\"\n },\n {\n \"id\": \"<string>\",\n \"type\": \"users\"\n }\n ]\n },\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"roles\"\n },\n {\n \"id\": \"<string>\",\n \"type\": \"roles\"\n }\n ]\n }\n },\n \"type\": \"users\"\n },\n {\n \"attributes\": {\n \"created_at\": \"<dateTime>\",\n \"disabled\": \"<boolean>\",\n \"email\": \"<string>\",\n \"handle\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_at\": \"<dateTime>\",\n \"name\": \"<string>\",\n \"service_account\": \"<boolean>\",\n \"status\": \"<string>\",\n \"title\": \"<string>\",\n \"verified\": \"<boolean>\"\n },\n \"id\": \"<string>\",\n \"relationships\": {\n \"org\": {\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"orgs\"\n }\n },\n \"other_orgs\": {\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"orgs\"\n },\n {\n \"id\": \"<string>\",\n \"type\": \"orgs\"\n }\n ]\n },\n \"other_users\": {\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"users\"\n },\n {\n \"id\": \"<string>\",\n \"type\": \"users\"\n }\n ]\n },\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"roles\"\n },\n {\n \"id\": \"<string>\",\n \"type\": \"roles\"\n }\n ]\n }\n },\n \"type\": \"users\"\n }\n ]\n}"
},
{
"name": "Bad Request",
"originalRequest": {
"method": "PATCH",
"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 \"data\": {\n \"id\": \"<string>\",\n \"type\": \"downtime\",\n \"attributes\": {\n \"display_timezone\": \"UTC\",\n \"message\": \"<string>\",\n \"monitor_identifier\": {\n \"monitor_id\": \"<long>\"\n },\n \"mute_first_recovery_notification\": \"<boolean>\",\n \"notify_end_states\": [\n \"alert\",\n \"no data\"\n ],\n \"notify_end_types\": [\n \"canceled\",\n \"expired\"\n ],\n \"schedule\": {\n \"recurrences\": [\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n },\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n }\n ],\n \"timezone\": \"UTC\"\n },\n \"scope\": \"<string>\"\n }\n }\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/v2/downtime/:downtime_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"downtime",
":downtime_id"
],
"variable": [
{
"key": "downtime_id"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"<string>\",\n \"<string>\"\n ]\n}"
},
{
"name": "Forbidden",
"originalRequest": {
"method": "PATCH",
"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 \"data\": {\n \"id\": \"<string>\",\n \"type\": \"downtime\",\n \"attributes\": {\n \"display_timezone\": \"UTC\",\n \"message\": \"<string>\",\n \"monitor_identifier\": {\n \"monitor_id\": \"<long>\"\n },\n \"mute_first_recovery_notification\": \"<boolean>\",\n \"notify_end_states\": [\n \"alert\",\n \"no data\"\n ],\n \"notify_end_types\": [\n \"canceled\",\n \"expired\"\n ],\n \"schedule\": {\n \"recurrences\": [\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n },\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n }\n ],\n \"timezone\": \"UTC\"\n },\n \"scope\": \"<string>\"\n }\n }\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"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": "PATCH",
"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 \"data\": {\n \"id\": \"<string>\",\n \"type\": \"downtime\",\n \"attributes\": {\n \"display_timezone\": \"UTC\",\n \"message\": \"<string>\",\n \"monitor_identifier\": {\n \"monitor_id\": \"<long>\"\n },\n \"mute_first_recovery_notification\": \"<boolean>\",\n \"notify_end_states\": [\n \"alert\",\n \"no data\"\n ],\n \"notify_end_types\": [\n \"canceled\",\n \"expired\"\n ],\n \"schedule\": {\n \"recurrences\": [\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n },\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n }\n ],\n \"timezone\": \"UTC\"\n },\n \"scope\": \"<string>\"\n }\n }\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"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": "PATCH",
"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 \"data\": {\n \"id\": \"<string>\",\n \"type\": \"downtime\",\n \"attributes\": {\n \"display_timezone\": \"UTC\",\n \"message\": \"<string>\",\n \"monitor_identifier\": {\n \"monitor_id\": \"<long>\"\n },\n \"mute_first_recovery_notification\": \"<boolean>\",\n \"notify_end_states\": [\n \"alert\",\n \"no data\"\n ],\n \"notify_end_types\": [\n \"canceled\",\n \"expired\"\n ],\n \"schedule\": {\n \"recurrences\": [\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n },\n {\n \"duration\": \"<string>\",\n \"rrule\": \"<string>\",\n \"start\": \"<string>\"\n }\n ],\n \"timezone\": \"UTC\"\n },\n \"scope\": \"<string>\"\n }\n }\n}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"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}"
}
]
}