As illustrated by the examples above, the List Domains call provides a
list of all DNS domains manageable by a given account. Filtering the search
to limit the results returned can be performed by using the
name parameter on the List Domains call. For example,
?name=hoola.com matches hoola.com and
similar names such as main.hoola.com and
sub.hoola.com.
Filter criteria may consist of:
Any letter (A-Za-z)
Numbers (0-9)
Hyphen ("-")
1 to 63 characters
Filter criteria should not include any of the following characters: ' + , | ! " £ $ % & / ( ) = ? ^ * ç ° § ; : _ > ] [ @ à, é, ò
![]() | Note |
|---|---|
This call returns by default a maximum of 100 items at a time if no
|
In the following
example, the specified search name is
region2.example.net:
Example 4.17. Filter by Fully Qualified Domain Name Request: XML
GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=region2.example.net Accept: application/xml X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/xml Content-Length: 0
Example 4.18. Filter by Fully Qualified Domain Name Request: JSON
GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=region2.example.net Accept: application/json X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/json Content-Length: 0
The response matches one domain:
Example 4.19. Filter by Fully Qualified Domain Name 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: 371
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<domains totalEntries="114" 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">
<domain id="2725352" name="region2.example.net" updated="2011-06-23T20:21:06Z" created="2011-06-23T19:24:27Z"/>
</domains>
Example 4.20. Filter by Fully Qualified Domain Name 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: 202
{
"domains" : [ {
"updated" : "2011-06-23T20:21:06.000+0000",
"created" : "2011-06-23T19:24:27.000+0000",
"name" : "region2.example.net",
"id" : 2725352
} ],
"totalEntries" : 114
}
In the following
example, the specified search name is
sub1.example.com:
Example 4.21. Filter by Fully Qualified Subdomain Name Request: XML
GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=sub1.example.com Accept: application/xml X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/xml Content-Length: 0
Example 4.22. Filter by Fully Qualified Subdomain Name Request: JSON
GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=sub1.example.com Accept: application/json X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/json Content-Length: 0
The response matches one subdomain:
Example 4.23. Filter by Fully Qualified Subdomain Name 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: 435
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<domains totalEntries="114" 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">
<domain id="2725257" name="sub1.example.com" emailAddress="sample@rackspace.com" updated="2011-06-23T03:09:34Z" created="2011-06-23T03:09:33Z" comment="1st sample subdomain"/>
</domains>
Example 4.24. Filter by Fully Qualified Subdomain Name 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: 284
{
"domains" : [ {
"emailAddress" : "sample@rackspace.com",
"updated" : "2011-06-23T03:09:34.000+0000",
"created" : "2011-06-23T03:09:33.000+0000",
"name" : "sub1.example.com",
"id" : 2725257,
"comment" : "1st sample subdomain"
} ],
"totalEntries" : 114
}
In the following
example, the specified search name is
sub1.exam:
Example 4.25. Filter by Partial Name Request: XML
GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=sub1.exam Accept: application/xml X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/xml Content-Length: 0
Example 4.26. Filter by Partial Name Request: JSON
GET https://dns.api.rackspacecloud.com/v1.0/1234/domains?name=sub1.exam Accept: application/json X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/json Content-Length: 0
The response matches one subdomain:
Example 4.27. Filter by Partial Name 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: 435
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<domains totalEntries="114" 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">
<domain id="2725257" name="sub1.example.com" emailAddress="sample@rackspace.com" updated="2011-06-23T03:09:34Z" created="2011-06-23T03:09:33Z" comment="1st sample subdomain"/>
</domains>
Example 4.28. Filter by Partial Name 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: 284
{
"domains" : [ {
"emailAddress" : "sample@rackspace.com",
"updated" : "2011-06-23T03:09:34.000+0000",
"created" : "2011-06-23T03:09:33.000+0000",
"name" : "sub1.example.com",
"id" : 2725257,
"comment" : "1st sample subdomain"
} ],
"totalEntries" : 114
}

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