Atom feed of this document
 
 
 

 4.5.3. Add PTR Records

Verb URI Description
POST /rdns Add new PTR record(s) for the specified Cloud device.
Table 4.7. Required and Optional Attributes for Add PTR Records
Name Description Required
type Specifies the record type as "PTR". Yes
name Specifies the name for the domain or subdomain. Must be a valid domain name. Yes
data The data field for PTR records must be a valid IPv4 or IPv6 IP address. Yes
ttl If specified, must be greater than 300. Defaults to 3600 if no TTL is specified. No
comment If included, its length must be less than or equal to 160 characters. No
[Note]Notes
  • 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 Next Generation Cloud Servers.

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.

 

Example 4.114. Add PTR Record Request: XML

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rdns 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">
    <ns2:link href="https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321" rel="cloudServersOpenStack"></ns2:link>
    <recordsList>
        <record type="PTR" name="example.com" data="192.0.2.7" ttl="56000"/>
        <record type="PTR" name="example.com" data="2001:db8::7" ttl="56000"/>
    </recordsList>
</rdns>

 

Example 4.115. Add PTR Record Request: JSON

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" : [ {
      "ttl" : 56000,
      "name" : "example.com",
      "type" : "PTR",
      "data" : "192.0.2.7"
    }, {
      "ttl" : 56000,
      "name" : "example.com",
      "type" : "PTR",
      "data" : "2001:db8::7"
    } ]
  },
  "link" : {
    "href" : "https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321",
    "rel" : "cloudServersOpenStack",
    "content" : ""
  }
}

 

Example 4.116. Add PTR Record Response: 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: 710

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rdns 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">
    <ns2:link href="https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321" rel="cloudServersOpenStack"></ns2:link>
    <recordsList>
        <record id="PTR-000002" type="PTR" name="example.com" data="192.0.2.7" ttl="56000" updated="2011-09-24T01:12:51Z" created="2011-09-24T01:12:51Z"/>
        <record id="PTR-000003" type="PTR" name="example.com" data="2001:db8::7" ttl="56000" updated="2011-09-24T01:12:51Z" created="2011-09-24T01:12:51Z"/>
    </recordsList>
</rdns>

 

Example 4.117. Add PTR Record Response: 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: 680

{
  "recordsList" : {
    "records" : [ {
      "ttl" : 56000,
      "updated" : "2011-09-24T01:12:51.000+0000",
      "created" : "2011-09-24T01:12:51.000+0000",
      "name" : "example.com",
      "id" : "PTR-000002",
      "type" : "PTR",
      "data" : "192.0.2.7"
    }, {
      "ttl" : 56000,
      "updated" : "2011-09-24T01:12:51.000+0000",
      "created" : "2011-09-24T01:12:51.000+0000",
      "name" : "example.com",
      "id" : "PTR-000003",
      "type" : "PTR",
      "data" : "2001:db8::7"
    } ]
  },
  "link" : {
    "href" : "https://dfw.servers.api.rackspacecloud.com/v2/1234/servers/0987654321",
    "rel" : "cloudServersOpenStack",
    "content" : ""
  }
}



loading table of contents...