Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
http.setRequestHeader("Accept", value: "application/json")
var resp: CkoHttpResponse? = http.quickRequest("DELETE", url: "https://api.app.ddog-gov.com/api/v2/integrations/cloudflare/accounts/:account_id")
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
var respStatusCode: Int = resp!.statusCode.intValue
print("Response Status Code = \(respStatusCode)")
if respStatusCode != 204 {
print("Response Header:")
print("\(resp!.header!)")
print("Response Body:")
print("\(resp!.bodyStr!)")
print("Failed.")
resp = nil
return
}
resp = nil
print("Success.")
}
Curl Command
curl -X DELETE
-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v2/integrations/cloudflare/accounts/:account_id
Postman Collection Item JSON
{
"name": "Delete Cloudflare account",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/integrations/cloudflare/accounts/:account_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"integrations",
"cloudflare",
"accounts",
":account_id"
],
"variable": [
{
"key": "account_id",
"value": "<string>"
}
]
},
"description": "Delete a Cloudflare account."
},
"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/integrations/cloudflare/accounts/:account_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"integrations",
"cloudflare",
"accounts",
":account_id"
],
"variable": [
{
"key": "account_id"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
},
{
"name": "Bad Request",
"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/integrations/cloudflare/accounts/:account_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"integrations",
"cloudflare",
"accounts",
":account_id"
],
"variable": [
{
"key": "account_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": "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/integrations/cloudflare/accounts/:account_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"integrations",
"cloudflare",
"accounts",
":account_id"
],
"variable": [
{
"key": "account_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": "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/integrations/cloudflare/accounts/:account_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"integrations",
"cloudflare",
"accounts",
":account_id"
],
"variable": [
{
"key": "account_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/integrations/cloudflare/accounts/:account_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"integrations",
"cloudflare",
"accounts",
":account_id"
],
"variable": [
{
"key": "account_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}"
}
]
}