Domains
Domains.listing
lists all domain entries
Permission
admin
Parameter
Field | Type | Description |
---|---|---|
with_ips | bool | optional, default true |
sql_search | array | optional array with index = fieldname, and value = array with 'op' => operator (one of <, > or =),LIKE is used if left empty and 'value' => searchvalue |
sql_limit | int | optional specify number of results to be returned |
sql_offset | int | optional specify offset for resultset |
sql_orderby | array | optional 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
Field | Type | Description |
---|---|---|
domain | string | domain-name |
customerid | int | optional, required when called as admin (if $loginname is not specified) |
loginname | string | optional, required when called as admin (if $customerid is not specified) |
adminid | int | optional, default is the calling admin's ID |
ipandport | array | optional list of ip/ports to assign to domain, default is system-default-ips |
subcanemaildomain | int | optional, allow subdomains of this domain as email domains, 1 = choosable (default no), 2 = choosable(default yes), 3 = always, default 0 (never) |
isemaildomain | bool | optional, allow email usage with this domain, default 0 (false) |
email_only | bool | optional, restrict domain to email usage, default 0 (false) |
selectserveralias | int | optional, 0 = wildcard, 1 = www-alias, 2 = none, default [system.domaindefaultalias] |
speciallogfile | bool | optional, whether to create an exclusive web-logfile for this domain, default 0 (false) |
alias | int | optional, domain-id of a domain that the new domain should be an alias of, default 0 (none) |
registration_date | string | optional, date of domain registration in form of YYYY-MM-DD, default empty (none) |
termination_date | string | optional, date of domain termination in form of YYYY-MM-DD, default empty (none) |
caneditdomain | bool | optional, whether to allow the customer to edit domain settings, default 0 (false) |
isbinddomain | bool | optional, whether to generate a dns-zone or not (only of nameserver is activated), default 0 (false) |
zonefile | string | optional, custom dns zone filename (only of nameserver is activated), default empty (auto-generated) |
dkim | bool | optional, currently not in use, default 0 (false) |
specialsettings | string | optional, custom webserver vhost-content which is added to the generated vhost, default empty |
ssl_specialsettings | string | optional, custom webserver vhost-content which is added to the generated ssl-vhost, default empty |
include_specialsettings | bool | optional, whether to include non-ssl specialsettings in the generated ssl-vhost, default false |
notryfiles | bool | optional, [nginx only] do not generate the default try-files directive, default 0 (false) |
writeaccesslog | bool | optional, Enable writing an access-log file for this domain, default 1 (true) |
writeerrorlog | bool | optional, Enable writing an error-log file for this domain, default 1 (true) |
documentroot | string | optional, 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) |
phpenabled | bool | optional, whether php is enabled for this domain, default 0 (false) |
openbasedir | bool | optional, whether to activate openbasedir restriction for this domain, default 0 (false) |
openbasedir_path | int | optional, either 0 for domains-docroot, 1 for customers-homedir or 2 for parent-directory of domains-docroot |
phpsettingid | int | optional, specify php-configuration that is being used by id, default 1 (system-default) |
mod_fcgid_starter | int | optional number of fcgid-starters if FCGID is used, default is -1 |
mod_fcgid_maxrequests | int | optional number of fcgid-maxrequests if FCGID is used, default is -1 |
ssl_redirect | bool | optional, whether to generate a https-redirect or not, default false; requires SSL to be enabled |
letsencrypt | bool | optional, whether to generate a Let's Encrypt certificate for this domain, default false; requiresSSL to be enabled |
ssl_ipandport | array | optional, list of ssl-enabled ip/port id's to assign to this domain, default empty |
dont_use_default_ssl_ipandport_if_empty | bool | optional, do NOT set the systems default ssl ip addresses if none are given via $ssl_ipandportparameter |
sslenabled | bool | optional, whether SSL is enabled for this domain, regardless of the assigned ssl-ips, default1 (true) |
http2 | bool | optional, whether to enable http/2 for this domain (requires to be enabled in the settings), default0 (false) |
hsts_maxage | int | optional max-age value for HSTS header |
hsts_sub | bool | optional whether to add subdomains to the HSTS header |
hsts_preload | bool | optional whether to preload HSTS header value |
ocsp_stapling | bool | optional whether to enable ocsp-stapling for this domain. default 0 (false), requires SSL |
honorcipherorder | bool | optional whether to honor the (server) cipher order for this domain. default 0 (false), requires SSL |
sessiontickets | bool | optional whether to enable or disable TLS sessiontickets (RFC 5077) for this domain. default 1(true), requires SSL |
override_tls | bool | optional 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_protocols | array | optional 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_list | string | optional 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_list | string | optional 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 |
description | string | optional custom description (currently not used/shown in the frontend), default empty |
is_stdsubdomain | bool | (internally)optional whether this is a standard subdomain for a customer which is being added so no usage is decreased |
Response
string
as json-encoded array
Domains.get
return a domain entry by either id or domainname
Permission
admin
Parameter
Field | Type | Description |
---|---|---|
id | int | optional, the domain-id |
domainname | string | optional, the domainname |
with_ips | bool | optional, default true |
no_std_subdomain | bool | optional, default false |
Response
string
as json-encoded array
Domains.update
update domain entry by either id or domainname
Permission
admin
Parameter
Field | Type | Description |
---|---|---|
id | int | optional, the domain-id |
domainname | string | optional, the domainname |
customerid | int | required (if $loginname is not specified) |
loginname | string | required (if $customerid is not specified) |
adminid | int | optional, default is the calling admin's ID |
ipandport | array | optional list of ip/ports to assign to domain, default is system-default-ips |
subcanemaildomain | int | optional, allow subdomains of this domain as email domains, 1 = choosable (default no), 2 = choosable(default yes), 3 = always, default 0 (never) |
isemaildomain | bool | optional, allow email usage with this domain, default 0 (false) |
email_only | bool | optional, restrict domain to email usage, default 0 (false) |
selectserveralias | int | optional, 0 = wildcard, 1 = www-alias, 2 = none, default 0 |
speciallogfile | bool | optional, whether to create an exclusive web-logfile for this domain, default 0 (false) |
speciallogverified | bool | optional, when setting $speciallogfile to false, this needs to be set to true to confirm the action,default 0 (false) |
alias | int | optional, domain-id of a domain that the new domain should be an alias of, default 0 (none) |
registration_date | string | optional, date of domain registration in form of YYYY-MM-DD, default empty (none) |
termination_date | string | optional, date of domain termination in form of YYYY-MM-DD, default empty (none) |
caneditdomain | bool | optional, whether to allow the customer to edit domain settings, default 0 (false) |
isbinddomain | bool | optional, whether to generate a dns-zone or not (only of nameserver is activated), default 0 (false) |
zonefile | string | optional, custom dns zone filename (only of nameserver is activated), default empty (auto-generated) |
dkim | bool | optional, currently not in use, default 0 (false) |
specialsettings | string | optional, custom webserver vhost-content which is added to the generated vhost, default empty |
ssl_specialsettings | string | optional, custom webserver vhost-content which is added to the generated ssl-vhost, default empty |
include_specialsettings | bool | optional, whether to include non-ssl specialsettings in the generated ssl-vhost, default false |
specialsettingsforsubdomains | bool | optional, whether to apply specialsettings to all subdomains of this domain, default is read fromsetting system.apply_specialsettings_default |
notryfiles | bool | optional, [nginx only] do not generate the default try-files directive, default 0 (false) |
writeaccesslog | bool | optional, Enable writing an access-log file for this domain, default 1 (true) |
writeerrorlog | bool | optional, Enable writing an error-log file for this domain, default 1 (true) |
documentroot | string | optional, 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) |
phpenabled | bool | optional, whether php is enabled for this domain, default 0 (false) |
phpsettingsforsubdomains | bool | optional, whether to apply php-setting to apply to all subdomains of this domain, default is readfrom setting system.apply_phpconfigs_default |
openbasedir | bool | optional, whether to activate openbasedir restriction for this domain, default 0 (false) |
openbasedir_path | int | optional, either 0 for domains-docroot, 1 for customers-homedir or 2 for parent-directory of domains-docroot |
phpsettingid | int | optional, specify php-configuration that is being used by id, default 1 (system-default) |
mod_fcgid_starter | int | optional number of fcgid-starters if FCGID is used, default is -1 |
mod_fcgid_maxrequests | int | optional number of fcgid-maxrequests if FCGID is used, default is -1 |
ssl_redirect | bool | optional, whether to generate a https-redirect or not, default false; requires SSL to be enabled |
letsencrypt | bool | optional, whether to generate a Let's Encrypt certificate for this domain, default false; requiresSSL to be enabled |
ssl_ipandport | array | optional, 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_ipandport | bool | optional, if set to true and no $ssl_ipandport value is given, the ip's get removed, otherwise, thecurrently set value is used, default false |
sslenabled | bool | optional, whether SSL is enabled for this domain, regardless of the assigned ssl-ips, default1 (true) |
http2 | bool | optional, whether to enable http/2 for this domain (requires to be enabled in the settings), default0 (false) |
hsts_maxage | int | optional max-age value for HSTS header |
hsts_sub | bool | optional whether to add subdomains to the HSTS header |
hsts_preload | bool | optional whether to preload HSTS header value |
ocsp_stapling | bool | optional whether to enable ocsp-stapling for this domain. default 0 (false), requires SSL |
honorcipherorder | bool | optional whether to honor the (server) cipher order for this domain. default 0 (false), requires SSL |
sessiontickets | bool | optional whether to enable or disable TLS sessiontickets (RFC 5077) for this domain. default 1(true), requires SSL |
description | string | optional custom description (currently not used/shown in the frontend), default empty |
deactivated | bool | optional, 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
Field | Type | Description |
---|---|---|
id | int | optional, the domain-id |
domainname | string | optional, the domainname |
is_stdsubdomain | bool | optional, default false, specify whether it's a std-subdomain you are deleting as it does not countas subdomain-resource |
delete_userfiles | bool | optional, delete email account files on filesystem (if any), default false |
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
Field | Type | Description |
---|---|---|
id | int | optional, the domain-id |
domainname | string | optional, the domainname |
domain | string | required, name of the new domain to be added |
Response
string
as json-encoded array