Prev Chapter 45: Controller: /nodeworx/overview
Up Part II: NodeWorx API Spec
Chapter 47: Controller: /nodeworx/plugins Next
46 Controller: /nodeworx/packages
Required Permissions "PACKAGES"
Added in version 4.7.0-339
Description Add a siteworx package.
Input Parameters
Name | Type | Notes | Required? |
package_name | string | Yes | |
is_default | integer |
Example Values 1, 0 Example Default Value 0 |
No* |
OPT_STORAGE | double |
Description Megabytes Help Entry The amount of storage space allowed in megabytes |
Yes |
OPT_BANDWIDTH | double |
Description Gigabytes / Month Help Entry The amount of bandwidth allowed per month in gigabytes |
Yes |
OPT_EMAIL_ALIASES | integer |
Help Entry The number of e-mail aliases (often called e-mail forwards) allowed |
Yes |
OPT_EMAIL_AUTORESPONDERS | integer |
Help Entry The number of e-mail autoresponders, also called robots, allowed |
Yes |
OPT_EMAIL_BOXES | integer |
Help Entry The number of POP3/IMAP e-mail boxes allowed |
Yes |
OPT_EMAIL_GROUPS | integer |
Help Entry The number of group e-mail (aliases that send to multiple recipients) accounts allowed |
Yes |
OPT_FTP_ACCOUNTS | integer |
Help Entry The number of FTP accounts allowed |
Yes |
OPT_MYSQL_DBS | integer |
Help Entry The number of MySQL databases allowed |
Yes |
OPT_MYSQL_DB_USERS | integer |
Help Entry The number of MySQL users allowed |
Yes |
OPT_POINTER_DOMAINS | integer |
Help Entry The number of domains that can be pointed to this domain. Sometimes called "parked" domains. |
Yes |
OPT_SLAVE_DOMAINS | integer |
Help Entry The number of secondary domains allowed. Sometimes called "add-on" domains. |
Yes |
OPT_SUBDOMAINS | integer |
Help Entry The number of subdomains allowed |
Yes |
OPT_BACKUP | integer |
Help Entry Enables the ability to backup the account Example Values 1, 0 |
Yes |
OPT_CGI_ACCESS | integer |
Help Entry Indicator of whether or not CGI script access is enabled Example Values 1, 0 |
Yes |
OPT_CRONTAB | integer |
Help Entry Access to Crontab Example Values 1, 0 |
Yes |
OPT_DNS_RECORDS | integer |
Help Entry If yes, the SiteWorx account will be able to edit its own DNS records. (MX, SPF, and Domainkeys records are not effected by this setting) Example Values 1, 0 |
Yes |
OPT_SSL | integer |
Help Entry Enable SSL Certificates Example Values 1, 0 |
Yes |
OPT_BURSTABLE | integer |
Help Entry If you choose to be "burstable" your site will be able to go over its bandwidth allotment, perhaps at an extra cost (depending on the agreement). If you choose no, your bandwidth will be capped at a predefined limit and you will not be able to transfer any more data once the transfer limit is reached. Example Values 1, 0 |
Yes |
OPT_SAVE_XFER_LOGS | integer |
Help Entry If you answer yes to saving the transfer logs, the transfer logs will be saved in a format that can be downloaded. If you answer no, your logs are not saved and can not be downloaded and analyzed offline. Example Values 1, 0 |
Yes |
fpm_max_children | integer |
Help Entry Limits the number of simultaneous requests. Be careful with large numbers, as too many high-memory requests can cause the server to swap. Example Default Value 4 |
No* |
fpm_max_requests | integer |
Help Entry The number of requests each child process should execute before respawning. This can be useful to work around memory leaks in 3rd party libraries. For endless request processing specify ’0’ Example Default Value 8192 |
No* |
fpm_process_management | string |
Help Entry Choose how the process manager will control the number of child processes. Possible values: static, ondemand, dynamic. Example Values dynamic, static, ondemand Example Default Value ondemand |
No* |
fpm_start_servers | integer |
Help Entry The number of child processes created on startup. Used only when pm is set to dynamic. Example Default Value 2 |
No |
fpm_min_spare_servers | integer |
Help Entry The desired minimum number of idle server processes. Used only when pm is set to dynamic. Example Default Value 1 |
No |
fpm_max_spare_servers | integer |
Help Entry The desired maximum number of idle server processes. Used only when pm is set to dynamic. Example Default Value 4 |
No |
fpm_process_idle_timeout | string |
Help Entry The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand. Available units: s(econds)(default), m(inutes), h(ours), or d(ays). |
No |
* indicates that it’s actually required, but probably already has a valid default value |
Added in version 4.8.3-414
Description Backup a siteworx package.
Input Parameters
Name | Type | Notes | Required? |
id | struct (integer) | Yes |
Added in version 4.7.0-339
Description Delete a siteworx package.
Input Parameters
Name | Type | Notes | Required? |
id | struct (integer) | Yes |
Added in version 4.7.0-339
Description Edit a siteworx package.
Input Parameters
Name | Type | Notes | Required? |
id | integer | Yes | |
package_name | string |
Example Default Value unlimited |
No* |
is_default | integer |
Example Values 1, 0 Example Default Value 0 |
No* |
OPT_STORAGE | double |
Description Megabytes Help Entry The amount of storage space allowed in megabytes Example Default Value 999999999 |
No* |
OPT_BANDWIDTH | double |
Description Gigabytes / Month Help Entry The amount of bandwidth allowed per month in gigabytes Example Default Value 999999999 |
No* |
OPT_EMAIL_ALIASES | integer |
Help Entry The number of e-mail aliases (often called e-mail forwards) allowed Example Default Value 999999999 |
No* |
OPT_EMAIL_AUTORESPONDERS | integer |
Help Entry The number of e-mail autoresponders, also called robots, allowed Example Default Value 999999999 |
No* |
OPT_EMAIL_BOXES | integer |
Help Entry The number of POP3/IMAP e-mail boxes allowed Example Default Value 999999999 |
No* |
OPT_EMAIL_GROUPS | integer |
Help Entry The number of group e-mail (aliases that send to multiple recipients) accounts allowed Example Default Value 999999999 |
No* |
OPT_FTP_ACCOUNTS | integer |
Help Entry The number of FTP accounts allowed Example Default Value 999999999 |
No* |
OPT_MYSQL_DBS | integer |
Help Entry The number of MySQL databases allowed Example Default Value 999999999 |
No* |
OPT_MYSQL_DB_USERS | integer |
Help Entry The number of MySQL users allowed Example Default Value 999999999 |
No* |
OPT_POINTER_DOMAINS | integer |
Help Entry The number of domains that can be pointed to this domain. Sometimes called "parked" domains. Example Default Value 999999999 |
No* |
OPT_SLAVE_DOMAINS | integer |
Help Entry The number of secondary domains allowed. Sometimes called "add-on" domains. Example Default Value 999999999 |
No* |
OPT_SUBDOMAINS | integer |
Help Entry The number of subdomains allowed Example Default Value 999999999 |
No* |
OPT_BACKUP | integer |
Help Entry Enables the ability to backup the account Example Values 1, 0 Example Default Value 1 |
No* |
OPT_CGI_ACCESS | integer |
Help Entry Indicator of whether or not CGI script access is enabled Example Values 1, 0 Example Default Value 1 |
No* |
OPT_CRONTAB | integer |
Help Entry Access to Crontab Example Values 1, 0 Example Default Value 1 |
No* |
OPT_DNS_RECORDS | integer |
Help Entry If yes, the SiteWorx account will be able to edit its own DNS records. (MX, SPF, and Domainkeys records are not effected by this setting) Example Values 1, 0 Example Default Value 1 |
No* |
OPT_SSL | integer |
Help Entry Enable SSL Certificates Example Values 1, 0 Example Default Value 1 |
No* |
OPT_BURSTABLE | integer |
Help Entry If you choose to be "burstable" your site will be able to go over its bandwidth allotment, perhaps at an extra cost (depending on the agreement). If you choose no, your bandwidth will be capped at a predefined limit and you will not be able to transfer any more data once the transfer limit is reached. Example Values 1, 0 Example Default Value 1 |
No* |
OPT_SAVE_XFER_LOGS | integer |
Help Entry If you answer yes to saving the transfer logs, the transfer logs will be saved in a format that can be downloaded. If you answer no, your logs are not saved and can not be downloaded and analyzed offline. Example Values 1, 0 Example Default Value 1 |
No* |
fpm_max_children | integer |
Help Entry Limits the number of simultaneous requests. Be careful with large numbers, as too many high-memory requests can cause the server to swap. Example Default Value 4 |
No* |
fpm_max_requests | integer |
Help Entry The number of requests each child process should execute before respawning. This can be useful to work around memory leaks in 3rd party libraries. For endless request processing specify ’0’ Example Default Value 8192 |
No* |
fpm_process_management | string |
Help Entry Choose how the process manager will control the number of child processes. Possible values: static, ondemand, dynamic. Example Values dynamic, static, ondemand Example Default Value ondemand |
No* |
fpm_start_servers | integer |
Help Entry The number of child processes created on startup. Used only when pm is set to dynamic. Example Default Value 2 |
No |
fpm_min_spare_servers | integer |
Help Entry The desired minimum number of idle server processes. Used only when pm is set to dynamic. Example Default Value 1 |
No |
fpm_max_spare_servers | integer |
Help Entry The desired maximum number of idle server processes. Used only when pm is set to dynamic. Example Default Value 4 |
No |
fpm_process_idle_timeout | string |
Help Entry The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand. Available units: s(econds)(default), m(inutes), h(ours), or d(ays). |
No |
* indicates that it’s actually required, but probably already has a valid default value |
Added in version n/a
Description Magic function - test for failure mechanism.
Added in version 4.8.3-414
Description Import a siteworx package.
Input Parameters
Name | Type | Notes | Required? |
package_file | string | Yes | |
overwrite | integer |
Example Values 1 |
No |
Added in version 4.7.0-339
Description Lists SiteWorx package details.
Sample output
array (’status’ => 0,
’payload’ =>
array (
0 =>
array (
’id’ => ’8’,
’name’ => ’unlimited’,
’OPT_STORAGE’ => 999999999,
’OPT_BANDWIDTH’ => 999999999,
’OPT_EMAIL_ALIASES’ => 999999999,
’OPT_EMAIL_AUTORESPONDERS’ => 999999999,
’OPT_EMAIL_BOXES’ => 999999999,
’OPT_EMAIL_GROUPS’ => 999999999,
’OPT_FTP_ACCOUNTS’ => 999999999,
’OPT_MYSQL_DBS’ => 999999999,
’OPT_MYSQL_DB_USERS’ => 999999999,
’OPT_POINTER_DOMAINS’ => 999999999,
’OPT_SLAVE_DOMAINS’ => 999999999,
’OPT_SUBDOMAINS’ => 999999999,
’OPT_BACKUP’ => true,
’OPT_CGI_ACCESS’ => true,
’OPT_CRONTAB’ => true,
’OPT_DNS_RECORDS’ => true,
’OPT_SSL’ => true,
’OPT_BURSTABLE’ => true,
’OPT_SAVE_XFER_LOGS’ => true,
),
1 =>
array (
’id’ => ’9’,
’name’ => ’fifteens’,
’OPT_STORAGE’ => 15,
’OPT_BANDWIDTH’ => 15,
’OPT_EMAIL_ALIASES’ => 15,
’OPT_EMAIL_AUTORESPONDERS’ => 15,
’OPT_EMAIL_BOXES’ => 15,
’OPT_EMAIL_GROUPS’ => 15,
’OPT_FTP_ACCOUNTS’ => 15,
’OPT_MYSQL_DBS’ => 15,
’OPT_MYSQL_DB_USERS’ => 15,
’OPT_POINTER_DOMAINS’ => 15,
’OPT_SLAVE_DOMAINS’ => 15,
’OPT_SUBDOMAINS’ => 15,
’OPT_BACKUP’ => true,
’OPT_CGI_ACCESS’ => true,
’OPT_CRONTAB’ => true,
’OPT_DNS_RECORDS’ => true,
’OPT_SSL’ => true,
’OPT_BURSTABLE’ => true,
’OPT_SAVE_XFER_LOGS’ => true,
),
),
)
Added in version 4.7.0-339
Description List SiteWorx packages by id.
Warning This action has been deprecated as of version 4.8.0-393. 2011-01-18 Use listPackages instead
Sample output
array (’status’ => 0,
’payload’ =>
array (
0 =>
array (
0 => ’8’,
1 => ’unlimited’,
),
1 =>
array (
0 => ’9’,
1 => ’fifteens’,
),
),
)
Added in version 4.8.0-393
Description List SiteWorx Packages.
Sample output
array (’status’ => 0,
’payload’ =>
array (
0 =>
array (
’id’ => ’8’,
’name’ => ’unlimited’,
’options’ => ’OPT_STORAGE=999999999,OPT_BANDWIDTH=999999999,OPT_EMAIL_ALIASES=999999999,OPT_EMAIL_AUTORESPONDERS=999999999,OPT_EMAIL_BOXES=999999999,OPT_EMAIL_GROUPS=999999999,OPT_FTP_ACCOUNTS=999999999,OPT_MYSQL_DBS=999999999,OPT_MYSQL_DB_USERS=999999999,OPT_POINTER_DOMAINS=999999999,OPT_SLAVE_DOMAINS=999999999,OPT_SUBDOMAINS=999999999,OPT_BACKUP=1,OPT_CGI_ACCESS=1,OPT_CRONTAB=1,OPT_DNS_RECORDS=1,OPT_SSL=1,OPT_BURSTABLE=1,OPT_SAVE_XFER_LOGS=1,fpm_max_children=4,fpm_max_requests=8192,fpm_max_spare_servers=4,fpm_min_spare_servers=1,fpm_process_idle_timeout=120s,fpm_process_management=ondemand,fpm_start_servers=2,’,
’is_default’ => 0,
),
1 =>
array (
’id’ => ’9’,
’name’ => ’fifteens’,
’options’ => ’OPT_STORAGE=15,OPT_BANDWIDTH=15,OPT_EMAIL_ALIASES=15,OPT_EMAIL_AUTORESPONDERS=15,OPT_EMAIL_BOXES=15,OPT_EMAIL_GROUPS=15,OPT_FTP_ACCOUNTS=15,OPT_MYSQL_DBS=15,OPT_MYSQL_DB_USERS=15,OPT_POINTER_DOMAINS=15,OPT_SLAVE_DOMAINS=15,OPT_SUBDOMAINS=15,OPT_BACKUP=1,OPT_CGI_ACCESS=1,OPT_CRONTAB=1,OPT_DNS_RECORDS=1,OPT_SSL=1,OPT_BURSTABLE=1,OPT_SAVE_XFER_LOGS=1,fpm_max_children=4,fpm_max_requests=8192,fpm_max_spare_servers=4,fpm_min_spare_servers=1,fpm_process_idle_timeout=120s,fpm_process_management=ondemand,fpm_start_servers=2,’,
’is_default’ => 0,
),
),
)
Added in version n/a
Description Action to re-route from the current controller to a different one.
Input Parameters
Name | Type | Notes | Required? |
controller | string |
Example Values Index, Overview, Users, Lang, Themes, Apikey, Plugins, Twofactorauth, Notice, Siteworx, Shell, Packages, Backup, Import, Simplescripts, Reseller, ResellerPackages, ResellerBandwidthhistory, Http, Ftp, Sshd, MailMta, MailSmtp, MailSmtp2, MailSend, MailMda, MailPop3, MailSpop3, MailImap, MailSimap, MailSpam, MailVirus, MailQueue, Mysql, MysqlRemote, MysqlPhpmyadmin, Dns, DnsZone, DnsRecord, DnsSync, Nfs, NfsExport, NfsMount, Health, Cron, Firewall, Ssl, Logs, Settings, Updates, ... |
Yes |
Added in version n/a
Description Magic function - test for testing success mechanism.
Prev Chapter 45: Controller: /nodeworx/overview
Up Part II: NodeWorx API Spec
Chapter 47: Controller: /nodeworx/plugins Next
(C) 2019 by InterWorx LLC