API: OpenSRS

OpenSRS API Guide: Domains and SSL

Welcome to the OpenSRS API guide. Here you will find comprehensive documentation regarding our domain and SSL services. We hope this guide will help you start working with OpenSRS as quickly as possible. If you have any questions or concerns, please do not hesitate to contact help@opensrs.com

Get Started

get_transfers_away

Lists domains that have been transferred away. This command applies to all domains in a reseller's profile.

All attributes are optional, but can be used to narrow the search criteria. If no attributes are specified, all domains that were ever transferred-away from your profile are returned.

Request parameters for get_transfers_away

Standard parameters

  • action = get_transfers_away
  • object = domain

Attributes

Parameters within the attributes associative array are described below.

Parameter name
Obligation
Definition/Value

domain

Optional

Submit the domain name attribute only if you want to check if a particular domain has been transferred away.

gaining_registrar

Optional

Search for transfers-away according to gaining registrar. String and wildcards (*) accepted.

limit

Optional

The maximum number of domains to return per page, up to 40.

owner_confirm_from

Optional

Search for transferred-away domains according to the date from when the owner confirmed or denied the transfer. Can be used with the owner_confirm_to attribute to specify a range within which to search. The year specified cannot exceed 2030.

Use the format YYYY-MM-DD.

owner_confirm_to

Optional

Search for transferred-away domains according to the date prior to when the owner confirmed or denied the transfer. Can be used with the owner_confirm_from attribute to specify a range within which to search. The year specified cannot exceed 2030.

Use the format YYYY-MM-DD.

owner_request_from

Optional

Search for transferred domains according to
the date when the email was been sent to the request_address. Can be used with the owner_request_to attribute to specify a range within which to search. If not used with owner_request_to, all domains from the owner_request_from date onward are returned. The year specified cannot exceed 2030; otherwise an error is returned.

Use the format YYYY-MM-DD.

owner_request_to

Optional

Search for transferred domains according to the date prior to when the email was sent to the request_address. Can be used with the owner_request_from attribute to specify a range within which to search. If not used with owner_request_from, all domains ever transferred away from the owner_request_to date and earlier are returned. The year specified cannot exceed 2030; otherwise an error is returned.

Use the format YYYY-MM-DD.

page

Optional

Determines which page to retrieve, using the page number. The page index starts at 0 (zero).

req_from

Optional

Search for transferred domains according to the date when the transfer notification was sent. Can be used with the req_to attribute to specify a range within which to search. If not used with req_to, all domains from the req_from date onward are returned. The year specified cannot exceed 2030; otherwise an error is returned.

Use the format YYYY-MM-DD.

req_to

Optional

Search for transferred domains according to the date up until the transfer notification was sent. Can be used with the req_from attribute to specify a range within which to search. If not used with req_from, all domains prior to the req_to date onward are returned. The year specified cannot exceed 2030; otherwise an error is returned.

Use the format YYYY-MM-DD.

request_address

Optional

The admin email address at the time of notification. Wildcards (*) accepted.

status

Optional

Search for transferred domains by status.
Allowed values are pending_admin, pending_owner,pending_registry, completed, or cancelled.

Response parameters for get_transfers_away

Standard parameters

  • action = reply
  • object = domain
  • is_success = a Boolean is returned, 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

Attributes

If the request is successful, the attributes associative array may include the
following:

Parameter name
Obligation
Definition/Value

page

Returned if specified in the request and is_success=
true

The number of the page retrieved.

page_size

Returned if specified in the request and is_success =
true

The maximum number of domains returned per page.

total

Returned if is_success = true

The number of transferred-away domains.

transfers

Returned if a transferred- away domain exists and
meets the specified search criteria and is_success = true

Contains arrays that list details about each transfer-away.

For more information, see the Transfers table below.

Transfers

Parameters within the transfers associative array are described below.

Parameter name
Obligation
Definition/Value

domain

Returned if a transferred-away domain exists and meets the specified search criteria.

The domain that was transferred-away.

gaining_registrar

Always returned for transferred away domains.

The registrar that gained the transferred-away domain.

owner_choice

Always returned for transferred away domains.

Indicates the owner's response to the transfer-away request.

  • I—Ignored

  • Y—Approved

  • N—Declined

owner_confirm_date

Always returned for transferred away domains.

Date when the owner responded to the transfer request.

owner_confirm_date_epoch

Always returned for transferred away domains.

Date when the owner responded to the transfer request, in UNIX time.

owner_request_date

Always returned for transferred away domains.

Date when transfer request was sent to the owner.

owner_request_date_epoch

Always returned for transferred away domains.

Date when transfer request was sent to the owner, in UNIX time.

registry_request_date

Always returned for transferred away domains.

The date when the transfer request was sent to the registry.

registry_request_date_epoch

Always returned for transferred away domains.

The date when the transfer request was sent to the registry, in UNIX time.

request_address

Always returned for transferred away domains.

The admin contact email address, at the time of transfer notification

request_date

Always returned for transferred away domains.

The date when the transfer request was sent.

request_date_epoch

Always returned for transferred away domains.

The date when the transfer request was sent, in UNIX time.

status

Always returned for transferred away domains.

The status of the transfer:

Allowed values are

  • pending_admin

  • pending_owner

  • pending_registry

  • completed

  • cancelled.

Examples for get_transfers_away

Request

<?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="action">GET_TRANSFERS_AWAY</item>
                <item key="object">domain</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">example.com</item>
                        <item key="status">completed</item>
                        <item key="request_address">girl@example.com</item>
                        <item key="gaining_registrar">Tucows Inc.</item>
                        <item key="limit">40</item>
                        <item key="page">1</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Response

<?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="action">REPLY</item>
                <item key="object">DOMAIN</item>
                <item key="is_success">1</item>
                <item key="response_code">200</item>
                <item key="response_text">Command successful</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="page">1</item>
                        <item key="page_size">2</item>
                        <item key="total">1</item>
                        <item key="transfers">
                            <dt_array>
                                <item key="0">
                                    <dt_assoc>
                                        <item key="domain">example.com</item>
                                        <item key="status">completed</item>
                                        <item key="gaining_registrar">Tucows
                                            Inc.</item>
                                        <item key="owner_choice">Y</item>
                                        <item key="owner_confirm_ip">10.0.12.165</item>
                                        <item key="owner_request_date">20-JUL-
                                            2006 16:14:41</item>
                                        <item key="owner_request_date_epoch">1153426481</item>
                                        <item key="owner_confirm_date">20-JUL-
                                            2006 16:18:08</item>
                                        <item key="owner_confirm_date_epoch">1153426688</item>
                                        <item key="request_address">girl@example.com</item>
                                        <item key="request_date">20-JUL-2006
                                            16:14:36</item>
                                        <item key="request_date_epoch">1153426476</item>
                                        <item key="registry_request_date">20-JUL-
                                            2006 16:18:09</item>
                                        <item key="registry_request_date_epoch">1153426689</item>
                                    </dt_assoc>
                                </item>
                            </dt_array>
                        </item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

get_transfers_away

Lists domains that have been transferred away. This command applies to all domains in a reseller's profile.

All attributes are optional, but can be used to narrow the search criteria. If no attributes are specified, all domains that were ever transferred-away from your profile are returned.