Records operations

Use the following Rackspace Cloud DNS API operations to manage DNS records for a specified domain.

List records

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

Lists all records configured for the specified domain. SOA cannot be modified.

This call lists all records configured for the specified domain.

ℹ️

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 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.
{domainId}StringID for the domain.

This operation does not accept a request body.

Example List records: XML request

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

Example List records: JSON request

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

Response


Example List records: 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: 1273

<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>3600</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:53Z</updated>
    <created>2011-06-24T01:12:53Z</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:54Z</updated>
    <created>2011-06-24T01:12:54Z</created>
    <comment>This is a comment on the CNAME record</comment>
</records>

Example List records: 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: 1474

{
  "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"
  } ]
}

Search records

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

Searches all records for a specified domain for a specified type that match a specified name or data.

Records can be searched within a domain. The API allows for the caller to supply record type, name, or data as query parameters, which instruct the system to only return records for a specified type and matching a specified name or data. When searching, the type is required, while the name and data query parameters are optional. The responses from a record search have the same format as the responses for list records.

ℹ️

Notes

  • By default, the search 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 ). Refer to Paginated collections for details.
  • Using special characters in a search such as ” ” and “_” causes no results to be 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.
{domainId}StringID for the domain.

This table shows the query parameters for the request:

NameTypeDescription
typeStringType of the record.
nameStringName of the record.
dataStringData for the record.

This operation does not accept a request body.

Example Search records: XML request

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

Example Search records: JSON request

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

Response


Example List records: 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: 398

<records>
    <id>NS-6251982</id>
    <name>example.com</name>
    <type>NS</type>
    <data>ns.rackspace.com</data>
    <ttl>3600</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>

Example List records: 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: 395

{
  "records" : [ {
    "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"
  } ]
}

Add records

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

Adds one or more records to a specified domain.

ℹ️

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

This call adds new record(s) to a specified domain.

ℹ️

Notes

  • If you submit a request with multiple records, and one or more of those records fails, the entire request fails.
  • When a domain is created, and no TTL (Time To Live) is specified, a default value of 3600 seconds is used. The domain’s TTL value is inherited by the record. 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.
  • id for the record must not be specified.

ℹ️

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.
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
records[*].nameStringFor record types other than SRV records, this specifies the name for the domain or subdomain and must be a valid domain name. If the record name attribute is not specified, it is assumed that the record name is the same as the domain name to which the record belongs. The name attribute cannot be modified. For SRV records, this specifies the entire service name, which is made up of the service, protocol, and domain name to which the record belongs. The service and protocol fields of the service name can be modified but not the domain name field. The record name attribute must be specified for SRV records.
records[*].dataStringMust be a valid IPv4 or IPv6 IP address.
records[*].typeStringMust be a valid record type.
records[*].priorityString (Optional)Can be included for MX and SRV records, but forbidden for other record types. If specified, must be an integer from 0 to 65535.
records[*].ttlString (Optional)If specified, must be greater than or equal to 300. Defaults to the domain TTL if available, or 3600 if no TTL is specified.
records[*].commentString (Optional)If included, its length must be less than or equal to 160 characters.

Example Add records: JSON request

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

{
  "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
  } ]
}

Response


Example Add records: XML response

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

<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>3600</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:53Z</updated>
    <created>2011-06-24T01:12:53Z</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:54Z</updated>
    <created>2011-06-24T01:12:54Z</created>
    <comment>This is a comment on the CNAME record</comment>
</records>

Example Add records: 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: 1474

{
  "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"
  } ]
}

Delete records

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

Deletes multiple records from the domain.

ℹ️

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

These calls delete a specified record or multiple records from a specified domain.

When a record is deleted, any and all record data is immediately purged and is not recoverable via the API. So on a successful delete, subsequent requests for the deleted record 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 record 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
id1StringID for the first record.
id2StringID for the next record.

This operation does not accept a request body.

Example Delete records: XML request

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

Example Delete records: JSON request

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

Response


Example Delete records failure: XML response

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

<error>
    <details>See errors list for details.</details>
    <code>500</code>
    <failedItems>
        <faults>
            <message>Not Found</message>
            <details>The record with ID 111111111 was not found.</details>
            <code>404</code>
        </faults>
        <faults>
            <message>Not Found</message>
            <details>The record with ID 222222222 was not found.</details>
            <code>404</code>
        </faults>
    </failedItems>
    <message>One or more items could not be deleted.</message>
</error>

Example Delete records failure: 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: 422

"error": {
   "details": "See errors list for details.",
   "code": 500,
   "failedItems": {
       "faults": [
           {
               "message": "Not Found",
               "details": "The record with ID 111111111 was not found.",
               "code": 404
           },
           {
               "message": "Not Found",
               "details": "The record with ID 222222222 was not found.",
               "code": 404
           }
        ]},
   "message": "One or more items could not be deleted."
}

Update records

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

Updates the configuration of records in the 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 updates the configuration of records in a specified domain.

ℹ️

Notes

  • If you submit a request with multiple records, and one or more of those records fails, the entire request fails.
  • 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.
  • The only attributes that you can Update on a record (during a PUT ) are the data, priority (for MX and SRV records), ttl, and comment attributes.

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
records[*].idStringFor modifying multiple records, the id for each record must be specified as an attribute. Note that for modifying a single record, the record id is a required parameter at the end of the API call URI.
records[*].nameStringFor record types other than SRV records, this specifies the name for the domain or subdomain and must be a valid domain name. If the record name attribute is not specified, it is assumed that the record name is the same as the domain name to which the record belongs. The name attribute cannot be modified. For SRV records, this specifies the entire service name, which is made up of the service, protocol, and domain name to which the record belongs. The service and protocol fields of the service name can be modified but not the domain name field. The record name attribute must be specified for SRV records.
records[*].dataStringThe data field is required for PTR and TXT records only. For PTR records, the data field must be a valid IPv4 or IPv6 IP address.
records[*].priorityString (Optional)Can be included for MX and SRV records, but forbidden for other record types. If specified, must be an integer from 0 to 65535.
records[*].ttlString (Optional)If specified, must be greater than or equal to 300. Defaults to the domain TTL if available, or 3600 if no TTL is specified.
records[*].commentString (Optional)If included, its length must be less than or equal to 160 characters.

Example Update records Configuration: JSON request

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

{
  "records" : [ {
    "name" : "example.com",
    "id" : "MX-3151218",
    "data" : "mail.example.com",
    "ttl" : 3600
  }, {
    "name" : "www.example.com",
    "id" : "CNAME-9778009",
    "comment" : "This is a comment on the CNAME record"
  } ]
}

Response


This operation does not return a synchronous response body.

Delete record

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

Deletes a record from the domain.

ℹ️

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

These calls delete a specified record or multiple records from a specified domain.

When a record is deleted, any and all record data is immediately purged and is not recoverable via the API. So on a successful delete, subsequent requests for the deleted record 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.

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.
{recordId}StringID for the record.

This operation does not accept a request body.

Example Delete Record: XML request

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

Example Delete Record: JSON request

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725233/records/
MX-3151218
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.

Update record

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

Updates the configuration of a record in the 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 updates the configuration for a specified record in a specified domain.

ℹ️

Notes

  • 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.
  • The only attributes that you can Update on a record (during a PUT ) are the data, priority (for MX and SRV records), ttl, and comment attributes.

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.
{recordId}StringID for the record.

This table shows the body parameters for the request:

NameTypeDescription
idStringFor modifying multiple records, the id for each record must be specified as an attribute. Note that for modifying a single record, the record id is a required parameter at the end of the API call URI.
nameStringFor record types other than SRV records, this specifies the name for the domain or subdomain and must be a valid domain name. If the record name attribute is not specified, it is assumed that the record name is the same as the domain name to which the record belongs. The name attribute cannot be modified. For SRV records, this specifies the entire service name, which is made up of the service, protocol, and domain name to which the record belongs. The service and protocol fields of the service name can be modified but not the domain name field. The record name attribute must be specified for SRV records.
dataStringThe data field is required for PTR and TXT records only. For PTR records, the data field must be a valid IPv4 or IPv6 IP address.
priorityInteger (Optional)Can be included for MX and SRV records, but forbidden for other record types. If specified, must be an integer from 0 to 65535.
ttlInteger (Optional)If specified, must be greater than or equal to 300. Defaults to the domain TTL if available, or 3600 if no TTL is specified.
commentString (Optional)If included, its length must be less than or equal to 160 characters.

Example Update Record Configuration: JSON request

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

{
  "name" : "example.com",
  "data" : "mail.example.com",
  "ttl" : 3600
}

Response


This operation does not return a synchronous response body.

Show record details

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

Shows details for a specified record in a specified domain.

This call lists details for a specified record in the specified domain.

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.
{recordId}StringID for the record.

This operation does not accept a request body.

Example List Record details: XML request

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

Example List Record details: JSON request

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

Response


Example List Record details: 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: 180

<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>

Example List Record details: 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: 200

{
  "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"
}