Reverse DNS operations

Use the reverse DNS API operations to view and manage the PTR records associated with a Rackspace cloud device.

Update PTR records

PUT /v1.0/{account}/rdns

Updates one or more PTR records associated with a Rackspace Cloud device.

ℹ️

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

ℹ️

The IP address (data) for a PTR record cannot be modified. To change the reverse DNS for a domain, any existing PTR record(s) must be deleted and new ones created.

Notice in the requests below that the service and device resource URI are specified respectively as the rel and href attributes of the link element.

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 body parameters for the request:

NameTypeDescription
recordsList.records[*].idStringMust be a valid PTR record id.
recordsList.records[*].nameStringThis 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.
recordsList.records[*].dataStringMust be a valid IPv4 or IPv6 IP address.
recordsList.records[*].typeString (Optional)If specified, must be equal to PTR.
recordsList.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.
recordsList.records[*].commentString (Optional)If included, its length must be less than or equal to 160 characters.
link.contentStringA place holder for possible future use.
link.hrefStringThe URL to the device for which the PTR record is associated.
link.relStringThe name of the service (as provided in the serviceCatalog from Identity). Available options are cloudServersOpenStack and cloudLoadBalancers.

Example Update PTR record: JSON request

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

{
  "recordsList" : {
    "records" : [ {
      "name" : "bar.example.com",
      "id" : "PTR-000000",
      "type" : "PTR",
      "data" : "192.0.2.6",
      "ttl" : 86500
    }, {
      "name" : "bar.example.com",
      "id" : "PTR-000001",
      "type" : "PTR",
      "data" : "2001:db8::6",
      "ttl" : 86500
    } ]
  },
  "link" : {
    "content" : "",
    "href" : "https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321",
    "rel" : "cloudServersOpenStack"
  }
}

Response


This operation does not return a synchronous response body.

Add PTR records

POST /v1.0/{account}/rdns

Adds one or more PTR record records for a specified Cloud device.

ℹ️

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

ℹ️

Notes

  • PTR records can only be added for Rackspace Cloud Servers and Load Balancers.
  • The id for the record must not be specified.
  • For First Generation Cloud Servers, when the server is created, each public IPv4 address that comes with the server usually has a default PTR record already created for it. A request to list the PTR records associated with the server should return any PTR records for the server. If a default PTR record exists, the default PTR record can be appropriately modified or deleted and an appropriate PTR record created.
    If an attempt to add a PTR record for the public IP address of a newly created First Generation Cloud Server results in a 400 Bad Request error message, that is an indication that a default PTR record for the IP address already exists.
  • Adding PTR records for IPv6 addresses is supported only for Cloud Servers.

ℹ️

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

Notice in the requests below that the service and device resource URI are specified respectively as the rel and href attributes of the link element, as follows:

  • rel – this is the name of the service (as provided in the serviceCatalog from Identity) from where the device was created.
  • href – this is the URL to the device for which the PTR record is associated. It was returned when the device was created and it uniquely identifies the device.
  • content – this is currently a place holder for possible future use.

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 body parameters for the request:

NameTypeDescription
recordsList.records[*].nameStringThis 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.
recordsList.records[*].dataStringMust be a valid IPv4 or IPv6 IP address.
recordsList.records[*].typeString (Optional)If specified, must be equal to PTR.
recordsList.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.
recordsList.records[*].commentString (Optional)If included, its length must be less than or equal to 160 characters.
link.contentString (Required)A place holder for possible future use.
link.hrefString (Required)The URL to the device for which the PTR record is associated.
link.relString (Required)The name of the service (as provided in the serviceCatalog from Identity). Available options are cloudServersOpenStack and cloudLoadBalancers.

Example Add PTR record: JSON request

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

{
  "recordsList" : {
    "records" : [ {
      "name" : "example.com",
      "type" : "PTR",
      "data" : "192.0.2.7",
      "ttl" : 56000
    }, {
      "name" : "example.com",
      "type" : "PTR",
      "data" : "2001:db8::7",
      "ttl" : 56000
    } ]
  },
  "link" : {
    "content" : "",
    "href" : "https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321",
    "rel" : "cloudServersOpenStack"
  }
}

Response


This operation does not return a synchronous response body.

List PTR records

GET /v1.0/{account}/rdns/{service-name}

Lists all PTR records configured for a specified Cloud device.

This call lists all PTR records configured for a specified Cloud device.

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.
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.
{service-name}StringName of the Cloud service. Valid values are cloudServersOpenStack or cloudLoadBalancers.

This table shows the query parameters for the request:

NameTypeDescription
hrefStringDevice-resource-uri for the specified Cloud device.

This operation does not accept a request body.

Example List PTR records: XML request

GET https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example List PTR records: JSON request

GET https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Response


Example List PTR 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: 430

<records>
    <id>PTR-000000</id>
    <name>example.com</name>
    <type>PTR</type>
    <data>192.0.2.6</data>
    <ttl>56000</ttl>
    <updated>2011-06-24T01:12:51Z</updated>
    <created>2011-06-24T01:12:51Z</created>
</records>
<records>
    <id>PTR-000001</id>
    <name>example.com</name>
    <type>PTR</type>
    <data>2001:db8::6</data>
    <ttl>56000</ttl>
    <updated>2011-06-24T01:12:51Z</updated>
    <created>2011-06-24T01:12:51Z</created>
</records>

Example List PTR 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: 447

{
    "records" : [ 
    {
      "name" : "example.com",
      "id" : "PTR-000000",
      "type" : "PTR",
      "data" : "192.0.2.6",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 56000,
      "created" : "2011-06-24T01:12:51.000+0000"
    }, {
      "name" : "example.com",
      "id" : "PTR-000001",
      "type" : "PTR",
      "data" : "2001:db8::6",
      "updated" : "2011-06-24T01:12:51.000+0000",
      "ttl" : 56000,
      "created" : "2011-06-24T01:12:51.000+0000"
    }]
}

Delete PTR records

DELETE /v1.0/{account}/rdns/{service-name}

Deletes one or all PTR records associated with a Rackspace Cloud device. Use the optional ip query parameter to specify a specified record to delete. Omitting this parameter, deletes all PTR records associated with a specified device.

ℹ️

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

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.
{service-name}StringName of the Cloud service.

This table shows the query parameters for the request:

NameTypeDescription
hrefStringDevice-resource-uri for the specified Cloud device.
ipStringIP address for the specified Cloud device.

This operation does not accept a request body.

Example Delete PTR records: XML request

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example Delete PTR records: JSON request

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Example Delete PTR record: XML request

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321&ip=2001:db8::6
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example Delete PTR record: JSON request

DELETE https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321&ip=2001:db8::6
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 PTR record

GET /v1.0/{account}/rdns/{service-name}/{recordId}

Shows details for a specified PTR record associated with a specified Cloud device.

This call shows details for a specified PTR record associated with a specified cloud device.

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.
{service-name}StringName of the Cloud service. Valid values are cloudServersOpenStack or cloudLoadBalancers.
{recordId}StringID for the record.

This table shows the query parameters for the request:

NameTypeDescription
hrefStringDevice-resource-uri for the specified Cloud device.

This operation does not accept a request body.

Example List PTR record details: XML request

GET https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack/PTR-000000?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 0

Example List PTR record details: JSON request

GET https://dns.api.rackspacecloud.com/v1.0/1234/rdns/cloudServersOpenStack/PTR-000000?href=https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 0

Response


Example List PTR 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: 181

<id>PTR-000000</id>
<name>example.com</name>
<type>PTR</type>
<data>192.0.2.6</data>
<ttl>56000</ttl>
<updated>2011-06-24T01:12:51Z</updated>
<created>2011-06-24T01:12:51Z</created>

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

{
    "name" : "example.com",  
    "id" : "PTR-000000",  
    "type" : "PTR",  
    "data" : "192.0.2.6",  
    "updated" : "2011-06-24T01:12:51.000+0000",  
    "ttl" : 56000,  
    "created" : "2011-06-24T01:12:51.000+0000"  
}