| Verb | URI | Description | |||||||
| POST | /rdns | Add new PTR record(s) for the specified Cloud device. | |||||||
| 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 | ||
![]() | Notes |
|---|---|
|
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" : ""
}
}

![[Note]](/cdns-v1.0-cdns-devguide/common/images/admon/note.png)
