get_domain_forwarding
Queries the domain forwarding settings for a specified domain.
Request parameters for get_domain_forwarding
Standard parameters
- action = get_domain_forwarding
- object = domain
Attributes
Parameters within the attributes associative array are described below.
Parameter name | Obligation | Definition/Value |
---|---|---|
domain | Required | The relevant domain. |
Response parameters for get_domain_forwarding
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 |
---|---|---|
forwarding | Returned if is_success = true | A list of the subdomains that are forwarded; can be empty. For more information, see the Forwarding table below. |
Forwarding
Parameters within the forwarding associative array are described below.
Parameter name | Obligation | Definition/Value |
---|---|---|
description | Optional | The description of the website; used by search engines. |
destination_url | Optional | The full address of the destination website, for example, http://www.mycompany.com/ mybestpage.html, or the IP address, for example, http://12.34.56.123 |
enabled | Optional | Indicates whether domain forwarding is in effect. 0—Domain forwarding is off 1—Domain forwarding is on |
keywords | Optional | Descriptive words that a visitor might use when searching for the website; used by search engines. |
masked | Optional | Indicates whether the destination website address appears in the browser address field. 0—The actual destination address displays. 1—The destination address is masked and the original domain address is displayed instead. |
subdomain | Always returned | The third level of the domain name, such as www or ftp. Note: Although this parameter is required, its value can be null. |
title | Optional | The text that appears in the browser title bar. |
Examples for get_domain_forwarding
Example 1
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="forwarding" />
<item key="action">get_domain_forwarding</item>
<item key="object">domain</item>
<item key="attributes">
<dt_assoc>
<item key="domain">example.com</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="response_text">Command Successful</item>
<item key="response_code">200</item>
<item key="is_success">1</item>
<item key="attributes">
<dt_assoc>
<item key="forwarding">
<dt_array>
<item key="0">
<dt_assoc>
<item key="keywords" />
<item key="masked">0</item>
<item key="subdomain">mail</item>
<item key="destination_url">http://mail.example.org/webmail</item>
<item key="title">Main Web Mail Access 1</item>
<item key="description">Default Web Mail
Access</item>
<item key="enabled">1</item>
</dt_assoc>
</item>
<item key="1">
<dt_assoc>
<item key="keywords" />
<item key="masked">1</item>
<item key="subdomain">www</item>
<item key="destination_url">http://www.example.org</item>
<item key="title">Main Web Access 1</item>
<item key="description">Default Site Access
Forward</item>
<item key="enabled">1</item>
</dt_assoc>
</item>
</dt_array>
</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Example 2
Without end-user credentials
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_domain_forwarding</item>
<item key="object">domain</item>
<item key="attributes">
<dt_assoc>
<item key="domain">example.com</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="response_text">Command Successful</item>
<item key="response_code">200</item>
<item key="is_success">1</item>
<item key="attributes">
<dt_assoc>
<item key="forwarding">
<dt_array>
<item key="0">
<dt_assoc>
<item key="keywords" />
<item key="masked">1</item>
<item key="subdomain">mail</item>
<item key="destination_url">http://mail.example.org/webmail</item>
<item key="title">Main Web Mail Access 1</item>
<item key="description">Default Web Mail
Access</item>
<item key="enabled">1</item>
</dt_assoc>
</item>
<item key="1">
<dt_assoc>
<item key="keywords" />
<item key="masked">1</item>
<item key="subdomain">www</item>
<item key="destination_url">http://www.example.org</item>
<item key="title">Main Web Access 1</item>
<item key="description">Default Site Access
Forward</item>
<item key="enabled">1</item>
</dt_assoc>
</item>
</dt_array>
</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Updated about 2 years ago