Domains operations

List domains

GET /v1.0/{account}/domains

Lists all domains manageable by the account specified. Displays IDs and names only.

These calls provide a list of all DNS domains manageable by a given account. The resulting list is flat, and does not break the domains down hierarchically by subdomain. All representative domains are included in the list, even if a domain is conceptually a subdomain of another domain in the list.

ℹ️

These calls return by default a maximum of 100 items at a time if no limit is specified. To navigate the collection returned, the parameters limit and offset can be set in the URI (for example: limit=10 & offset=0 ), as described in Paginated collections.

In the examples that follow, the request is made for a limit of 10 records, starting at offset 20 (record 21).

ℹ️

Because the current set of 10 records in the previous response examples begins at offset=20, note that the previous link points to a group of 10 records starting at offset=10, while the next link points to a group of 10 records starting at offset=30.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200SuccessRequest succeeded.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This operation does not accept a request body.

Example List domains: XML request

GET <https://dns.api.rackspacecloud.com/v1.0/1234/domains?limit=10&offset=20>  
Accept: application/xml  
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812  
Content-Type: application/xml  
Content-Length: 0

Example List domains: JSON request

GET <https://dns.api.rackspacecloud.com/v1.0/1234/domains?limit=10&offset=20>  
Accept: application/json  
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812  
Content-Type: application/json  
Content-Length: 0

Response


Example List domains: XML response

Status: 200 OK  
Date: Thu, 28 Jul 2011 21:54:21 GMT  
X-API-VERSION: 1.0.17  
Content-Type: application/xml  
Content-Length: 2501

<?xml version="1.0" encoding="utf-8"?>
<Domains>
    <totalEntries>114</totalEntries>
    <domains>
        <domains>
            <id>2725233</id>
            <accountId>1234</accountId>
            <name>example.com</name>
            <emailAddress>[email protected]</emailAddress>
            <updated>2011-06-24T01:23:15Z</updated>
            <created>2011-06-24T01:12:51Z</created>
            <comment>Optional domain comment..</comment>
        </domains>
        <domains>
            <id>2725257</id>
            <accountId>1234</accountId>
            <name>sub1.example.com</name>
            <emailAddress>[email protected]</emailAddress>
            <updated>2011-06-23T03:09:34Z</updated>
            <created>2011-06-23T03:09:33Z</created>
            <comment>1st sample subdomain</comment>
        </domains>
        <domains>
            <id>2725258</id>
            <accountId>1234</accountId>
            <name>sub2.example.com</name>
            <emailAddress>[email protected]</emailAddress>
            <updated>2011-06-23T03:52:55Z</updated>
            <created>2011-06-23T03:52:55Z</created>
            <comment>1st sample subdomain</comment>
        </domains>
        <domains>
            <id>2725260</id>
            <accountId>1234</accountId>
            <name>north.example.com</name>
            <emailAddress>[email protected]</emailAddress>
            <updated>2011-06-23T03:53:10Z</updated>
            <created>2011-06-23T03:53:09Z</created>
        </domains>
        <domains>
            <id>2725261</id>
            <accountId>1234</accountId>
            <name>south.example.com</name>
            <emailAddress>[email protected]</emailAddress>
            <updated>2011-06-23T03:53:14Z</updated>
            <created>2011-06-23T03:53:14Z</created>
            <comment>Final sample subdomain</comment>
        </domains>
        <domains>
            <id>2725352</id>
            <accountId>1234</accountId>
            <name>region2.example.net</name>
            <updated>2011-06-23T20:21:06Z</updated>
            <created>2011-06-23T19:24:27Z</created>
        </domains>
        <domains> 
            <id>2718984</id>
            <accountId>1234</accountId>
            <name>example.org</name>
            <updated>2011-05-03T14:47:32Z</updated>
            <created>2011-05-03T14:47:30Z</created>
        </domains>
        <domains> 
            <id>2722346</id>
            <accountId>1234</accountId>
            <name>rackspace.example</name>
            <updated>2011-06-21T15:54:31Z</updated>
            <created>2011-06-15T19:02:07Z</created>
        </domains>
        <domains>
            <id>2722347</id>
            <accountId>1234</accountId>
            <name>dnsaas.example</name>
            <updated>2011-06-21T15:54:31Z</updated>
            <created>2011-06-15T19:02:07Z</created>
            <comment>Sample comment</comment>
        </domains>
    </domains>
</Domains>

Example List domains: JSON response

Status: 200 OK  
Date: Thu, 28 Jul 2011 21:54:21 GMT  
X-API-VERSION: 1.0.17  
Content-Type: application/json  
Content-Length: 2364

{  
  "domains" : [ {  
    "name" : "example.com",  
    "id" : "2725233",  
    "comment" : "Optional domain comment...",  
    "updated" : "2011-06-24T01:23:15.000+0000",  
    "accountId" : "1234",  
    "emailAddress" : "[email protected]",  
    "created" : "2011-06-24T01:12:51.000+0000"  
  }, {  
    "name" : "sub1.example.com",  
    "id" : "2725257",  
    "comment" : "1st sample subdomain",  
    "updated" : "2011-06-23T03:09:34.000+0000",  
    "accountId" : "1234",  
    "emailAddress" : "[email protected]",  
    "created" : "2011-06-23T03:09:33.000+0000"  
  }, {  
    "name" : "sub2.example.com",  
    "id" : "2725258",  
    "comment" : "1st sample subdomain",  
    "updated" : "2011-06-23T03:52:55.000+0000",  
    "accountId" : "1234",  
    "emailAddress" : "[email protected]",  
    "created" : "2011-06-23T03:52:55.000+0000"  
  }, {  
    "name" : "north.example.com",  
    "id" : "2725260",  
    "updated" : "2011-06-23T03:53:10.000+0000",  
    "accountId" : "1234",  
    "emailAddress" : "[email protected]",  
    "created" : "2011-06-23T03:53:09.000+0000"  
  }, {  
    "name" : "south.example.com",  
    "id" : "2725261",  
    "comment" : "Final sample subdomain",  
    "updated" : "2011-06-23T03:53:14.000+0000",  
    "accountId" : "1234",  
    "emailAddress" : "[email protected]",  
    "created" : "2011-06-23T03:53:14.000+0000"  
  }, {  
    "name" : "region2.example.net",  
    "id" : "2725352",  
    "updated" : "2011-06-23T20:21:06.000+0000",  
    "accountId" : "1234",  
    "created" : "2011-06-23T19:24:27.000+0000"  
  }, {  
    "name" : "example.org",  
    "id" : "2718984",  
    "updated" : "2011-05-03T14:47:32.000+0000",  
    "accountId" : "1234",  
    "created" : "2011-05-03T14:47:30.000+0000"  
  }, {  
    "name" : "rackspace.example",  
    "id" : "2722346",  
    "updated" : "2011-06-21T15:54:31.000+0000",  
    "accountId" : "1234",  
    "created" : "2011-06-15T19:02:07.000+0000"  
  }, {  
    "name" : "dnsaas.example",  
    "id" : "2722347",  
    "comment" : "Sample comment",  
    "updated" : "2011-06-21T15:54:31.000+0000",  
    "accountId" : "1234",  
    "created" : "2011-06-15T19:02:07.000+0000"  
  } ],  
  "links" : [ {  
    "content" : "",  
    "href" : "https://dns.api.rackspacecloud.com/v1.0/1234/domains?limit=10&offset=10",  
    "rel" : "previous"  
  }, {  
    "content" : "",  
    "href" : "https://dns.api.rackspacecloud.com/v1.0/1234/domains?limit=10&offset=30",  
    "rel" : "next"  
  } ],  
  "totalEntries" : 114  
}

List domains by name

GET /v1.0/{account}/domains

Filters domains by domain name: list all domains manageable by the account specified that exactly match the value of the name parameter.

Note that you can use the query parameter name to filter domains by domain name: list all domains manageable by the account specified that exactly match the fully qualified value of the name parameter. Note that if there is no exact match, no results are returned.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200SuccessRequest succeeded.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This table shows the query parameters for the request:

NameTypeDescription
nameStringName of the domain to find.

This operation does not accept a request body.

Example Filter by Fully Qualified domain Name: XML request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=region2.example.net
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example Filter by Fully Qualified domain Name: JSON request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=region2.example.net
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Example Filter by Fully Qualified Subdomain Name: XML request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=sub1.example.com
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example Filter by Fully Qualified Subdomain Name: JSON request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=sub1.example.com
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Response


Example Filter by Fully Qualified domain Name: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 371

<?xml version="1.0" encoding="utf-8"?>
<Domains>
    <totalEntries>1</totalEntries>
    <domains>
        <domains>
            <id>2725352</id>
            <accountId>1234</accountId>
            <name>region2.example.net</name>
            <updated>2011-06-23T20:21:06Z</updated>
            <created>2011-06-23T19:24:27Z</created>
        </domains>
    </domains>
</Domains>

Example Filter by Fully Qualified domain Name: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 220

{
  "domains" : [ {
    "name" : "region2.example.net",
    "id" : "2725352",
    "accountId": "1234",
    "updated" : "2011-06-23T20:21:06.000+0000",
    "created" : "2011-06-23T19:24:27.000+0000"
  } ],
  "totalEntries" : 1
}

Example Filter by Fully Qualified Subdomain Name: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 292

<?xml version="1.0" encoding="utf-8"?>
<Domains>
    <totalEntries>1</totalEntries>
    <domains>
        <domains>
            <id>2725257</id>
            <accountId>1234</accountId>
            <name>sub1.example.com</name>
            <emailAddress>[email protected]</emailAddress>
            <updated>2011-06-23T03:09:34Z</updated>
            <created>2011-06-23T03:09:33Z</created>
            <comment>1st sample subdomain</comment>
        </domains>
    </domains>
</Domains>

Example Filter by Fully Qualified Subdomain Name: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 284

{
  "domains" : [ {
    "name" : "sub1.example.com",
    "id" : "2725257",
    "accountId": "1234",
    "comment" : "1st sample subdomain",
    "updated" : "2011-06-23T03:09:34.000+0000",
    "emailAddress" : "[email protected]",
    "created" : "2011-06-23T03:09:33.000+0000"
  } ],
  "totalEntries" : 1
}

Create domain

POST /v1.0/{account}/domains

Creates a domain with the configuration defined by the request.

ℹ️

This call returns an asynchronous response, See Synchronous and asynchronous responses for more details and examples of the way that asynchronous responses work.

ℹ️

Subdomains are also created the same way as domains.

This call provisions one or more new DNS domains under the account specified, based on the configuration defined in the request object. If the corresponding request cannot be fulfilled due to insufficient or invalid data, an HTTP 400 (Bad Request) error response will be returned with information regarding the nature of the failure in the body of the response. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure and POST the request again.

ℹ️

Notes

  • Refer to DNS propagation for information about DNS propagation.
  • If you attempt to create a domain that already exists, the API will return an exception saying that the domain already exists.
  • This process allows multiple records to be created along with the domain. This is an atomic operation: if there is a failure in creation of even a single record, the entire process will fail.
  • When a domain is created, and no Time To Live (TTL) is specified, the SOA minTTL (3600 seconds) is used as the default. When a record is added without a specified TTL, it will receive the domain TTL by default. When the domain or record TTL is supplied by the user, either via a create or update call, the TTL values must be 300 seconds or more.
  • Subdomains are managed in separate zone files in the DNS system and will add some overhead to domain management.

The following examples show the Create domains requests:

ℹ️

The following examples show the initial 202 Accepted response for the asynchronous call and indicate that the task has been accepted for processing. See Synchronous and asynchronous responses for a description of how the asynchronous call works. See also Creating a domain.

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
409Already ExistsThe item already exists.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This table shows the body parameters for the request:

NameTypeDescription
domains[*].nameStringThe name for the domain or subdomain. Must be a valid domain name.
domains[*].emailAddressStringEmail address to use for contacting the domain administrator.
domains[*].ttlInteger (Optional)If specified, must be greater than or equal to 300. The default value, if not specified, is 3600.
domains[*].commentString (Optional)If included, its length must be less than or equal to 160 characters.

Example Create domains: JSON request

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

{  
  "domains" : [ {  
    "name" : "example.com",  
    "comment" : "Optional domain comment...",  
    "recordsList" : {  
      "records" : [ {  
        "name" : "ftp.example.com",  
        "type" : "A",  
        "data" : "192.0.2.8",  
        "ttl" : 5771  
      }, {  
        "name" : "example.com",  
        "type" : "A",  
        "data" : "192.0.2.17",  
        "ttl" : 86400  
      }, {  
        "name" : "example.com",  
        "type" : "NS",  
        "data" : "ns.rackspace.com",  
        "ttl" : 3600  
      }, {  
        "name" : "example.com",  
        "type" : "NS",  
        "data" : "ns2.rackspace.com",  
        "ttl" : 3600  
      }, {  
        "name" : "example.com",  
        "priority" : 5,  
        "type" : "MX",  
        "data" : "mail.example.com",  
        "ttl" : 3600  
      }, {  
        "name" : "www.example.com",  
        "type" : "CNAME",  
        "comment" : "This is a comment on the CNAME record",  
        "data" : "example.com",  
        "ttl" : 5400  
      } ]  
    },  
    "subdomains" : {  
      "domains" : \[ {  
        "name" : "sub1.example.com",  
        "comment" : "1st sample subdomain",  
        "emailAddress" : "[email protected]"  
      }, {  
        "name" : "sub2.example.com",  
        "comment" : "1st sample subdomain",  
        "emailAddress" : "[email protected]"  
      }, {  
        "name" : "north.example.com",  
        "emailAddress" : "[email protected]"  
      }, {  
        "name" : "south.example.com",  
        "comment" : "Final sample subdomain",  
        "emailAddress" : "[email protected]"  
      } \]  
    },  
    "ttl" : 3600,  
    "emailAddress" : "[email protected]"  
  } \]  
}

Response


This operation does not return a synchronous response body.

Update domains

PUT /v1.0/{account}/domains

Updates the configurations of multiple domains.

ℹ️

This call returns an asynchronous response, as described in Synchronous and asynchronous responses.

This call modifies DNS domain(s) attributes only. Records cannot be added, modified, or deleted. Only the TTL, email address and comment attributes of a domain can be modified.

If a request cannot be fulfilled due to insufficient or invalid data, an HTTP 400 (Bad Request) error response will be returned with information regarding the nature of the failure in the body of the response. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure and POST the request again.

ℹ️

Notes

  • Refer to DNS propagation for information about DNS propagation.
  • A domain’s id is immutable.
  • When the domain or record TTL is supplied by the user, either via a create or update call, the TTL values must be 300 seconds or more.

ℹ️

name cannot be specified, because the domain name cannot be modified.

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
409Already ExistsThe item already exists.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This table shows the body parameters for the request:

NameTypeDescription
domains[*].idString (Required)For modifying multiple domains, the id for each domain must be specified as an attribute.
domains[*].emailAddressStringEmail address to use for contacting the domain administrator.
domains[*].ttlInteger (Optional)If specified, must be greater than or equal to 300. The default value, if not specified, is 3600.
domains[*].commentString (Optional)If included, its length must be less than or equal to 160 characters.

Example Update domains: JSON request

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

{
  "domains" : [ {
    "id" : "2725233",
    "comment" : "Optional domain comment...",
    "ttl" : 3600,
    "emailAddress" : "[email protected]"
  }, {
    "id" : "2725257",
    "comment" : "1st sample subdomain",
    "emailAddress" : "[email protected]"
  } ]
}

Response


This operation does not return a synchronous response body.

Delete domains

DELETE /v1.0/{account}/domains

Deletes multiple domains from an account.

ℹ️

This call returns an asynchronous response, as described in Synchronous and asynchronous responses.

This call deletes 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 ).

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.

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

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This table shows the query parameters for the request:

NameTypeDescription
id1StringThe id for the first domain.
id2StringThe id for the next domain.

This operation does not accept a request body.

Example Delete domains: XML request

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 Delete domains: JSON request

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

Response


This operation does not return a synchronous response body.

Delete domains and subdomains

DELETE /v1.0/{account}/domains

Deletes multiple domains and their subdomains from an account.

ℹ️

This call returns an asynchronous response, as described in Synchronous and asynchronous responses.

This call deletes 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 ).

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.

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

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This table shows the query parameters for the request:

NameTypeDescription
id1Stringid for the first domain.
id2Stringid for the next domain.
deleteSubdomainsStringIf deleteSubdomains is true, also deletes subdomains. If false, subdomains are not deleted.

This operation does not accept a request body.

Example Delete domains and subdomains: XML request

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 Delete domains and subdomains: JSON request

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

Response


This operation does not return a synchronous response body.

Search domains

GET /v1.0/{account}/domains/search

Searches domains by domain name: lists all names manageable by the specified account that have the value of the name parameter as part of their name.

ℹ️

Notes

  • Use the query parameter name to search domains by domain name. This lists all names manageable by the specified account that have the value of the name parameter as part of their name.
  • The value specified for the name parameter must contain at least 3 characters or nothing will be returned by the search.

Filter criteria may consist of:

  • Any letter (A-Za-z)
  • Numbers (0-9)
  • Hyphen (“-“)
  • 3 to 63 characters

Filter criteria should not include any of the following characters: ‘ +, | ! ” £ $ % & / ( ) = ? ^ * ç ° § ; : _ > ] [ @ à, é, ò

ℹ️

This call returns by default a maximum of 100 items at a time if no limit is specified. To navigate the collection returned, the parameters limit and offset can be set in the URI (for example: limit=10 & offset=0 ), as described at Paginated collections.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200SuccessRequest succeeded.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This table shows the query parameters for the request:

NameTypeDescription
nameStringName of the domain to find.

This operation does not accept a request body.

Example Filter by Partial Name: XML request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains/search?name=sub1.exam
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example Filter by Partial Name: JSON request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains/search?name=sub1.exam
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Response


Example Filter by Partial Name: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 435

<?xml version="1.0" encoding="utf-8"?>
<Domains>
    <totalEntries>1</totalEntries>
    <domains>
        <domains>
            <id>2725257</id>
            <accountId>1234</accountId>
            <name>sub1.example.com</name>
            <emailAddress>[email protected]</emailAddress>
            <updated>2011-06-23T03:09:34Z</updated>
            <created>2011-06-23T03:09:33Z</created>
            <comment>1st sample subdomain</comment>
        </domains>
    </domains>
</Domains>

Example Filter by Partial Name: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 284

{
  "domains" : [ {
    "name" : "sub1.example.com",
    "id" : "2725257",
    "accountId" : "1234",
    "comment" : "1st sample subdomain",
    "updated" : "2011-06-23T03:09:34.000+0000",
    "emailAddress" : "[email protected]",
    "created" : "2011-06-23T03:09:33.000+0000"
  } ],
  "totalEntries" : 1
}

List domain details without subdomains

GET /v1.0/{account}/domains/{domainId}

Lists details for a specified domain, with record information but without subdomains.

This call provides the detailed output for a specified domain configured and associated with an account. This call is not capable of returning details for a domain that has been deleted.

This call does not require a request body.

ℹ️

By default, returns a maximum of 100 items at a time if no limit is specified. To navigate the collection returned, the parameters limit and offset can be set in the URI (for example: limit=10 & offset=0 ), as described in Paginated collections.

The following examples show the default parameter settings ( showRecords = true & showSubdomains = false ) for the List domain details call. This call returns information with records but no information about subdomains. Because these parameter values are the defaults, this call works the same way if both of the parameters are omitted.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200SuccessRequest succeeded.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This operation does not accept a request body.

Example List domain details with records, no subdomains: XML request

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

Example List domain details with records, no subdomains: JSON request

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

Response


Example List domain details with records, no subdomains: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 1710

<accountId>1234</accountId>
<created>2011-06-24T01:12:51Z</created>
<updated>2011-06-24T01:23:15Z</updated>
<id>2725233</id>
<emailAddress>[email protected]</emailAddress>
<ttl>3600</ttl>
<name>example.com</name>
<comment>Optional domain comment...</comment>
<nameservers>
    <name>ns.rackspace.com</name>
</nameservers>
<nameservers>
    <name>ns2.rackspace.com</name>
</nameservers>
<recordsList>
    <totalEntries>6</totalEntries>
    <records>
        <id>A-6817754</id>
        <name>ftp.example.com</name>
        <type>A</type>
        <data>192.0.2.8</data>
        <ttl>5771</ttl>
        <updated>2011-05-19T08:07:08-05:00</updated>
        <created>2011-05-18T14:53:09-05:00</created>
    </records>
    <records>
        <id>A-6822994</id>
        <name>example.com</name>
        <type>A</type>
        <data>192.0.2.17</data>
        <ttl>86400</ttl>
        <updated>2011-06-24T01:12:52Z</updated>
        <created>2011-06-24T01:12:52Z</created>
    </records>
    <records>
        <id>NS-6251982</id>
        <name>example.com</name>
        <type>NS</type>
        <data>ns.rackspace.com</data>
        <ttl>86400</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>NS-6251983</id>
        <name>example.com</name>
        <type>NS</type>
        <data>ns2.rackspace.com</data>
        <ttl>3600</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>MX-3151218</id>
        <name>example.com</name>
        <type>MX</type>
        <data>mail.example.com</data>
        <ttl>3600</ttl>
        <priority>5</priority>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>CNAME-9778009</id>
        <name>www.example.com</name>
        <type>CNAME</type>
        <data>example.com</data>
        <ttl>5400</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
        <comment>This is a comment on the CNAME record</comment>
    </records>
</recordsList>

Example List domain details with records, no subdomains: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 1975

{
  "name" : "example.com",
  "id" : "2725233",
  "comment" : "Optional domain comment...",
  "updated" : "2011-06-24T01:23:15.000+0000",
  "nameservers" : [ {
    "name" : "ns.rackspace.com"
  }, {
    "name" : "ns2.rackspace.com"
  } ],
  "accountId" : "1234",
  "recordsList" : {
    "totalEntries" : 6,
    "records" : [ {
      "name" : "ftp.example.com",
      "id" : "A-6817754",
      "type" : "A",
      "data" : "192.0.2.8",
      "updated" : "2011-05-19T13:07:08.000+0000",
      "ttl" : 5771,
      "created" : "2011-05-18T19:53:09.000+0000"
    }, {
      "name" : "example.com",
      "id" : "A-6822994",
      "type" : "A",
      "data" : "192.0.2.17",
      "updated" : "2011-06-24T01:12:52.000+0000",
      "ttl" : 86400,
      "created" : "2011-06-24T01:12:52.000+0000"
    }, {
      "name" : "example.com",
      "id" : "NS-6251982",
      "type" : "NS",
      "data" : "ns.rackspace.com",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:51.000+0000"
    }, {
      "name" : "example.com",
      "id" : "NS-6251983",
      "type" : "NS",
      "data" : "ns2.rackspace.com",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:51.000+0000"
    }, {
      "name" : "example.com",
      "priority" : 5,
      "id" : "MX-3151218",
      "type" : "MX",
      "data" : "mail.example.com",
      "updated" : "2011-06-24T01:12:53.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:53.000+0000"
    }, {
      "name" : "www.example.com",
      "id" : "CNAME-9778009",
      "type" : "CNAME",
      "comment" : "This is a comment on the CNAME record",
      "data" : "example.com",
      "updated" : "2011-06-24T01:12:54.000+0000",
      "ttl" : 5400,
      "created" : "2011-06-24T01:12:54.000+0000"
    } ]
  },
  "ttl" : 3600,
  "emailAddress" : "[email protected]",
  "created" : "2011-06-24T01:12:51.000+0000"
}

Show domain

GET /v1.0/{account}/domains/{domainId}

Shows details for a specified domain. Displays details, as specified by the showRecords and showSubdomains parameters.

This call provides the detailed output for a specified domain configured and associated with an account. This call is not capable of returning details for a domain that has been deleted.

This call does not require a request body.

ℹ️

By default, returns a maximum of 100 items at a time if no limit is specified. To navigate the collection returned, the parameters limit and offset can be set in the URI (for example: limit=10 & offset=0 ), as described in Paginated collections.

Two parameters are available to specify the information about subdomains and records to be returned by the List domain details call:

  • showRecords - if this parameter is set to true, then information
    out records is returned; if this parameter is set to false, then information about records is not returned.
  • showSubdomains - if this parameter is set to true, then information
    about subdomains is returned; if this parameter is set to false, then information about subdomains is not returned.

The following examples show the parameter settings to return information for both records and subdomains ( showSubdomains = true & showRecords = true ) for the List domain details call.

The examples also show the parameter settings to return basic information only, without records or subdomains ( showRecords = false & showSubdomains = false ) for the List domain details call.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200SuccessRequest succeeded.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This table shows the query parameters for the request:

NameTypeDescription
showRecordsStringIf showRecords is set to true, information about records is returned. If showRecords is set to false, information about records is not returned.
showSubdomainsStringIf showSubdomains is set to true, information about subdomains is returned. If showSubdomains is set to false, information about subdomains is not returned.

This operation does not accept a request body.

Example List domain details with records, no subdomains: XML request

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

Example List domain details with records, no subdomains: JSON request

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

Example List domain details with records and subdomains: XML request

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

Example List domain details with records and subdomains: JSON request

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

Example List domain details, no records, no subdomains: XML request

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

Example List domain details, no records, no subdomains: JSON request

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

Response


Example List domain details with records, no subdomains: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 1710

<accountId>1234</accountId>
<created>2011-06-24T01:12:51Z</created>
<updated>2011-06-24T01:23:15Z</updated>
<id>2725233</id>
<emailAddress>[email protected]</emailAddress>
<ttl>3600</ttl>
<name>example.com</name>
<comment>Optional domain comment...</comment>
<nameservers>
    <name>ns.rackspace.com</name>
</nameservers>
<nameservers>
    <name>ns2.rackspace.com</name>
</nameservers>
<recordsList>
    <totalEntries>6</totalEntries>
    <records>
        <id>A-6817754</id>
        <name>ftp.example.com</name>
        <type>A</type>
        <data>192.0.2.8</data>
        <ttl>5771</ttl>
        <updated>2011-05-19T08:07:08-05:00</updated>
        <created>2011-05-18T14:53:09-05:00</created>
    </records>
    <records>
        <id>A-6822994</id>
        <name>example.com</name>
        <type>A</type>
        <data>192.0.2.17</data>
        <ttl>86400</ttl>
        <updated>2011-06-24T01:12:52Z</updated>
        <created>2011-06-24T01:12:52Z</created>
    </records>
    <records>
        <id>NS-6251982</id>
        <name>example.com</name>
        <type>NS</type>
        <data>ns.rackspace.com</data>
        <ttl>86400</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>NS-6251983</id>
        <name>example.com</name>
        <type>NS</type>
        <data>ns2.rackspace.com</data>
        <ttl>3600</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>MX-3151218</id>
        <name>example.com</name>
        <type>MX</type>
        <data>mail.example.com</data>
        <ttl>3600</ttl>
        <priority>5</priority>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>CNAME-9778009</id>
        <name>www.example.com</name>
        <type>CNAME</type>
        <data>example.com</data>
        <ttl>5400</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
        <comment>This is a comment on the CNAME record</comment>
    </records>
</recordsList>

Example List domain details with records, no subdomains: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 1975

{
  "name" : "example.com",
  "id" : "2725233",
  "comment" : "Optional domain comment...",
  "updated" : "2011-06-24T01:23:15.000+0000",
  "nameservers" : [ {
    "name" : "ns.rackspace.com"
  }, {
    "name" : "ns2.rackspace.com"
  } ],
  "accountId" : "1234",
  "recordsList" : {
    "totalEntries" : 6,
    "records" : [ {
      "name" : "ftp.example.com",
      "id" : "A-6817754",
      "type" : "A",
      "data" : "192.0.2.8",
      "updated" : "2011-05-19T13:07:08.000+0000",
      "ttl" : 5771,
      "created" : "2011-05-18T19:53:09.000+0000"
    }, {
      "name" : "example.com",
      "id" : "A-6822994",
      "type" : "A",
      "data" : "192.0.2.17",
      "updated" : "2011-06-24T01:12:52.000+0000",
      "ttl" : 86400,
      "created" : "2011-06-24T01:12:52.000+0000"
    }, {
      "name" : "example.com",
      "id" : "NS-6251982",
      "type" : "NS",
      "data" : "ns.rackspace.com",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:51.000+0000"
    }, {
      "name" : "example.com",
      "id" : "NS-6251983",
      "type" : "NS",
      "data" : "ns2.rackspace.com",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:51.000+0000"
    }, {
      "name" : "example.com",
      "priority" : 5,
      "id" : "MX-3151218",
      "type" : "MX",
      "data" : "mail.example.com",
      "updated" : "2011-06-24T01:12:53.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:53.000+0000"
    }, {
      "name" : "www.example.com",
      "id" : "CNAME-9778009",
      "type" : "CNAME",
      "comment" : "This is a comment on the CNAME record",
      "data" : "example.com",
      "updated" : "2011-06-24T01:12:54.000+0000",
      "ttl" : 5400,
      "created" : "2011-06-24T01:12:54.000+0000"
    }]
  },
  "ttl" : 3600,
  "emailAddress" : "[email protected]",
  "created" : "2011-06-24T01:12:51.000+0000"
}

Example List domain details with records and subdomains: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 3044

<accountId>1234</accountId>
<created>2011-06-24T01:12:51Z</created>
<updated>2011-06-24T01:23:15Z</updated>
<id>2725233</id>
<emailAddress>[email protected]</emailAddress>
<ttl>3600</ttl>
<name>example.com</name>
<comment>Optional domain comment...</comment>
<nameservers>
    <name>ns.rackspace.com</name>
</nameservers>
<nameservers>
    <name>ns2.rackspace.com</name>
</nameservers>
<recordsList>
    <totalEntries>6</totalEntries>
    <records>
        <id>A-6817754</id>
        <name>ftp.example.com</name>
        <type>A</type>
        <data>192.0.2.8</data>
        <ttl>5771</ttl>
        <updated>2011-05-19T08:07:08-05:00</updated>
        <created>2011-05-18T14:53:09-05:00</created>
    </records>
    <records>
        <id>A-6822994</id>
        <name>example.com</name>
        <type>A</type>
        <data>192.0.2.17</data>
        <ttl>86400</ttl>
        <updated>2011-06-24T01:12:52Z</updated>
        <created>2011-06-24T01:12:52Z</created>
    </records>
    <records>
        <id>NS-6251982</id>
        <name>example.com</name>
        <type>NS</type>
        <data>ns.rackspace.com</data>
        <ttl>86400</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>NS-6251983</id>
        <name>example.com</name>
        <type>NS</type>
        <data>ns2.rackspace.com</data>
        <ttl>3600</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>MX-3151218</id>
        <name>example.com</name>
        <type>MX</type>
        <data>mail.example.com</data>
        <ttl>3600</ttl>
        <priority>5</priority>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
    </records>
    <records>
        <id>CNAME-9778009</id>
        <name>www.example.com</name>
        <type>CNAME</type>
        <data>example.com</data>
        <ttl>5400</ttl>
        <updated>2011-06-24T01:12:51Z</updated>
        <created>2011-06-24T01:12:51Z</created>
        <comment>This is a comment on the CNAME record</comment>
    </records>
</recordsList>
<subdomains>
    <domains>
        <id>2725257</id>
        <name>sub1.example.com</name>
        <comment>1st sample subdomain</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2011-06-23T03:09:34Z</updated>
        <created>2011-06-23T03:09:33Z</created>
    </domains>
    <domains>
        <id>2725258</id>
        <name>sub2.example.com</name>
        <comment>1st sample subdomain</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2011-06-23T03:52:55Z</updated>
        <created>2011-06-23T03:52:55Z</created>
    </domains>
    <domains>
        <id>2725260</id>
        <name>north.example.com</name>
        <emailAddress>[email protected]</emailAddress>
        <updated>2011-06-23T03:53:10Z</updated>
        <created>2011-06-23T03:53:09Z</created>
    </domains>
    <domains>
        <id>2725261</id>
        <name>south.example.com</name>
        <emailAddress>[email protected]</emailAddress>
        <updated>2011-06-23T03:53:14Z</updated>
        <created>2011-06-23T03:53:14Z</created>
        <comment>Final sample subdomain</comment>
    </domains>
</subdomains>

Example List domain details with records and subdomains: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 3002

{
  "name" : "example.com",
  "id" : "2725233",
  "comment" : "Optional domain comment...",
  "updated" : "2011-06-24T01:23:15.000+0000",
  "nameservers" : [ {
    "name" : "ns.rackspace.com"
  }, {
    "name" : "ns2.rackspace.com"
  } ],
  "accountId" : "1234",
  "recordsList" : {
    "totalEntries" : 6,
    "records" : [ {
      "name" : "ftp.example.com",
      "id" : "A-6817754",
      "type" : "A",
      "data" : "192.0.2.8",
      "updated" : "2011-05-19T13:07:08.000+0000",
      "ttl" : 5771,
      "created" : "2011-05-18T19:53:09.000+0000"
    }, {
      "name" : "example.com",
      "id" : "A-6822994",
      "type" : "A",
      "data" : "192.0.2.17",
      "updated" : "2011-06-24T01:12:52.000+0000",
      "ttl" : 86400,
      "created" : "2011-06-24T01:12:52.000+0000"
    }, {
      "name" : "example.com",
      "id" : "NS-6251982",
      "type" : "NS",
      "data" : "ns.rackspace.com",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:51.000+0000"
    }, {
      "name" : "example.com",
      "id" : "NS-6251983",
      "type" : "NS",
      "data" : "ns2.rackspace.com",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:51.000+0000"
    }, {
      "name" : "example.com",
      "priority" : 5,
      "id" : "MX-3151218",
      "type" : "MX",
      "data" : "mail.example.com",
      "updated" : "2011-06-24T01:12:53.000+0000",
      "ttl" : 3600,
      "created" : "2011-06-24T01:12:53.000+0000"
    }, {
      "name" : "www.example.com",
      "id" : "CNAME-9778009",
      "type" : "CNAME",
      "comment" : "This is a comment on the CNAME record",
      "data" : "example.com",
      "updated" : "2011-06-24T01:12:54.000+0000",
      "ttl" : 5400,
      "created" : "2011-06-24T01:12:54.000+0000"
    } ]
  },
  "subdomains" : {
    "domains" : [ {
      "name" : "sub1.example.com",
      "id" : "2725257",
      "comment" : "1st sample subdomain",
      "updated" : "2011-06-23T03:09:34.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2011-06-23T03:09:33.000+0000"
    }, {
      "name" : "sub2.example.com",
      "id" : "2725258",
      "comment" : "1st sample subdomain",
      "updated" : "2011-06-23T03:52:55.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2011-06-23T03:52:55.000+0000"
    }, {
      "name" : "north.example.com",
      "id" : "2725260",
      "updated" : "2011-06-23T03:53:10.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2011-06-23T03:53:09.000+0000"
    }, {
      "name" : "south.example.com",
      "id" : "2725261",
      "comment" : "Final sample subdomain",
      "updated" : "2011-06-23T03:53:14.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2011-06-23T03:53:14.000+0000"
    } ],
  },
  "ttl" : 3600,
  "emailAddress" : "[email protected]",
  "created" : "2011-06-24T01:12:51.000+0000"
}

Example List domain details, no records, no subdomains: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 570

<accountId>1234</accountId>
<created>2011-06-24T01:12:51Z</created>
<updated>2011-06-24T01:23:15Z</updated>
<id>2725233</id>
<emailAddress>[email protected]</emailAddress>
<ttl>3600</ttl>
<name>example.com</name>
<comment>Optional domain comment...</comment>
<nameservers>
    <name>ns.rackspace.com</name>
</nameservers>
<nameservers>
    <name>ns2.rackspace.com</name>
</nameservers>

Example List domain details, no records, no subdomains: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 375

{
  "name" : "example.com",
  "id" : "2725233",
  "comment" : "Optional domain comment...",
  "updated" : "2011-06-24T01:23:15.000+0000",
  "nameservers" : [ {
    "name" : "ns.rackspace.com"
  }, {
    "name" : "ns2.rackspace.com"
  } ],
  "accountId" : "1234",
  "ttl" : 3600,
  "emailAddress" : "[email protected]",
  "created" : "2011-06-24T01:12:51.000+0000"
}

Update domain

PUT /v1.0/{account}/domains/{domainId}

Updates the configuration of a domain.

ℹ️

This call returns an asynchronous response. Refer to Synchronous and asynchronous responses for more details and examples of the way that asynchronous responses work.

This call modifies DNS domain(s) attributes only. records cannot be added, modified, or Deleted. Only the TTL, email address and comment attributes of a domain can be modified.

If a request cannot be fulfilled due to insufficient or invalid data, an HTTP 400 (Bad Request) error response will be returned with information regarding the nature of the failure in the body of the response. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure and POST the request again.

ℹ️

Notes

  • Refer to the section “DNS Propagation” in the Devguide for information about DNS propagation.
  • A domain’s id is immutable.
  • When the domain or record TTL is supplied by the user, either via a create or update call, the TTL values must be 300 seconds or more.
  • name cannot be specified, because the domain name cannot be modified.

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This table shows the body parameters for the request:

NameTypeDescription
idStringFor modifying multiple domains, the id for each domain must be specified as an attribute. Note that for modifying a single domain, the id is a required parameter at the end of the API call URI.
emailAddressString (Optional)Email address to use for contacting the domain administrator.
ttlString (Optional)If specified, must be greater than or equal to 300.
commentString (Optional)If included, its length must be less than or equal to 160 characters.

Example Update domain: JSON request

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

{
  "comment" : "Optional domain comment...",
  "ttl" : 3600,
  "emailAddress" : "[email protected]"
}

Response


This operation does not return a synchronous response body.

Delete domain

DELETE /v1.0/{account}/domains/{domainId}

Deletes a domain from an account.

ℹ️

This call returns an asynchronous response, as described in Synchronous and asynchronous responses.

This call deletes 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 ).

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.

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

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This operation does not accept a request body.

Example Delete domain: XML request

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 Delete domain: JSON request

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

Response


This operation does not return a synchronous response body.

Delete domain and its subdomains

DELETE /v1.0/{account}/domains/{domainId}

Deletes a domain and its subdomains from an account.

ℹ️

This call returns an asynchronous response, as described in Synchronous and asynchronous responses.

This call deletes 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 ).

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.

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

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This table shows the query parameters for the request:

NameTypeDescription
deleteSubdomainsStringIf deleteSubdomains is true, also deletes subdomains. If false, subdomains are not deleted.

This operation does not accept a request body.

Example Delete domain and subdomains: XML request

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 Delete domain and subdomains: JSON request

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

Response


This operation does not return a synchronous response body.

Show domain changes

GET /v1.0/{account}/domains/{domainId}/changes

Shows all changes to a specified domain since a specified date/time.

This call shows all changes to a specified domain since a specified date/time. The since parameter is optional and defaults to midnight of the current day. See Date/Time format for details on how to specify this parameter’s value.

The examples below show the requests and corresponding responses to list the domain changes since midnight, GMT-5, on September 13, 2011.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200SuccessRequest succeeded.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This table shows the query parameters for the request:

NameTypeDescription
sinceStringThe Date/Time from which the domain changes should be shown.

This operation does not accept a request body.

Example List domain Changes: XML request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains/45678/changes?since=2011-09-13T00:00:00-0500
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example List domain Changes: JSON request

GET https://dns.api.rackspacecloud.com/v1.0/1234/domains/45678/changes?since=2011-09-13T00:00:00-0500
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Response


Example List domain Changes: XML response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 2460

<changes>
    <changeDetails>
        <field>serial_number</field>
        <originalValue>1310656481</originalValue>
        <newValue>1315927395</newValue>
    </changeDetails>
    <changeDetails>
        <field>updated_at</field>
        <originalValue>Thu Jul 14 15:14:41 UTC 2011</originalValue>
        <newValue>Tue Sep 13 15:23:15 UTC 2011</newValue>
    </changeDetails>
    <domain>rs.example.com</domain>
    <targetId>45678</targetId>
    <targetType>Domain</targetType>
    <accountId>1234</accountId>
    <action>update</action>
</changes>
<changes>
    <changeDetails>
        <field>created_at</field>
        <originalValue/>
        <newValue>Tue Sep 13 16:11:42 UTC 2011</newValue>
    </changeDetails>
    <changeDetails>
        <field>ttl</field>
        <originalValue/>
        <newValue>3600</newValue>
    </changeDetails>
    <changeDetails>
        <field>fqdn</field>
        <originalValue/>
        <newValue>rs.example.com</newValue>
    </changeDetails>
    <changeDetails>
        <field>updated_at</field>
        <originalValue/>
        <newValue>Tue Sep 13 16:11:42 UTC 2011</newValue>
    </changeDetails>
    <changeDetails>
        <field>destination</field>
        <originalValue/>
        <newValue>mail.rs.example.com</newValue>
    </changeDetails>
    <changeDetails>
        <field>priority</field>
        <originalValue/>
        <newValue>1</newValue>
    </changeDetails>
    <changeDetails>
        <field>id</field>
        <originalValue/>
        <newValue>222222</newValue>
    </changeDetails>
    <changeDetails>
        <field>zone_id</field>
        <originalValue/>
        <newValue>45678</newValue>
    </changeDetails>
    <domain>rs.example.com</domain>
    <targetId>222222</targetId>
    <targetType>MX Record</targetType>
    <accountId>1234</accountId>
    <action>create</action>
</changes>
<changes>
    <changeDetails>
        <field>serial_number</field>
        <originalValue>1315927395</originalValue>
        <newValue>1315930302</newValue>
    </changeDetails>
    <changeDetails>
        <field>updated_at</field>
        <originalValue>Tue Sep 13 15:23:15 UTC 2011</originalValue>
        <newValue>Tue Sep 13 16:11:42 UTC 2011</newValue>
    </changeDetails>
    <domain>rs.example.com</domain>
    <targetId>45678</targetId>
    <targetType>Domain</targetType>
    <accountId>1234</accountId>
    <action>update</action>
</changes>
<changes>
    <changeDetails>
        <field>created_at</field>
        <originalValue/>
        <newValue>Tue Sep 13 15:23:15 UTC 2011</newValue>
    </changeDetails>
    <changeDetails>
        <field>ttl</field>
        <originalValue/>
        <newValue>3600</newValue>
    </changeDetails>
    <changeDetails>
        <field>fqdn</field>
        <originalValue/>
        <newValue>*.rs.example.com</newValue>
    </changeDetails>
    <changeDetails>
        <field>updated_at</field>
        <originalValue/>
        <newValue>Tue Sep 13 15:23:15 UTC 2011</newValue>
    </changeDetails>
    <changeDetails>
        <field>destination</field>
        <originalValue/>
        <newValue>rs.example.com</newValue>
    </changeDetails>
    <changeDetails>
        <field>id</field>
        <originalValue/>
        <newValue>87654</newValue>
    </changeDetails>
    <changeDetails>
        <field>zone_id</field>
        <originalValue/>
        <newValue>45678</newValue>
    </changeDetails>
    <domain>rs.example.com</domain>
    <targetId>87654</targetId>
    <targetType>CNAME Record</targetType>
    <accountId>1234</accountId>
    <action>create</action>
</changes>
<from>2011-09-13T00:00:00-05:00</from>
<to>2011-09-19T16:36:01-05:00</to>
<totalEntries>4</totalEntries>

Example List domain Changes: JSON response

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 2762

{
  "from" : "2011-09-13T05:00:00.000+0000",
  "to" : "2011-09-19T21:36:01.000+0000",
  "totalEntries" : 4,
  "changes" : [ {
    "domain" : "rs.example.com",
    "targetType" : "Domain",
    "action" : "update",
    "changeDetails" : [ {
      "field" : "serial_number",
      "newValue" : "1315930302",
      "originalValue" : "1315927395"
    }, {
      "field" : "updated_at",
      "newValue" : "Tue Sep 13 16:11:42 UTC 2011",
      "originalValue" : "Tue Sep 13 15:23:15 UTC 2011"
    } ],
    "accountId" : 1234,
    "targetId" : "45678"
  }, {
    "domain" : "rs.example.com",
    "targetType" : "MX Record",
    "action" : "create",
    "changeDetails" : [ {
      "field" : "created_at",
      "newValue" : "Tue Sep 13 16:11:42 UTC 2011",
      "originalValue" : ""
    }, {
      "field" : "ttl",
      "newValue" : "3600",
      "originalValue" : ""
    }, {
      "field" : "fqdn",
      "newValue" : "rs.example.com",
      "originalValue" : ""
    }, {
      "field" : "updated_at",
      "newValue" : "Tue Sep 13 16:11:42 UTC 2011",
      "originalValue" : ""
    }, {
      "field" : "destination",
      "newValue" : "mail.rs.example.com",
      "originalValue" : ""
    }, {
      "field" : "priority",
      "newValue" : "1",
      "originalValue" : ""
    }, {
      "field" : "id",
      "newValue" : "222222",
      "originalValue" : ""
    }, {
      "field" : "zone_id",
      "newValue" : "45678",
      "originalValue" : ""
    } ],
    "targetId" : "222222"
  }, {
    "domain" : "rs.example.com",
    "targetType" : "Domain",
    "action" : "update",
    "changeDetails" : [ {
      "field" : "serial_number",
      "newValue" : "1315927395",
      "originalValue" : "1310656481"
    }, {
      "field" : "updated_at",
      "newValue" : "Tue Sep 13 15:23:15 UTC 2011",
      "originalValue" : "Thu Jul 14 15:14:41 UTC 2011"
    } ],
    "accountId" : 1234,
    "targetId" : "45678"
  }, {
    "domain" : "rs.example.com",
    "targetType" : "CNAME Record",
    "action" : "create",
    "changeDetails" : [ {
      "field" : "created_at",
      "newValue" : "Tue Sep 13 15:23:15 UTC 2011",
      "originalValue" : ""
    }, {
      "field" : "ttl",
      "newValue" : "3600",
      "originalValue" : ""
    }, {
      "field" : "fqdn",
      "newValue" : "*.rs.example.com",
      "originalValue" : ""
    }, {
      "field" : "updated_at",
      "newValue" : "Tue Sep 13 15:23:15 UTC 2011",
      "originalValue" : ""
    }, {
      "field" : "destination",
      "newValue" : "rs.example.com",
      "originalValue" : ""
    }, {
      "field" : "id",
      "newValue" : "87654",
      "originalValue" : ""
    }, {
      "field" : "zone_id",
      "newValue" : "45678",
      "originalValue" : ""
    } ],
    "targetId" : "87654"
  } \]
}

Export domain

GET /v1.0/{account}/domains/{domainId}/export

Exports details for a specified domain.

ℹ️

This call returns an asynchronous response. Refer to Synchronous and asynchronous responses.

This call provides the BIND (Berkeley Internet Name Domain) 9 formatted contents of the requested domain. This call is for a single domain only, and as such, does not traverse up or down the domain hierarchy for details (that is, no subdomain information is provided).

ℹ️

Notes

  • This call is not capable of returning anything for a domain that has been deleted.
  • The BIND 9 formatted contents of the requested domain will have no comments listed for the domain or for the records of the domain being exported.
  • The following examples show the final successful response for the asynchronous call with showDetails set to true.

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This operation does not accept a request body.

Example Export domain: XML request

GET https://dns.api.rackspacecloud.com/v1.0/hybrid:30720/domains/292786/export
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example Export domain: JSON request

GET https://dns.api.rackspacecloud.com/v1.0/hybrid:30720/domains/292786/export
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Response


Example Export domain: XML response

Status: 200 OK
Date: Fri, 29 Oct 2021 21:21:04 GMT
Content-Type: application/xml
Content-Length: 854

<callbackUrl>https://dns.api.rackspacecloud.com/v1.0/hybrid:30720/status/017d0607-07b7-4000-b938-41c43289bf3b</callbackUrl>
<jobId>017d0607-07b7-4000-b938-41c43289bf3b</jobId>
<requestUrl>https://dns.api.rackspacecloud.com/v1.0/hybrid:30720/domains/292786/export</requestUrl>
<response>
    <contents>;Configuration for DNS Zone example.com

;-----;example.com;
example.com. 300 IN SOA ns.rackspace.com. hostmaster.rackspace.com. (
1628878394
10800
3600
604800
300
)
pop3.example.com. 86400 IN CNAME example.com.
www.example.com. 86400 IN CNAME example.com.
example.com. 86400 IN NS ns.rackspace.com.
example.com. 86400 IN NS ns2.rackspace.com.

example.com. 300 IN TXT "a blah blah blah"
</contents>
    <id>292786</id>
    <accountId>hybrid:30720</accountId>
    <contentType>BIND_9</contentType>
</response>
<verb>GET</verb>
<status>COMPLETED</status>

Example Export domain: JSON response

Status: 200 OK
Date: Fri, 29 Oct 2021 21:21:04 GMT
Content-Type: application/json
Content-Length: 780

{
 "callbackUrl": "https://dns.api.rackspacecloud.com/v1.0/hybrid:30720/status/017d0607-07b7-4000-b938-41c43289bf3b",
 "jobId": "017d0607-07b7-4000-b938-41c43289bf3b",
 "requestUrl": "https://dns.api.rackspacecloud.com/v1.0/hybrid:30720/domains/292786/export",
 "response": {
     "contents": ";Configuration for DNS Zone example.com\n\n;-----;example.com;\nexample.com. 300 IN SOA ns.rackspace.com. hostmaster.rackspace.com. (\n1628878394\n10800\n3600\n604800\n300\n)\npop3.example.com. 86400 IN CNAME example.com.\nwww.example.com. 86400 IN CNAME example.com.\nexample.com. 86400 IN NS ns.rackspace.com.\nexample.com. 86400 IN NS ns2.rackspace.com.\n\nexample.com. 300 IN TXT \"a blah blah blah\"\n",
     "id": "292786",
     "accountId": "hybrid:30720",
     "contentType": "BIND_9"
 },
 "verb": "GET",
 "status": "COMPLETED"
}

Clone domain

POST /v1.0/{account}/domains/{domainId}/clone

Clones a domain.

Creates a specified domain ( example2.com ) by cloning a domain with id domainId. All options except cloneName assume a default value of true.

ℹ️

This call returns an asynchronous response, as described in Synchronous and asynchronous responses. The AsyncResponse returned will be similar to that returned for Create domain but with the request element absent because the clone request has no body.

This call duplicates a single existing domain configuration with a new domain name for a specified Cloud account. By default, all records and, optionally, subdomain(s) are duplicated as well. Both the existing domain (referred to as the reference domain) and the new cloned domain must exist under the same Cloud account.

See the query parameters table for the parameters and options available to specify how the cloning affects subdomains, comments, email addresses, and record data.

ℹ️

Notes

  • If the corresponding request cannot be fulfilled due to insufficient or invalid data, or if the reference domain does not exist, an HTTP 400 (Bad Request) error response will be returned in the body of the response with information regarding the nature of the failure.
  • Clone domain is an atomic operation. If there is a failure in the duplication of a single record or subdomain, the entire process will fail. Failures are non-recoverable and require the caller to correct the cause of the failure and POST the request again.
  • The Clone domain operation is currently supported for domains under a given Cloud account. The cloned domain must belong to the same account as the reference domain.
  • The Clone domain operation will return an exception if the operation would result in creating a domain that already exists. The exception would indicate that the domain already exists.
  • The Clone domain operation may take slightly longer to complete than a comparable Create domain request.
  • PTR records (for Reverse DNS) are not represented when a domain is created and, therefore, are not included when a domain is cloned.
  • If your reference domain already has both default Rackspace Nameserver (NS) records, the cloned domain will be created with no additional default Rackspace NS records. If your reference domain lacks one or both of the default Rackspace NS records, the cloned domain will be created with additional Rackspace default NS records to make a total of two default Rackspace NS records. If the presence of default Rackspace NS records is not your preference, they can be deleted from the cloned domain as long as at least one NS record remains (Rackspace or non-Rackspace).
  • Any non-default (non-Rackspace) NS records in the reference domain are cloned and modified in a way that is consistent with all other record types.

According to the cloneName specified, the domain name and record name(s) will automatically be modified and replaced in the new cloned domain as part of the cloning process and cannot be influenced by any request options. See the table below for the parameters and options available to specify how the cloning affects subdomains, comments, email addresses, and record data.

The following examples show the Clone domain requests.

ℹ️

The following examples show the initial 202 Accepted response for the asynchronous call and indicate that the task has been accepted for processing.

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
409Already ExistsThe item already exists.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.
{domainId}StringID for the domain.

This table shows the query parameters for the request:

NameTypeDescription
cloneNameStringThe name of the new (cloned) domain.
cloneSubdomainsString (Optional)Recursively clone subdomains. Defaults to true. If set to false, then only the top level domain and its records are cloned. Cloned subdomain configurations are modified the same way that cloned top level domain configurations are modified.
modifyRecordDataString (Optional)Replaces occurrences of the reference domain name with the new domain name in data fields (of records) on the cloned (new) domain. Does not affect NS records. Defaults to true.
modifyEmailAddressString (Optional)Replaces occurrences of the reference domain name with the new domain name in email addresses on the cloned (new) domain. Defaults to true.
modifyCommentString (Optional)Replaces occurrences of the reference domain name with the new domain name in comments on the cloned (new) domain. Defaults to true.

This operation does not accept a request body.

Example Clone domain: XML request

POST https://dns.api.rackspacecloud.com/v1.0/1234/domains/3586209/clone?cloneName=clone1.com
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example Clone domain: JSON request

POST https://dns.api.rackspacecloud.com/v1.0/1234/domains/3586209/clone?cloneName=clone1.com
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Response


Example Initial (202) Clone domain: JSON response

Status: 202 Accepted
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 315

{
  "status" : "RUNNING",
  "verb" : "POST",
  "jobId" : "52179628-6df6-46a0-bdb3-078769cd0e9d",
  "callbackUrl" : "https://dns.api.rackspacecloud.com/v1.0/1234/status/52179628-6df6-46a0-bdb3-078769cd0e9d",
  "requestUrl" : "https://dns.api.rackspacecloud.com/v1.0/1234/domains/3586209/clone?cloneName=clone1.com"
}

The following are examples of the reference domain and the resulting cloned domain:

Example Reference (Existing) domain cloner.com: XML

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 3745

<accountId>1234</accountId>
<created>2013-05-06T12:10:51-05:00</created>
<updated>2013-05-06T12:10:55-05:00</updated>
<id>3586209</id>
<emailAddress>[email protected]</emailAddress>
<ttl>7788</ttl>
<name>cloner.com</name>
<comment>cloner.com is a template domain for cloning others. cloner.com has subdomains - sub1.cloner.com, sub2.cloner.com, sub3.cloner.com</comment>
<nameservers>
    <name>ns.rackspace.com</name>
</nameservers>
<nameservers>
    <name>ns2.rackspace.com</name>
</nameservers>
<recordsList>
    <totalEntries>7</totalEntries>
    <records>
        <id>A-9516802</id>
        <name>ftp.cloner.com</name>
        <type>A</type>
        <data>192.0.2.8</data>
        <ttl>5771</ttl>
        <updated>2013-05-06T12:10:52-05:00</updated>
        <created>2013-05-06T12:10:52-05:00</created>
    </records>
    <records>
        <id>A-9516803</id>
        <name>cloner.com</name>
        <type>A</type>
        <data>192.0.2.17</data>
        <ttl>86400</ttl>
        <updated>2013-05-06T12:10:52-05:00</updated>
        <created>2013-05-06T12:10:52-05:00</created>
    </records>
    <records>
        <id>NS-8504404</id>
        <name>cloner.com</name>
        <type>NS</type>
        <data>ns.rackspace.com</data>
        <ttl>7788</ttl>
        <updated>2013-05-06T12:10:51-05:00</updated>
        <created>2013-05-06T12:10:51-05:00</created>
    </records>
    <records>
        <id>NS-8504405</id>
        <name>cloner.com</name>
        <type>NS</type>
        <data>ns2.rackspace.com</data>
        <ttl>7788</ttl>
        <updated>2013-05-06T12:10:51-05:00</updated>
        <created>2013-05-06T12:10:51-05:00</created>
    </records>
    <records>
        <id>NS-8504406</id>
        <name>cloner.com</name>
        <type>NS</type>
        <data>server1.cloner.com</data>
        <ttl>3600</ttl>
        <updated>2013-05-06T12:10:53-05:00</updated>
        <created>2013-05-06T12:10:53-05:00</created>
    </records>
    <records>
        <id>MX-4220031</id>
        <name>cloner.com</name>
        <type>MX</type>
        <data>mail.cloner.com</data>
        <ttl>3600</ttl>
        <priority>5</priority>
        <updated>2013-05-06T12:10:54-05:00</updated>
        <created>2013-05-06T12:10:54-05:00</created>
    </records>
    <records>
        <id>CNAME-11336151</id>
        <name>www.cloner.com</name>
        <type>CNAME</type>
        <data>cloner.com</data>
        <ttl>5400</ttl>
        <updated>2013-05-06T12:10:55-05:00</updated>
        <created>2013-05-06T12:10:55-05:00</created>
        <comment>This is a comment on the CNAME record</comment>
    </records>
</recordsList>
<subdomains>
    <domains>
        <id>3586210</id>
        <name>sub1.cloner.com</name>
        <comment>sub1.cloner.com uses rackspace.com for email domain name. Sister subdomains are sub2.cloner.com, sub3.cloner.com</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2013-05-06T12:10:56-05:00</updated>
        <created>2013-05-06T12:10:56-05:00</created>
    </domains>
    <domains>
        <id>3586211</id>
        <name>sub2.cloner.com</name>
        <comment>sub1.cloner.com uses parent domain name, cloner.com, for email domain name</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2013-05-06T12:10:56-05:00</updated>
        <created>2013-05-06T12:10:56-05:00</created>
    </domains>
    <domains>
        <id>3586212</id>
        <name>sub3.cloner.com</name>
        <comment>sub3.cloner.com uses it's own domain name for email domain name</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2013-05-06T12:10:57-05:00</updated>
        <created>2013-05-06T12:10:57-05:00</created>
    </domains>
</subdomains>

Example Resulting (Cloned) domain clone1.com: XML

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/xml
Content-Length: 3745

<accountId>1234</accountId>
<created>2013-05-06T12:17:31-05:00</created>
<updated>2013-05-06T12:17:35-05:00</updated>
<id>3586213</id>
<emailAddress>[email protected]</emailAddress>
<ttl>7788</ttl>
<name>clone1.com</name>
<comment>clone1.com is a template domain for cloning others. clone1.com has subdomains - sub1.clone1.com, sub2.clone1.com, sub3.clone1.com</comment>
<nameservers>
    <name>ns.rackspace.com</name>
</nameservers>
<nameservers>
    <name>ns2.rackspace.com</name>
</nameservers>
<recordsList>
    <totalEntries>7</totalEntries>
    <records>
        <id>A-9516805</id>
        <name>ftp.clone1.com</name>
        <type>A</type>
        <data>192.0.2.8</data>
        <ttl>5771</ttl>
        <updated>2013-05-06T12:17:32-05:00</updated>
        <created>2013-05-06T12:17:32-05:00</created>
    </records>
    <records>
        <id>A-9516806</id>
        <name>clone1.com</name>
        <type>A</type>
        <data>192.0.2.17</data>
        <ttl>86400</ttl>
        <updated>2013-05-06T12:17:33-05:00</updated>
        <created>2013-05-06T12:17:33-05:00</created>
    </records>
    <records>
        <id>NS-8504413</id>
        <name>clone1.com</name>
        <type>NS</type>
        <data>ns.rackspace.com</data>
        <ttl>7788</ttl>
        <updated>2013-05-06T12:17:31-05:00</updated>
        <created>2013-05-06T12:17:31-05:00</created>
    </records>
    <records>
        <id>NS-8504414</id>
        <name>clone1.com</name>
        <type>NS</type>
        <data>ns2.rackspace.com</data>
        <ttl>7788</ttl>
        <updated>2013-05-06T12:17:31-05:00</updated>
        <created>2013-05-06T12:17:31-05:00</created>
    </records>
    <records>
        <id>NS-8504415</id>
        <name>clone1.com</name>
        <type>NS</type>
        <data>server1.clone1.com</data>
        <ttl>3600</ttl>
        <updated>2013-05-06T12:17:34-05:00</updated>
        <created>2013-05-06T12:17:34-05:00</created>
    </records>
    <records>
        <id>MX-4220032</id>
        <name>clone1.com</name>
        <type>MX</type>
        <data>mail.clone1.com</data>
        <ttl>3600</ttl>
        <priority>5</priority>
        <updated>2013-05-06T12:17:35-05:00</updated>
        <created>2013-05-06T12:17:35-05:00</created>
    </records>
    <records>
        <id>CNAME-11336152</id>
        <name>www.clone1.com</name>
        <type>CNAME</type>
        <data>clone1.com</data>
        <ttl>5400</ttl>
        <updated>2013-05-06T12:17:35-05:00</updated>
        <created>2013-05-06T12:17:35-05:00</created>
        <comment>This is a comment on the CNAME record</comment>
    </records>
</recordsList>
<subdomains>
    <domains>
        <id>3586214</id>
        <name>sub1.clone1.com</name>
        <comment>sub1.clone1.com uses rackspace.com for email domain name. Sister subdomains are sub2.clone1.com, sub3.clone1.com</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2013-05-06T12:17:36-05:00</updated>
        <created>2013-05-06T12:17:36-05:00</created>
    </domains>
    <domains>
        <id>3586215</id>
        <name>sub2.clone1.com</name>
        <comment>sub1.clone1.com uses parent domain name, clone1.com, for email domain name</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2013-05-06T12:17:37-05:00</updated>
        <created>2013-05-06T12:17:37-05:00</created>
    </domains>
    <domains>
        <id>3586216</id>
        <name>sub3.clone1.com</name>
        <comment>sub3.clone1.com uses it's own domain name for email domain name</comment>
        <emailAddress>[email protected]</emailAddress>
        <updated>2013-05-06T12:17:37-05:00</updated>
        <created>2013-05-06T12:17:37-05:00</created>
    </domains>
</subdomains>

Example Reference (Existing) domain cloner.com: JSON

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 3325

{
  "name" : "cloner.com",
  "id" : "3586209",
  "comment" : "cloner.com is a template domain for cloning others. cloner.com has subdomains - sub1.cloner.com, sub2.cloner.com, sub3.cloner.com",
  "updated" : "2013-05-06T17:10:55.000+0000",
  "nameservers" : [ {
    "name" : "ns.rackspace.com"
  }, {
    "name" : "ns2.rackspace.com"
  } ],
  "accountId" : "1234",
  "recordsList" : {
    "totalEntries" : 7,
    "records" : [ {
      "name" : "ftp.cloner.com",
      "id" : "A-9516802",
      "type" : "A",
      "data" : "192.0.2.8",
      "updated" : "2013-05-06T17:10:52.000+0000",
      "ttl" : 5771,
      "created" : "2013-05-06T17:10:52.000+0000"
    }, {
      "name" : "cloner.com",
      "id" : "A-9516803",
      "type" : "A",
      "data" : "192.0.2.17",
      "updated" : "2013-05-06T17:10:52.000+0000",
      "ttl" : 86400,
      "created" : "2013-05-06T17:10:52.000+0000"
    }, {
      "name" : "cloner.com",
      "id" : "NS-8504404",
      "type" : "NS",
      "data" : "ns.rackspace.com",
      "updated" : "2013-05-06T17:10:51.000+0000",
      "ttl" : 7788,
      "created" : "2013-05-06T17:10:51.000+0000"
    }, {
      "name" : "cloner.com",
      "id" : "NS-8504405",
      "type" : "NS",
      "data" : "ns2.rackspace.com",
      "updated" : "2013-05-06T17:10:51.000+0000",
      "ttl" : 7788,
      "created" : "2013-05-06T17:10:51.000+0000"
    }, {
      "name" : "cloner.com",
      "id" : "NS-8504406",
      "type" : "NS",
      "data" : "server1.cloner.com",
      "updated" : "2013-05-06T17:10:53.000+0000",
      "ttl" : 3600,
      "created" : "2013-05-06T17:10:53.000+0000"
    }, {
      "name" : "cloner.com",
      "priority" : 5,
      "id" : "MX-4220031",
      "type" : "MX",
      "data" : "mail.cloner.com",
      "updated" : "2013-05-06T17:10:54.000+0000",
      "ttl" : 3600,
      "created" : "2013-05-06T17:10:54.000+0000"
    }, {
      "name" : "www.cloner.com",
      "id" : "CNAME-11336151",
      "type" : "CNAME",
      "comment" : "This is a comment on the CNAME record",
      "data" : "cloner.com",
      "updated" : "2013-05-06T17:10:55.000+0000",
      "ttl" : 5400,
      "created" : "2013-05-06T17:10:55.000+0000"
    } ]
  },
  "subdomains" : {
    "domains" : [ {
      "name" : "sub1.cloner.com",
      "id" : "3586210",
      "comment" : "sub1.cloner.com uses rackspace.com for email domain name. Sister subdomains are sub2.cloner.com, sub3.cloner.com",
      "updated" : "2013-05-06T17:10:56.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2013-05-06T17:10:55.000+0000"
    }, {
      "name" : "sub2.cloner.com",
      "id" : "3586211",
      "comment" : "sub1.cloner.com uses parent domain name, cloner.com, for email domain name",
      "updated" : "2013-05-06T17:10:56.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2013-05-06T17:10:56.000+0000"
    }, {
      "name" : "sub3.cloner.com",
      "id" : "3586212",
      "comment" : "sub3.cloner.com uses it's own domain name for email domain name",
      "updated" : "2013-05-06T17:10:57.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2013-05-06T17:10:57.000+0000"
    } ],
    "totalEntries" : 3
  },
  "ttl" : 7788,
  "emailAddress" : "[email protected]",
  "created" : "2013-05-06T17:10:51.000+0000"
}

Example Resulting (Cloned) domain clone1.com: JSON

Status: 200 OK
Date: Thu, 28 Jul 2011 21:54:21 GMT
X-API-VERSION: 1.0.17
Content-Type: application/json
Content-Length: 3325

{
  "name" : "clone1.com",
  "id" : "3586213",
  "comment" : "clone1.com is a template domain for cloning others. clone1.com has subdomains - sub1.clone1.com, sub2.clone1.com, sub3.clone1.com",
  "updated" : "2013-05-06T17:17:35.000+0000",
  "nameservers" : [ {
    "name" : "ns.rackspace.com"
  }, {
    "name" : "ns2.rackspace.com"
  } ],
  "accountId" : "1234",
  "recordsList" : {
    "totalEntries" : 7,
    "records" : [ {
      "name" : "ftp.clone1.com",
      "id" : "A-9516805",
      "type" : "A",
      "data" : "192.0.2.8",
      "updated" : "2013-05-06T17:17:32.000+0000",
      "ttl" : 5771,
      "created" : "2013-05-06T17:17:32.000+0000"
    }, {
      "name" : "clone1.com",
      "id" : "A-9516806",
      "type" : "A",
      "data" : "192.0.2.17",
      "updated" : "2013-05-06T17:17:33.000+0000",
      "ttl" : 86400,
      "created" : "2013-05-06T17:17:33.000+0000"
    }, {
      "name" : "clone1.com",
      "id" : "NS-8504413",
      "type" : "NS",
      "data" : "ns.rackspace.com",
      "updated" : "2013-05-06T17:17:31.000+0000",
      "ttl" : 7788,
      "created" : "2013-05-06T17:17:31.000+0000"
    }, {
      "name" : "clone1.com",
      "id" : "NS-8504414",
      "type" : "NS",
      "data" : "ns2.rackspace.com",
      "updated" : "2013-05-06T17:17:31.000+0000",
      "ttl" : 7788,
      "created" : "2013-05-06T17:17:31.000+0000"
    }, {
      "name" : "clone1.com",
      "id" : "NS-8504415",
      "type" : "NS",
      "data" : "server1.clone1.com",
      "updated" : "2013-05-06T17:17:34.000+0000",
      "ttl" : 3600,
      "created" : "2013-05-06T17:17:34.000+0000"
    }, {
      "name" : "clone1.com",
      "priority" : 5,
      "id" : "MX-4220032",
      "type" : "MX",
      "data" : "mail.clone1.com",
      "updated" : "2013-05-06T17:17:35.000+0000",
      "ttl" : 3600,
      "created" : "2013-05-06T17:17:35.000+0000"
    }, {
      "name" : "www.clone1.com",
      "id" : "CNAME-11336152",
      "type" : "CNAME",
      "comment" : "This is a comment on the CNAME record",
      "data" : "clone1.com",
      "updated" : "2013-05-06T17:17:35.000+0000",
      "ttl" : 5400,
      "created" : "2013-05-06T17:17:35.000+0000"
    } ]
  },
  "subdomains" : {
    "domains" : [ {
      "name" : "sub1.clone1.com",
      "id" : "3586214",
      "comment" : "sub1.clone1.com uses rackspace.com for email domain name. Sister subdomains are sub2.clone1.com, sub3.clone1.com",
      "updated" : "2013-05-06T17:17:36.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2013-05-06T17:17:36.000+0000"
    }, {
      "name" : "sub2.clone1.com",
      "id" : "3586215",
      "comment" : "sub1.clone1.com uses parent domain name, clone1.com, for email domain name",
      "updated" : "2013-05-06T17:17:37.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2013-05-06T17:17:37.000+0000"
    }, {
      "name" : "sub3.clone1.com",
      "id" : "3586216",
      "comment" : "sub3.clone1.com uses it's own domain name for email domain name",
      "updated" : "2013-05-06T17:17:37.000+0000",
      "emailAddress" : "[email protected]",
      "created" : "2013-05-06T17:17:37.000+0000"
    } ],
    "totalEntries" : 3
  },
  "ttl" : 7788,
  "emailAddress" : "[email protected]",
  "created" : "2013-05-06T17:17:31.000+0000"
}

Import domain

POST /v1.0/{account}/domains/import

Imports a new domain with the configuration specified by the request.

ℹ️

This call returns an asynchronous response, as described in Synchronous and asynchronous responses.

This call provisions a new DNS domain under the account specified by the BIND 9 formatted file configuration contents defined in the request object.  If the corresponding request cannot be fulfilled due to insufficient or invalid data, an HTTP 400 (Bad Request) error response will be returned with information regarding the nature of the failure in the body of the response. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure and POST the request again.

For all practical purposes, a successful Import domain call creates a domain, and is therefore similar in response to a Create domain call.

ℹ️

This process allows multiple records to be created along with the domain. This is an atomic operation, so if there is a failure in the creation of even a single record, the entire process will fail.

Ensure that the BIND 9 formatted file configuration contents are valid by adhering to the following rules:

  • Each record starts on a new line and on the first column. If a record will not fit on one line, use the BIND_9 line continuation convention where you put a left parenthesis and continue the one record on the next line and put a right parenthesis when the record ends. For example,
  • The attribute values of a record must be separated by a single blank or tab. No other white space characters.
  • If there are any NS records, the data field should not be ns.rackspace.com or ns2.rackspace.com. They will result in “duplicate record” errors.

Not following the above rules strictly will result in an HTTP 400 (Bad Request) error response with messages such as the following: “The request could not be understood by the server due to malformed syntax.”

ℹ️

Notes

  • If you attempt to import a domain that already exists, the API will return an exception saying that the domain already exists. This is the same behavior as when you attempt to create a domain that already exists.
  • The domain can have a comment attribute specified in the import domain request, and that comment is transferred to the new domain. However the domain contents cannot have comments specified in them. For example, no record level comments can be used in the import domain request.
  • The normal bind rules apply to any imported bind file, and in particular, records without a specified TTL will receive the domain TTL as the default. If the domain TTL is not specified, the SOA minTTL (3600 seconds) is used as the default instead.

ℹ️

The following examples show the final successful response for the asynchronous call.

This table shows the possible response codes for this operation:

Response CodeNameDescription
202AcceptedRequest is accepted.
400Bad RequestThe request is missing one or more elements, or the values of some elements are invalid.
400 500dnsFaultThe DNS service has experienced a fault.
401UnauthorizedYou are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.
404Not FoundThe requested item was not found.
409Already ExistsThe item already exists.
413Over LimitThe number of items returned is above the allowed limit.
503Service UnavailableThe service is not available.

Request


This table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenStringArbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

NameTypeDescription
{account}StringThe tenant ID.

This table shows the body parameters for the request:

NameTypeDescription
domains[*].contentTypeStringThe content type for the bind file. Must be specified as “BIND_9”.
domains[*].contentsStringThe valid configuration contents for the domain to be imported.

Example Import domain: JSON request

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

{  
  "domains" : [ {  
    "contentType" : "BIND_9",  
    "contents" : "\nexample.net. 3600 IN SOA ns.rackspace.com. [email protected]. 1308874739 3600 3600 3600 3600\nexample.net. 86400 IN A 110.11.12.16\nexample.net. 3600 IN MX 5 mail2.example.net.\nwww.example.net. 5400 IN CNAME example.net.\n"  
  } ]  
}

Response


Example Import domain: XML response

Status: 200 OK  
Date: Tue, 09 Nov 2021 20:28:58 GMT  
Content-Type: application/xml  
Content-Length: 855

<callbackUrl>https://dns.api.rackspacecloud.com/v1.0/1234/status/017d0607-07b7-4000-b938-41c43289bf3b</callbackUrl>
<jobId>017d0607-07b7-4000-b938-41c43289bf3b</jobId>
<requestUrl>https://dns.api.rackspacecloud.com/v1.0/1234/domains/import</requestUrl>
<response>
   <domains>
       <accountId>1234</accountId>
       <ttl>3600</ttl>
       <emailAddress>[email protected]</emailAddress>
       <comment>Optional domain comment...</comment>
       <nameservers>
         <name>ns.rackspace.com</name>
       </nameservers>
       <nameservers>
         <name>ns2.rackspace.com</name>
       </nameservers>  
       <recordsList>
        <totalEntries>3</totalEntries>  
            <records>
                <name>example.net</name>
                <type>A</type>
                <data>110.11.12.16</data>
                <ttl>86400</ttl>
            </records>
            <records>
                <name>example.net</name>
                <type>MX</type>
                <data>mail2.example.net</data>
                <ttl>3600</ttl>
                <priority>5</priority>
            </records>
            <records>
                <name>www.example.net</name>
                <type>CNAME</type>
                <data>example.net</data>
                <ttl>5400</ttl>
            </records>
       </recordsList>   
   </domains>  
</response>  
<verb>POST</verb>  
<status>COMPLETED</status>

Example Import domain: JSON response

Status: 200 OK  
Date: Tue, 09 Nov 2021 20:28:58 GMT  
Content-Type: application/json  
Content-Length: 756

{  
  "callbackUrl": "https://dns.api.rackspacecloud.com/v1.0/1234/status/017d0607-07b7-4000-b938-41c43289bf3b",  
  "jobId": "017d0607-07b7-4000-b938-41c43289bf3b",  
  "requestUrl": "https://dns.api.rackspacecloud.com/v1.0/1234/domains/import",  
  "response": {  
      "domains" : [ {  
        "name" : "example.net",  
        "comment" : "Optional domain comment...",  
        "nameservers" : [ {  
          "name" : "ns.rackspace.com"  
        }, {  
          "name" : "ns2.rackspace.com"  
        } ],  
        "recordsList" : {  
          "totalEntries" : 3,  
          "records" : [ {  
            "name" : "example.net",  
            "type" : "A",  
            "data" : "110.11.12.16",  
            "ttl" : 86400  
          }, {  
            "name" : "example.net",  
            "priority" : 5,  
            "type" : "MX",  
            "data" : "mail2.example.net",  
            "ttl" : 3600  
          }, {  
            "name" : "www.example.net",  
            "type" : "CNAME",  
            "data" : "example.net",  
            "ttl" : 5400  
          }]  
        },  
        "ttl" : 3600,  
        "emailAddress" : "[email protected]"  
      } ]  
  },  
  "verb": "POST",  
  "status": "COMPLETED"  
}