Accounts-accountNumber-domains:GET
From Hostway API Documentation
GET /accounts/{accountNumber}/domains
Search for domains in client's account. Standard paging parameters can be used. The result is in standard paging format: list of list of results and pages count. You can search by name (with wildcard), expired or expiring (within 45 days of expiration) domains, or specify date range for expiration.
Contents |
Request
GET /accounts/{accountNumber}/domains
Parameters
- filterName
- The product name or wildcard pattern (optional).
- filterDomainName
- The product domain name (optional)
- filterExpired
- true|false (optional)
- filterExpiring
- true|false (optional)
- filterDays
- number of days (optional) to be used in conjunction with expiring or expired. The default value is 45 days, i.e. a domain is considered "expiring" if it expires in 45 days or less.
- filterExpiresBefore
- yyyy-mm-dd (optional)
- filterExpiresAfter
- yyyy-mm-dd (optional)
- filterStatus
- The product status (optional)
- filterServiceSpecificationTextKey
- Filter by serviceSpecificationTextKey. The filter accepts wildcard search (optional)
- page
- page number (optional)
- pageSize
- number of items per page (optional)
URI Parameters
- accountNumber
- client account number
Request Headers
None.
Request Body
None.
Response
Status Code
- 200 OK
- Returns list of domains.
Response Body
List of list of domains and pages count.
Example search for a domain product.
Request
GET /accounts/acct839326/domains?page=1&pageSize=10&filterName=ng-test*&filterExpired=false&filterExpiring=false&filterExpiresAfter=2014-04-11
Response
200 OK Content-Type: application/json; charset=UTF-8 { "total_count": 1, "list": [ { "status": "open", "createDate": "2013-02-02", "billingCycle": 12, "name": "ng-test-fitnesse-20130202-0605.com", "domainName": "ng-test-fitnesse-20130202-0605.com", "expirationDate": "2018-02-02", "serviceSpecification": "http://{host:port}/accounts/acct839326/serviceSpecifications/core.dnr.com", "service": "http://{host:port}/accounts/acct839326/products/acct839326-000001asfasgag2abeb7007f00000001000/services/acct839326-0000014a2sfw1441c1a8f45d6007f00000001000", "serviceSpecificationTextKey": "core.dnr.com" } ], "links": [ { "href": "http://{host:port}/accounts/acct839326/domains?page=1&pageSize=10&filterName=ng-test*&filterExpired=false&filterExpiring=false&filterExpiresAfter=2014-04-11", "rel": "self" } ] }
Example search for a domain product.
Request
GET /accounts/acct839326/domains?filterDomainName=ng-test-fitnesse-20130202-0605.com
Response
200 OK Content-Type: application/json; charset=UTF-8 { "total_count": 1, "list": [ { "status": "open", "createDate": "2013-02-02", "billingCycle": 12, "name": "ng-test-fitnesse-20130202-0605.com", "domainName": "ng-test-fitnesse-20130202-0605.com", "expirationDate": "2018-02-02", "serviceSpecification": "http://{host:port}/accounts/acct839326/serviceSpecifications/core.dnr.com", "service": "http://{host:port}/accounts/acct839326/products/acct839326-000001asfasgag2abeb7007f00000001000/services/acct839326-0000014a2sfw1441c1a8f45d6007f00000001000", "serviceSpecificationTextKey": "core.dnr.com" } ], "links": [ { "href": "http://{host:port}/accounts/acct839326/domains?filterDomainName=ng-test-fitnesse-20130202-0605.com", "rel": "self" } ] }
See also