Atom feed of this document
 
 
 

 4.2.9. Remove Domain(s)

Verb URI Description
DELETE /domains/domainId Remove a domain from an account.
DELETE /domains?id=domainId1&id=domainId2 Remove multiple domains from an account.
DELETE /domains/domainId?deleteSubdomains=true Remove a domain and its subdomains from an account.
DELETE /domains/?id=domainId1&id=domainId2&deleteSubdomains=true Remove multiple domains and their subdomains from an account.
[Note]Note

These calls return an asynchronous response, as described in Section 3.5, “Synchronous and Asynchronous Responses”.

Normal Response Code(s): 204, 202

Error Response Code(s): dnsFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), itemNotFound (404), overLimit (413)

This call removes one or more specified domains from the account; when a domain is deleted, its immediate resource records are also deleted from the account. By default, if a deleted domain had subdomains, each subdomain becomes a root domain and is not deleted; this can be overridden by the optional deleteSubdomains parameter. Utilizing the optional deleteSubdomains parameter on domains without subdomains does not result in a failure. When a domain is deleted, any and all domain data is immediately purged and is not recoverable via the API. So on a successful delete, subsequent requests for the deleted object should return itemNotFound (404).

 

Example 4.69. Delete Domain Request: XML

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725260
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

 

Example 4.70. Delete Domain Request: JSON

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725260
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

 

Example 4.71. Delete Domains Request: XML

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains?id=2725233&id=2725257
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

 

Example 4.72. Delete Domains Request: JSON

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains?id=2725233&id=2725257
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

 

Example 4.73. Delete Domain and Subdomains Request: XML

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725260?deleteSubdomains=true
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

 

Example 4.74. Delete Domain and Subdomains Request: JSON

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725260?deleteSubdomains=true
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

 

Example 4.75. Delete Domains and Subdomains Request: XML

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains?id=2725233&id=2725257&deleteSubdomains=true
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

 

Example 4.76. Delete Domains and Subdomains Request: JSON

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains?id=2725233&id=2725257&deleteSubdomains=true
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Transactionally, delete calls behave differently than other calls in that deletes are never rolled back on exceptions, and multiple deletes in the same request do not fail as a group. Instead, each delete is attempted even if one or more fail. The response for a delete request in which one or more items fail contains information regarding which items failed as well as information regarding specific issues that caused the failure(s). See the examples that follow.

 

Example 4.77. Delete Domains and Subdomains Response (Failure): XML

Status: 204 No Content
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 692

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deletefault code="500" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0">
    <message>One or more items could not be deleted.</message>
    <details>See errors list for details.</details>
    <failedItems>
        <fault code="404">
            <message>Object not Found.</message>
            <details>Domain ID: 1111111</details>
        </fault>
        <fault code="404">
            <message>Object not Found.</message>
            <details>Domain ID: 111114</details>
        </fault>
    </failedItems>
</deletefault>

 

Example 4.78. Delete Domains and Subdomains Response (Failure): JSON

Status: 204 No Content
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 377

{
  "failedItems" : {
    "faults" : [ {
      "details" : "Domain ID: 1111111",
      "code" : 404,
      "message" : "Object not Found."
    }, {
      "details" : "Domain ID: 111114",
      "code" : 404,
      "message" : "Object not Found."
    } ]
  },
  "details" : "See errors list for details.",
  "code" : 500,
  "message" : "One or more items could not be deleted."
}

In the previous two response examples, the requested domain objects could not be deleted, since they were not found.



loading table of contents...