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.

Note

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 Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the header parameters for the request:

Name

Type

Description

X-Auth-Token

String

Arbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID 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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recordsList totalEntries="6" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0">
    <record id="A-6817754" type="A" name="ftp.example.com" data="192.0.2.8" ttl="5771" updated="2011-05-19T08:07:08-05:00" created="2011-05-18T14:53:09-05:00"/>
    <record id="A-6822994" type="A" name="example.com" data="192.0.2.17" ttl="86400" updated="2011-06-24T01:12:52Z" created="2011-06-24T01:12:52Z"/>
    <record id="NS-6251982" type="NS" name="example.com" data="ns.rackspace.com" ttl="3600" updated="2011-06-24T01:12:51Z" created="2011-06-24T01:12:51Z"/>
    <record id="NS-6251983" type="NS" name="example.com" data="ns2.rackspace.com" ttl="3600" updated="2011-06-24T01:12:51Z" created="2011-06-24T01:12:51Z"/>
    <record id="MX-3151218" type="MX" name="example.com" data="mail.example.com" ttl="3600" priority="5" updated="2011-06-24T01:12:53Z" created="2011-06-24T01:12:53Z"/>
    <record id="CNAME-9778009" type="CNAME" name="www.example.com" data="example.com" ttl="5400" updated="2011-06-24T01:12:54Z" created="2011-06-24T01:12:54Z" comment="This is a comment on the CNAME record"/>
</recordsList>

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.

Note

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

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the header parameters for the request:

Name

Type

Description

X-Auth-Token

String

Arbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID for the domain.

This table shows the query parameters for the request:

Name

Type

Description

type

String

Type of the record.

name

String

Name of the record.

data

String

Data for the record.

This operation does not accept a request body.

Response#

This operation does not return a response body.

Add records#

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

Adds one or more records to a specified domain.

Note

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

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

Note

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

Note

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

This table shows the possible response codes for this operation:

Response Code

Name

Description

202

Accepted

Request is accepted.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the header parameters for the request:

Name

Type

Description

X-Auth-Token

String

Arbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID for the domain.

This operation does not accept a request body.

Example Add records: XML request

POST 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: 777

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recordsList xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0">
    <record type="A" name="ftp.example.com" data="192.0.2.8" ttl="5771"/>
    <record type="A" name="example.com" data="192.0.2.17" ttl="86400"/>
    <record type="NS" name="example.com" data="ns.rackspace.com" ttl="3600"/>
    <record type="NS" name="example.com" data="ns2.rackspace.com" ttl="3600"/>
    <record type="MX" name="example.com" data="mail.example.com" ttl="3600" priority="5"/>
    <record type="CNAME" name="www.example.com" data="example.com" ttl="5400" comment="This is a comment on the CNAME record"/>
</recordsList>

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recordsList totalEntries="6" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0">
    <record id="A-6817754" type="A" name="ftp.example.com" data="192.0.2.8" ttl="5771" updated="2011-05-19T08:07:08-05:00" created="2011-05-18T14:53:09-05:00"/>
    <record id="A-6822994" type="A" name="example.com" data="192.0.2.17" ttl="86400" updated="2011-06-24T01:12:52Z" created="2011-06-24T01:12:52Z"/>
    <record id="NS-6251982" type="NS" name="example.com" data="ns.rackspace.com" ttl="3600" updated="2011-06-24T01:12:51Z" created="2011-06-24T01:12:51Z"/>
    <record id="NS-6251983" type="NS" name="example.com" data="ns2.rackspace.com" ttl="3600" updated="2011-06-24T01:12:51Z" created="2011-06-24T01:12:51Z"/>
    <record id="MX-3151218" type="MX" name="example.com" data="mail.example.com" ttl="3600" priority="5" updated="2011-06-24T01:12:53Z" created="2011-06-24T01:12:53Z"/>
    <record id="CNAME-9778009" type="CNAME" name="www.example.com" data="example.com" ttl="5400" updated="2011-06-24T01:12:54Z" created="2011-06-24T01:12:54Z" comment="This is a comment on the CNAME record"/>
</recordsList>

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.

Note

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 Code

Name

Description

202

Accepted

Request is accepted.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID for the domain.

This table shows the query parameters for the request:

Name

Type

Description

id1

String

ID for the first record.

id2

String

ID 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

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

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

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

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

Response#

This operation does not return a response body.

Update records#

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

Updates the configuration of records in the domain.

Note

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.

Note

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

Name

Description

202

Accepted

Request is accepted.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the header parameters for the request:

Name

Type

Description

X-Auth-Token

String

Arbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID for the domain.

This table shows the body parameters for the request:

Name

Type

Description

records[*].id

String

For 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[*].name

String

For 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[*].data

String

The 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[*].priority

String (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[*].ttl

String (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[*].comment

String (Optional)

If included, its length must be less than or equal to 160 characters.

Example Update records Configuration: XML request

PUT 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: 432

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recordsList xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0">
    <record id="MX-3151218" name="example.com" data="mail.example.com" ttl="3600"/>
    <record id="CNAME-9778009" name="www.example.com" comment="This is a comment on the CNAME record"/>
</recordsList>

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 response body.

Delete record#

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

Deletes a record from the domain.

Note

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 Code

Name

Description

202

Accepted

Request is accepted.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the header parameters for the request:

Name

Type

Description

X-Auth-Token

String

Arbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID for the domain.

{recordId}

String

ID 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 response body.

Update record#

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

Updates the configuration of a record in the domain.

Note

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.

Note

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

Name

Description

202

Accepted

Request is accepted.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the header parameters for the request:

Name

Type

Description

X-Auth-Token

String

Arbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID for the domain.

{recordId}

String

ID for the record.

This table shows the body parameters for the request:

Name

Type

Description

id

String

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

name

String

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

data

String

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

priority

Integer (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.

ttl

Integer (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.

comment

String (Optional)

If included, its length must be less than or equal to 160 characters.

Example Update Record Configuration: XML request

PUT 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: 279

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<record name="example.com" data="mail.example.com" ttl="3600" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0"/>

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

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request is missing one or more elements, or the values of some elements are invalid.

400 500

dnsFault

The DNS service has experienced a fault.

401

Unauthorized

You are not authorized to complete this operation. This error can occur if the request is submitted with an invalid authentication token.

404

Not Found

The requested item was not found.

413

Over Limit

The number of items returned is above the allowed limit.

503

Service Unavailable

The service is not available.

Request#

This table shows the header parameters for the request:

Name

Type

Description

X-Auth-Token

String

Arbitrary character string generated by the authentication service in response to valid credentials.

This table shows the URI parameters for the request:

Name

Type

Description

{account}

String

The tenant ID.

{domainId}

String

ID for the domain.

{recordId}

String

ID 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: 360

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<record id="A-6822994" type="A" name="example.com" data="192.0.2.17" ttl="86400" updated="2011-06-24T01:12:52Z" created="2011-06-24T01:12:52Z" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0"/>

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