Python / Support API / Delete Custom Object
Back to Collection Items
import sys
import chilkat
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
http = chilkat.CkHttp()
http.put_BasicAuth(True)
http.put_Login("login")
http.put_Password("password")
# resp is a CkHttpResponse
resp = http.QuickRequest("DELETE","https://example.zendesk.com/api/v2/custom_objects/:custom_object_key")
if (http.get_LastMethodSuccess() == False):
print(http.lastErrorText())
sys.exit()
print(str(resp.get_StatusCode()))
print(resp.bodyStr())
Curl Command
curl -u login:password -X DELETE
https://example.zendesk.com/api/v2/custom_objects/:custom_object_key
Postman Collection Item JSON
{
"name": "Delete Custom Object",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/v2/custom_objects/:custom_object_key",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"custom_objects",
":custom_object_key"
],
"variable": [
{
"key": "custom_object_key",
"value": "<string>"
}
]
},
"description": "Permanently deletes the custom object with the specified key\n#### Allowed For\n* Admins"
},
"response": [
{
"name": "No content response",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/custom_objects/:custom_object_key",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"custom_objects",
":custom_object_key"
],
"variable": [
{
"key": "custom_object_key"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": null
}
]
}