Controller: /nodeworx/packages

Required Permissions

PACKAGES

Action: add

Added in Version

4.7.0-339

Description

Add a siteworx package.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

package_name

string

Yes

is_default

integer

No*

1, 0

0

OPT_STORAGE

double

Yes

The amount of storage space allowed in megabytes - Megabytes

OPT_BANDWIDTH

double

Yes

The amount of bandwidth allowed per month in gigabytes - Gigabytes / Month

OPT_EMAIL_ALIASES

integer

Yes

The number of email aliases (often called email forwards) allowed

OPT_EMAIL_AUTORESPONDERS

integer

Yes

The number of email autoresponders, also called robots, allowed

OPT_EMAIL_BOXES

integer

Yes

The number of POP3/IMAP email boxes allowed

OPT_EMAIL_GROUPS

integer

Yes

The number of group email (aliases that send to multiple recipients) accounts allowed

OPT_FTP_ACCOUNTS

integer

Yes

The number of FTP accounts allowed

OPT_MYSQL_DBS

integer

Yes

The number of MySQL databases allowed

OPT_MYSQL_DB_USERS

integer

Yes

The number of MySQL users allowed

OPT_POINTER_DOMAINS

integer

Yes

The number of domains that can be pointed to this domain. Sometimes called “parked” domains.

OPT_SLAVE_DOMAINS

integer

Yes

The number of secondary domains allowed. Sometimes called “add-on” domains.

OPT_SUBDOMAINS

integer

Yes

The number of subdomains allowed

OPT_BACKUP

integer

Yes

1, 0

Enables the ability to backup the account

OPT_CGI_ACCESS

integer

Yes

1, 0

Indicator of whether or not CGI script access is enabled

OPT_CRONTAB

integer

Yes

1, 0

Access to Crontab

OPT_DNS_RECORDS

integer

Yes

1, 0

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)

OPT_MAILMAN

integer

Yes

1, 0

Enable Mailman access

OPT_SSL

integer

Yes

1, 0

Enable SSL Certificates

OPT_BURSTABLE

integer

Yes

1, 0

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.

OPT_SAVE_XFER_LOGS

integer

Yes

1, 0

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.

fpm_max_children

integer

No*

4

Limits the number of simultaneous requests. Be careful with large numbers, as too many high-memory requests can cause the server to swap.

fpm_max_requests

integer

No*

8192

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’

fpm_process_management

string

No*

dynamic, static, ondemand

ondemand

Choose how the process manager will control the number of child processes. Possible values: static, ondemand, dynamic.

fpm_start_servers

integer

No

2

The number of child processes created on startup. Used only when pm is set to dynamic.

fpm_min_spare_servers

integer

No

1

The desired minimum number of idle server processes. Used only when pm is set to dynamic.

fpm_max_spare_servers

integer

No

4

The desired maximum number of idle server processes. Used only when pm is set to dynamic.

fpm_process_idle_timeout

string

No

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).

* indicates that it’s actually required, but probably already has a valid default value.

Action: backup

Added in Version

4.8.3-414

Description

Backup a siteworx package.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

id

struct (integer)

Yes

Action: delete

Added in Version

4.7.0-339

Description

Delete a siteworx package.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

id

struct (integer)

Yes

Action: edit

Added in Version

4.7.0-339

Description

Edit a siteworx package.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

id

integer

Yes

package_name

string

No*

Unlimited

is_default

integer

No*

1, 0

0

OPT_STORAGE

double

No*

999999999

The amount of storage space allowed in megabytes - Megabytes

OPT_BANDWIDTH

double

No*

999999999

The amount of bandwidth allowed per month in gigabytes - Gigabytes / Month

OPT_EMAIL_ALIASES

integer

No*

999999999

The number of email aliases (often called email forwards) allowed

OPT_EMAIL_AUTORESPONDERS

integer

No*

999999999

The number of email autoresponders, also called robots, allowed

OPT_EMAIL_BOXES

integer

No*

999999999

The number of POP3/IMAP email boxes allowed

OPT_EMAIL_GROUPS

integer

No*

999999999

The number of group email (aliases that send to multiple recipients) accounts allowed

OPT_FTP_ACCOUNTS

integer

No*

999999999

The number of FTP accounts allowed

OPT_MYSQL_DBS

integer

No*

999999999

The number of MySQL databases allowed

OPT_MYSQL_DB_USERS

integer

No*

999999999

The number of MySQL users allowed

OPT_POINTER_DOMAINS

integer

No*

999999999

The number of domains that can be pointed to this domain. Sometimes called “parked” domains.

OPT_SLAVE_DOMAINS

integer

No*

999999999

The number of secondary domains allowed. Sometimes called “add-on” domains.

OPT_SUBDOMAINS

integer

No*

999999999

The number of subdomains allowed

OPT_BACKUP

integer

No*

1, 0

1

Enables the ability to backup the account

OPT_CGI_ACCESS

integer

No*

1, 0

1

Indicator of whether or not CGI script access is enabled

OPT_CRONTAB

integer

No*

1, 0

1

Access to Crontab

OPT_DNS_RECORDS

integer

No*

1, 0

1

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)

OPT_MAILMAN

integer

No*

1, 0

1

Enable Mailman access

OPT_SSL

integer

No*

1, 0

1

Enable SSL Certificates

OPT_BURSTABLE

integer

No*

1, 0

1

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.

OPT_SAVE_XFER_LOGS

integer

No*

1, 0

1

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.

fpm_max_children

integer

No*

4

Limits the number of simultaneous requests. Be careful with large numbers, as too many high-memory requests can cause the server to swap.

fpm_max_requests

integer

No*

8192

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’

fpm_process_management

string

No*

dynamic, static, ondemand

ondemand

Choose how the process manager will control the number of child processes. Possible values: static, ondemand, dynamic.

fpm_start_servers

integer

No

2

The number of child processes created on startup. Used only when pm is set to dynamic.

fpm_min_spare_servers

integer

No

1

The desired minimum number of idle server processes. Used only when pm is set to dynamic.

fpm_max_spare_servers

integer

No

4

The desired maximum number of idle server processes. Used only when pm is set to dynamic.

fpm_process_idle_timeout

string

No

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).

* indicates that it’s actually required, but probably already has a valid default value.

Action: fail

Added in Version

n/a

Description

Magic function - test for failure mechanism.

Action: import

Added in Version

4.8.3-414

Description

Import a siteworx package.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

package_file

string

Yes

overwrite

integer

No

1

Action: listDetails

Added in Version

4.7.0-339

Description

Lists SiteWorx package details.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 =>
    array (
      'id' => '1',
      'name' => 'Unlimited',
      'OPT_STORAGE' => 999999999.0,
      'OPT_BANDWIDTH' => 999999999.0,
      '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_MAILMAN' => true,
      'OPT_SSL' => true,
      'OPT_BURSTABLE' => true,
      'OPT_SAVE_XFER_LOGS' => true,
    ),
    1 =>
    array (
      'id' => '2',
      'name' => 'Fifteens',
      'OPT_STORAGE' => 15.0,
      'OPT_BANDWIDTH' => 15.0,
      '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_MAILMAN' => true,
      'OPT_SSL' => true,
      'OPT_BURSTABLE' => true,
      'OPT_SAVE_XFER_LOGS' => true,
    ),
  ),
  'reply_code' => 205,
)

Action: listIds

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 => '1',
      1 => 'Unlimited',
    ),
    1 =>
    array (
      0 => '2',
      1 => 'Fifteens',
    ),
  ),
  'reply_code' => 205,
)

Action: listPackages

Added in Version

4.8.0-393

Description

List SiteWorx Packages.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 =>
    array (
      'id' => '1',
      '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_MAILMAN=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' => '2',
      '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_MAILMAN=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,
    ),
  ),
  'reply_code' => 205,
)

Action: reroute

Added in Version

n/a

Description

Action to re-route from the current controller to a different one.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

controller

string

Yes

Index, Overview, Users, Lang, Apikey, Plugins, Twofactorauth, Notice, Siteworx, Shell, Packages, Backup, Import, Softaculous, Reseller, ResellerPackages, ResellerBandwidthhistory, Http, Phpextensions, Ftp, Sshd, MailMta, MailSmtp, MailSmtp2, MailSend, MailMda, MailMsa, MailDovecot, MailSpam, MailVirus, MailMailman, MailQueue, Mysql, MysqlRemote, MysqlPhpmyadmin, Dns, DnsZone, DnsRecord, DnsSync, Nfs, NfsExport, NfsMount, Health, Cron, Firewall, Ssl, Logs, Settings, Updates, Rrd, …

Action: win

Added in Version

n/a

Description

Magic function - test for testing success mechanism.