Skip to content

Domains

Domains.listing

lists all domain entries

Permission

admin

Parameter

FieldTypeDescription
with_ipsbooloptional, default true
sql_searcharrayoptional array with index = fieldname, and value = array with 'op' => operator (one of <, > or =),LIKE is used if left empty and 'value' => searchvalue
sql_limitintoptional specify number of results to be returned
sql_offsetintoptional specify offset for resultset
sql_orderbyarrayoptional array with index = fieldname and value = ASC|DESC to order the resultset by one or morefields

Response

string as json-encoded array count|list

Domains.listingCount

returns the total number of accessible domains

Permission

admin

Response

string as json-encoded array count|list

Domains.add

add new domain entry

Permission

admin

Parameter

FieldTypeDescription
domainstringdomain-name
customeridintoptional, required when called as admin (if $loginname is not specified)
loginnamestringoptional, required when called as admin (if $customerid is not specified)
adminidintoptional, default is the calling admin's ID
ipandportarrayoptional list of ip/ports to assign to domain, default is system-default-ips
subcanemaildomainintoptional, allow subdomains of this domain as email domains, 1 = choosable (default no), 2 = choosable(default yes), 3 = always, default 0 (never)
isemaildomainbooloptional, allow email usage with this domain, default 0 (false)
email_onlybooloptional, restrict domain to email usage, default 0 (false)
selectserveraliasintoptional, 0 = wildcard, 1 = www-alias, 2 = none, default [system.domaindefaultalias]
speciallogfilebooloptional, whether to create an exclusive web-logfile for this domain, default 0 (false)
aliasintoptional, domain-id of a domain that the new domain should be an alias of, default 0 (none)
registration_datestringoptional, date of domain registration in form of YYYY-MM-DD, default empty (none)
termination_datestringoptional, date of domain termination in form of YYYY-MM-DD, default empty (none)
caneditdomainbooloptional, whether to allow the customer to edit domain settings, default 0 (false)
isbinddomainbooloptional, whether to generate a dns-zone or not (only of nameserver is activated), default 0 (false)
zonefilestringoptional, custom dns zone filename (only of nameserver is activated), default empty (auto-generated)
dkimbooloptional, currently not in use, default 0 (false)
specialsettingsstringoptional, custom webserver vhost-content which is added to the generated vhost, default empty
ssl_specialsettingsstringoptional, custom webserver vhost-content which is added to the generated ssl-vhost, default empty
include_specialsettingsbooloptional, whether to include non-ssl specialsettings in the generated ssl-vhost, default false
notryfilesbooloptional, [nginx only] do not generate the default try-files directive, default 0 (false)
writeaccesslogbooloptional, Enable writing an access-log file for this domain, default 1 (true)
writeerrorlogbooloptional, Enable writing an error-log file for this domain, default 1 (true)
documentrootstringoptional, specify homedir of domain by specifying a directory (relative to customer-docroot), beaware, if path starts with / it is considered a full path, not relative to customer-docroot. Alsospecifying a URL is possible here (redirect), default empty (autogenerated)
phpenabledbooloptional, whether php is enabled for this domain, default 0 (false)
openbasedirbooloptional, whether to activate openbasedir restriction for this domain, default 0 (false)
openbasedir_pathintoptional, either 0 for domains-docroot, 1 for customers-homedir or 2 for parent-directory of domains-docroot
phpsettingidintoptional, specify php-configuration that is being used by id, default 1 (system-default)
mod_fcgid_starterintoptional number of fcgid-starters if FCGID is used, default is -1
mod_fcgid_maxrequestsintoptional number of fcgid-maxrequests if FCGID is used, default is -1
ssl_redirectbooloptional, whether to generate a https-redirect or not, default false; requires SSL to be enabled
letsencryptbooloptional, whether to generate a Let's Encrypt certificate for this domain, default false; requiresSSL to be enabled
ssl_ipandportarrayoptional, list of ssl-enabled ip/port id's to assign to this domain, default empty
dont_use_default_ssl_ipandport_if_emptybooloptional, do NOT set the systems default ssl ip addresses if none are given via $ssl_ipandportparameter
sslenabledbooloptional, whether SSL is enabled for this domain, regardless of the assigned ssl-ips, default1 (true)
http2booloptional, whether to enable http/2 for this domain (requires to be enabled in the settings), default0 (false)
hsts_maxageintoptional max-age value for HSTS header
hsts_subbooloptional whether to add subdomains to the HSTS header
hsts_preloadbooloptional whether to preload HSTS header value
ocsp_staplingbooloptional whether to enable ocsp-stapling for this domain. default 0 (false), requires SSL
honorcipherorderbooloptional whether to honor the (server) cipher order for this domain. default 0 (false), requires SSL
sessionticketsbooloptional whether to enable or disable TLS sessiontickets (RFC 5077) for this domain. default 1(true), requires SSL
override_tlsbooloptional whether to override system-tls settings like protocol, ssl-ciphers and if applicabletls-1.3 ciphers, requires change_serversettings flag for the admin, default false
ssl_protocolsarrayoptional list of allowed/used ssl/tls protocols, see system.ssl_protocols setting, only used/requiredif $override_tls is true, default empty or system.ssl_protocols setting if $override_tls is true
ssl_cipher_liststringoptional list of allowed/used ssl/tls ciphers, see system.ssl_cipher_list setting, only used/requiredif $override_tls is true, default empty or system.ssl_cipher_list setting if $override_tls is true
tlsv13_cipher_liststringoptional list of allowed/used tls-1.3 specific ciphers, see system.tlsv13_cipher_list setting, onlyused/required if $override_tls is true, default empty or system.tlsv13_cipher_list setting if$override_tls is true
descriptionstringoptional custom description (currently not used/shown in the frontend), default empty

Response

string as json-encoded array

Domains.get

return a domain entry by either id or domainname

Permission

admin

Parameter

FieldTypeDescription
idintoptional, the domain-id
domainnamestringoptional, the domainname
with_ipsbooloptional, default true
no_std_subdomainbooloptional, default false

Response

string as json-encoded array

Domains.update

update domain entry by either id or domainname

Permission

admin

Parameter

FieldTypeDescription
idintoptional, the domain-id
domainnamestringoptional, the domainname
customeridintrequired (if $loginname is not specified)
loginnamestringrequired (if $customerid is not specified)
adminidintoptional, default is the calling admin's ID
ipandportarrayoptional list of ip/ports to assign to domain, default is system-default-ips
subcanemaildomainintoptional, allow subdomains of this domain as email domains, 1 = choosable (default no), 2 = choosable(default yes), 3 = always, default 0 (never)
isemaildomainbooloptional, allow email usage with this domain, default 0 (false)
email_onlybooloptional, restrict domain to email usage, default 0 (false)
selectserveraliasintoptional, 0 = wildcard, 1 = www-alias, 2 = none, default 0
speciallogfilebooloptional, whether to create an exclusive web-logfile for this domain, default 0 (false)
speciallogverifiedbooloptional, when setting $speciallogfile to false, this needs to be set to true to confirm the action,default 0 (false)
aliasintoptional, domain-id of a domain that the new domain should be an alias of, default 0 (none)
registration_datestringoptional, date of domain registration in form of YYYY-MM-DD, default empty (none)
termination_datestringoptional, date of domain termination in form of YYYY-MM-DD, default empty (none)
caneditdomainbooloptional, whether to allow the customer to edit domain settings, default 0 (false)
isbinddomainbooloptional, whether to generate a dns-zone or not (only of nameserver is activated), default 0 (false)
zonefilestringoptional, custom dns zone filename (only of nameserver is activated), default empty (auto-generated)
dkimbooloptional, currently not in use, default 0 (false)
specialsettingsstringoptional, custom webserver vhost-content which is added to the generated vhost, default empty
ssl_specialsettingsstringoptional, custom webserver vhost-content which is added to the generated ssl-vhost, default empty
include_specialsettingsbooloptional, whether to include non-ssl specialsettings in the generated ssl-vhost, default false
specialsettingsforsubdomainsbooloptional, whether to apply specialsettings to all subdomains of this domain, default is read fromsetting system.apply_specialsettings_default
notryfilesbooloptional, [nginx only] do not generate the default try-files directive, default 0 (false)
writeaccesslogbooloptional, Enable writing an access-log file for this domain, default 1 (true)
writeerrorlogbooloptional, Enable writing an error-log file for this domain, default 1 (true)
documentrootstringoptional, specify homedir of domain by specifying a directory (relative to customer-docroot), beaware, if path starts with / it is considered a full path, not relative to customer-docroot. Alsospecifying a URL is possible here (redirect), default empty (autogenerated)
phpenabledbooloptional, whether php is enabled for this domain, default 0 (false)
phpsettingsforsubdomainsbooloptional, whether to apply php-setting to apply to all subdomains of this domain, default is readfrom setting system.apply_phpconfigs_default
openbasedirbooloptional, whether to activate openbasedir restriction for this domain, default 0 (false)
openbasedir_pathintoptional, either 0 for domains-docroot, 1 for customers-homedir or 2 for parent-directory of domains-docroot
phpsettingidintoptional, specify php-configuration that is being used by id, default 1 (system-default)
mod_fcgid_starterintoptional number of fcgid-starters if FCGID is used, default is -1
mod_fcgid_maxrequestsintoptional number of fcgid-maxrequests if FCGID is used, default is -1
ssl_redirectbooloptional, whether to generate a https-redirect or not, default false; requires SSL to be enabled
letsencryptbooloptional, whether to generate a Let's Encrypt certificate for this domain, default false; requiresSSL to be enabled
ssl_ipandportarrayoptional, list of ssl-enabled ip/port id's to assign to this domain, if left empty, the current setvalue is being used, to remove all ssl ips use $remove_ssl_ipandport
remove_ssl_ipandportbooloptional, if set to true and no $ssl_ipandport value is given, the ip's get removed, otherwise, thecurrently set value is used, default false
sslenabledbooloptional, whether SSL is enabled for this domain, regardless of the assigned ssl-ips, default1 (true)
http2booloptional, whether to enable http/2 for this domain (requires to be enabled in the settings), default0 (false)
hsts_maxageintoptional max-age value for HSTS header
hsts_subbooloptional whether to add subdomains to the HSTS header
hsts_preloadbooloptional whether to preload HSTS header value
ocsp_staplingbooloptional whether to enable ocsp-stapling for this domain. default 0 (false), requires SSL
honorcipherorderbooloptional whether to honor the (server) cipher order for this domain. default 0 (false), requires SSL
sessionticketsbooloptional whether to enable or disable TLS sessiontickets (RFC 5077) for this domain. default 1(true), requires SSL
descriptionstringoptional custom description (currently not used/shown in the frontend), default empty
deactivatedbooloptional, if 1 (true) the domain can be deactivated/suspended

Response

string as json-encoded array

Domains.delete

delete a domain entry by either id or domainname

Permission

admin

Parameter

FieldTypeDescription
idintoptional, the domain-id
domainnamestringoptional, the domainname
is_stdsubdomainbooloptional, default false, specify whether it's a std-subdomain you are deleting as it does not countas subdomain-resource

Response

string as json-encoded array

Domains.duplicate

duplicate domain entry by either id or domainname. All parameters from Domains.add() can be used to overwrite source entity values if necessary.

Permission

admin

Parameter

FieldTypeDescription
idintoptional, the domain-id
domainnamestringoptional, the domainname
domainstringrequired, name of the new domain to be added

Response

string as json-encoded array