Description

This function removes a parked domain (alias).
 

 

Examples


https://hostname.example.com:2087/cpsess###########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Park&cpanel_jsonapi_func=unpark&domain=fenway.com&subdomain=fenway.example.com

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Remove a parked domain.
$unpark = $cpanel->api2(
    'Park', 'unpark', 
       array(
       'domain'     => 'fenway.com'
       'subdomain'  => 'fenway.example.com'
    )
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Remove a parked domain.
my $unpark = $cpliveapi->api2(
    'Park', 'unpark',
    {
        'domain'           => 'fenway.com'
		'subdomain'        => 'fenway.example.com'
    }
);

 

cpapi2 --user=username Park unpark domain=fenway.com subdomain=fenway.example.com

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "unpark",
    "data": [
      {
        "reason": "fenway.com was successfully unparked",
        "result": 1
      }
    ],
    "event": {
      "result": 1
    },
    "module": "Park"
  }
}

Parameters

ReturnTypeDescriptionPossible valuesExample
domainstring

Required

The parked domain.

A valid domain on the cPanel account.

fenway.com
subdomainstring

The addon domain or subdomain's parent domain.

Use this parameter if the domain, addon domain, or subdomain is parked on another addon domain or subdomain.  

A valid subdomain on the cPanel account.
fenway.example.com

Returns

ReturnTypeDescriptionPossible valuesExample
reasonstring

Whether the function succeeded or failed.

A string that describes the error or success.

fenway.com was successfully unparked
resultBoolean

Whether the function succeeded.

  • 1 — The function succeeded.
  • 0 — The function failed.
1