Child pages
  • WHM API 1 Functions - create_parked_domain_for_user

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function creates an alias (parks a domain on a web virtual host).


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/create_parked_domain_for_user?api.version=1&domain=park.example.com&username=username&web_vhost_domain=vhost.example.com



Expand
titleCommand Line


Code Block
languagebash
whmapi1 create_parked_domain_for_user domain=park.domain.com username=username web_vhost_domain=vhost.example.com

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "create_parked_domain_for_user"
  }
}


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample

domain

string

Required

The domain name to park.

A valid domain name.

park.example.com

usernamestring

Required

The cPanel user account.

A valid cPanel account username.username
web_vhost_domainstring

Required

An existing web virtual host to which the new domain name should be added.

Note
titleNote:

If this is not the cPanel account’s main domain, then the system will consider the new domain to be an addon domain.


A valid web virtual host on the cPanel account.

vhost.example.com

Returns

This function only returns metadata.