Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Chilkat.Http http = new Chilkat.Http();
bool success;
http.SetRequestHeader("Accept","application/json");
Chilkat.HttpResponse resp = http.QuickRequest("DELETE","https://api.app.ddog-gov.com/api/v1/notebooks/:notebook_id");
if (http.LastMethodSuccess == false) {
Debug.WriteLine(http.LastErrorText);
return;
}
int respStatusCode = resp.StatusCode;
Debug.WriteLine("Response Status Code = " + Convert.ToString(respStatusCode));
if (respStatusCode != 204) {
Debug.WriteLine("Response Header:");
Debug.WriteLine(resp.Header);
Debug.WriteLine("Response Body:");
Debug.WriteLine(resp.BodyStr);
Debug.WriteLine("Failed.");
return;
}
Debug.WriteLine("Success.");
Curl Command
curl -X DELETE
-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/notebooks/:notebook_id
Postman Collection Item JSON
{
"name": "Delete a notebook",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"notebooks",
":notebook_id"
],
"variable": [
{
"key": "notebook_id",
"value": "-62147425"
}
]
},
"description": "Delete a notebook using the specified ID."
},
"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/v1/notebooks/:notebook_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"notebooks",
":notebook_id"
],
"variable": [
{
"key": "notebook_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/v1/notebooks/:notebook_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"notebooks",
":notebook_id"
],
"variable": [
{
"key": "notebook_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": "Authentication Error",
"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/v1/notebooks/:notebook_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"notebooks",
":notebook_id"
],
"variable": [
{
"key": "notebook_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": "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/v1/notebooks/:notebook_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"notebooks",
":notebook_id"
],
"variable": [
{
"key": "notebook_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": "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/v1/notebooks/:notebook_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"notebooks",
":notebook_id"
],
"variable": [
{
"key": "notebook_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}"
}
]
}