get_domains_by_expiredate
Retrieves domains that expire within a specified date range.
Request parameters
Standard request parameters
- action = get_domains_by_expiredate
- object = domain
Request attributes
Parameter | Obligation | Definition/Value |
---|---|---|
exp_from exp_to | Required | Specify a start/end date range from which to return expired domains, in the format: yyyy-MM-dd. |
limit | Optional | The maximum number of domains to return per page. The default is set to 40 if not specified. |
page | Optional | Determines which page to retrieve, using the page number. The page index starts at 0 (zero) and default is 1 if not specified. |
Response parameters
Standard response parameters
- action = reply
- object = domain
- is_success = Boolean indicating success or failure of the request.
- response_code = Response code indicating outcome of the request.
- response_text = Message describing the outcome of the request.
Response attributes
If the request is successful, the attributes associative array may include the following:
Parameter | Obligation | Definition/Value |
---|---|---|
exp_domains | Always returned | An associative array which lists the domains that expire during the specified period. For more information, see the exp_domains table. |
page | Always returned | The number of the page retrieved. |
remainder | Always returned | Indicates if some expiring domains were not returned due to restrictions set by the page and limit values. 0—No, all expiring domains are listed. 1—Yes, there are remaining expiring domains not listed. |
total | Always returned | The total number of domains expiring in the specified date range. |
Response parameters within the exp_domains associative array may include the following:
Parameter | Obligation | Definition/Value |
---|---|---|
name | Always returned | The name of the domain that is expiring. |
expiredate | Always returned | The date the domain expires, in the format yyyy-MM-dd. |
f_auto_renew | Always returned | Indicates whether the domain is set to automatically renew. Y—Domain is set to auto-renew. N—Domain is not set to auto-renew. |
f_let_expire | Always returned | Indicates whether the domain will send renewal notices or expire silently. Y—Expire domain silently, ICANN mandated notifications will continue to be sent to the registrant. N—Do not expire domain silently. |
Example
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="action">GET_DOMAINS_BY_EXPIREDATE</item>
<item key="attributes">
<dt_assoc>
<item key="exp_from">2021-01-01</item>
<item key="exp_to">2022-11-07</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="action">REPLY</item>
<item key="is_success">1</item>
<item key="attributes">
<dt_assoc>
<item key="page">1</item>
<item key="total">3</item>
<item key="remainder">0</item>
<item key="exp_domains">
<dt_array>
<item key="0">
<dt_assoc>
<item key="name">example1.com</item>
<item key="expiredate">2022-09-25 00:03:39</item>
<item key="f_let_expire">N</item>
<item key="f_auto_renew">N</item>
</dt_assoc>
</item>
<item key="1">
<dt_assoc>
<item key="name">example2.com</item>
<item key="expiredate">2022-09-30 20:07:10</item>
<item key="f_let_expire">N</item>
<item key="f_auto_renew">N</item>
</dt_assoc>
</item>
<item key="2">
<dt_assoc>
<item key="name">example3.com</item>
<item key="expiredate">2022-10-18 17:13:19</item>
<item key="f_let_expire">Y</item>
<item key="f_auto_renew">N</item>
</dt_assoc>
</item>
</dt_array>
</item>
</dt_assoc>
</item>
<item key="response_code">200</item>
<item key="response_text">Command successful</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Updated about 2 years ago