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

query (surname)

Queries the properties of the domain.

Request parameters for query (surname)

Standard parameters

  • action = query
  • object = surname

Attributes

Parameters within the attributes associative array are described below.

Parameter name
Obligation
Definition/Value

domain

Required

The Personal Names domain to be queried.

query_dns

Optional

Requests information about the DNS settings.

  • 0—Do not return DNS information; this is the default.

  • 1—Return all DNS records for the zone.

query_email

Optional

Requests information about the associated email account.

  • 0—Do not return email account information; this is the default.

  • 1—Return information about the email account.

Response parameters for query (surname)

Standard parameters

  • action = reply
  • object = surname
  • 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

created_on

Returned if is_success = true

Date the domain was created.

domain

Returned if is_success = true

The Personal Names domain to which the returned values apply.

mailbox

Optional

Information about the mailbox.

For more information, see the Mailbox table below.

state

Optional

Current status of the Personal Names domain. Available value is active.

zone

Optional

Information about the DNS records.

For more information, see the Zone table below.

Mailbox

Parameters within the mailbox associative array are described below.

Parameter name
Obligation
Definition/Value

forward_email

Optional

The address to which email is forwarded.

mailbox_type

Optional

The type of mailbox: MAILBOX or WEBMAIL_ONLY.

Records

Parameters within the records associative array are described below.

Parameter name
Obligation
Definition/Value

content

Optional

The IP address or fully qualified domain name.

name

Optional

The unqualified domain name or @ symbol.

type

Optional

The type of DNS record. Allowed values are A and CNAME.

Zone

Parameters within the zone associative array are described below.

Parameter name
Obligation
Definition/Value

records

Optional

A list of the DNS records associated with the domain, along with their values.

zone_id

Optional

Internal identifier for the DNS zone.

Examples for query (surname)

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">QUERY</item>
                <item key="object">SURNAME</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">steven.smith.net</item>
                        <item key="query_email">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="object">SURNAME</item>
                <item key="response_text">Command completed successfully.</item>
                <item key="action">QUERY:REPLY</item>
                <item key="response_code">200</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">steven.smith.net</item>
                        <item key="created_on">2016-05-12T21:39:11.000-04:00</item>
                        <item key="mailbox">
                            <dt_assoc>
                                <item key="response_text">OK</item>
                                <item key="is_success">1</item>
                                <item key="mailbox_type">MAILBOX</item>
                            </dt_assoc>
                        </item>
                        <item key="state">active</item>
                    </dt_assoc>
                </item>
                <item key="is_success">1</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

query (surname)

Queries the properties of the domain.