Controller: Siteworx

API Controller /nodeworx/siteworx
Required Permissions ["SWACCOUNTS"]
Action Description
add Add a SiteWorx account.
bulkactivate Bulk activate SiteWorx Accounts. DEPRECATED in version 4.8.0-393
bulkdeactivate Bulk deactivate SiteWorx accounts. DEPRECATED in version 4.8.0-393
bulkdelete Bulk delete SiteWorx accounts. DEPRECATED in version 4.8.0-393
delete Delete a SiteWorx Account.
edit Edit a SiteWorx account.
listAccounts List Siteworx accounts summary.
listBandwidthAndStorage Lists bandwidth and storage usage for the current billing period.
listCurrentDomainBandwidthData List bw data for all master and secondary domains for the active biling period.
listDedicatedFreeIps List available dedicated ip addresses.
listFreeIps List available ip addresses.
listMasterDomains List master domains.
listSharedFreeIps List available shared ip addresses.
listSiteworxAccounts List SiteWorx accounts (id, status, domain). DEPRECATED in version 4.8.0-393
queryAccountBandwidth Query Siteworx Account bandwidth usage data for any billing period.
queryDomainInfo Get info about a domain on the system. Can be used to see if a domain exists.
querySiteworxAccountDetails Get all SiteWorx account properties of a given domain.
querySiteworxAccounts Query Siteworx accounts by specifying which properties you want returned.
search Search siteworx accounts summary.
siteworxLogin Login to a given SiteWorx account.
suspend Suspend a SiteWorx account.
suspendByUser Suspend a SiteWorx account by unix user name.
syncServerAlias Synchronize server aliases with InterWorx database.
syncVirtualHosts Synchronize InterWorx and Apache vitrual host blocks.
toggleFavorite Toggle a "favorite" SiteWorx account.
unsuspend Unsuspend a SiteWorx account.
unsuspendByUser Unsuspend a SiteWorx account by unix user name.

Action: add

Add a SiteWorx account.

Input Parameters

Name Type Notes Required?
domainname string
Help Entry
Enter the domain name you'd like to setup a SiteWorx account for on this line. You should enter the domain name only, WITHOUT the 'www' prefix (i.e. yourdomain.com and NOT www.yourdomain.com). If you'd like to setup an account with a prefix (i.e. games.yourdomain.com) you can do that here which will make a bona fide SiteWorx account for that domain. You can also just setup yourdomain.com and then add a 'games' subdomain from within SiteWorx if you prefer.
Yes
ipaddress string
Help Entry
The IP address list shows you the current IP addresses that are available on your server.
Example Values
123.123.123.123, 123.123.123.125
Yes
database_server string
Help Entry
Select the database server from the list that you would like to use.
Example Values
localhost
Example Default Value
localhost
No*
billing_day integer
Help Entry
The billing day is the day of the month (1-31) that this reseller's monthly bandwidth calculation will start back at 0.
Example Values
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
Example Default Value
1
No*
uniqname string Yes
nickname string
Help Entry
A 'nickname' can be given to each SiteWorx account holder. This field is optional.
No
email string
Help Entry
Enter the e-mail address of this SiteWorx account holder. This will serve as a contact address for the account and will be used by the account holder to login to SiteWorx.
Yes
encrypted string
Description
"y" if the password is ALREADY encrypted, "n" if the password is not yet encrypted. Default: n
Example Values
y, n
Example Default Value
n
No*
password string
Help Entry
Enter a password for the SiteWorx account holder and make it secure (i.e. long and random) ;).
Yes
confirm_password string
Help Entry
Confirm the password field by providing it again. Must match the password provided.
Yes
language string
Help Entry
Language used for user when logged in
Example Values
cs, en-us, fr, de, hu, it, pl, pt, sk, es, sv, tr
Example Default Value
en-us
No*
theme string
Example Values
blue_steel, calliope, coolfreshness, interstate, interworx, nexcess, vanillaice
Example Default Value
interworx
No*
menu_style string
Example Values
big, small
Example Default Value
small
No*
packagetemplate string
Help Entry
A package template is a blueprint for the package to setup. You don't have to use a package template but it is often easier to use one so you don't have to specify all options every time you setup a SiteWorx account.
Example Values
, hosting package one
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
Example Default Value
0
No*
OPT_CGI_ACCESS integer
Help Entry
Indicator of whether or not CGI script access is enabled
Example Values
1, 0
Example Default Value
0
No*
OPT_CRONTAB integer
Help Entry
Access to Crontab
Example Values
1, 0
Example Default Value
0
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
0
No*
OPT_RESOLVE_XFERLOG_DNS integer
Help Entry
If you choose to resolve DNS name, your statistics will reflect human readable domain names rather than numeric ip addresses.
Example Values
1, 0
Example Default Value
0
No*
OPT_SSL integer
Help Entry
Enable SSL Certificates
Example Values
1, 0
Example Default Value
0
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
0
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
0
No*
simplescripts integer
Example Values
1, 0
Example Default Value
1
No*
* indicates that it's actually required, but probably already has a valid default value

Action: bulkactivate (Added in version 4.2.0-260)

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-01-20 Use unsuspend instead.

Bulk activate SiteWorx Accounts.

Input Parameters

Name Type Notes Required?
domains struct (string)
Example Values
mydomain.com, example.com
No*
* indicates that it's actually required, but probably already has a valid default value

Action: bulkdeactivate (Added in version 4.2.0-260)

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-01-20 Use suspend instead.

Bulk deactivate SiteWorx accounts.

Input Parameters

Name Type Notes Required?
domains struct (string)
Example Values
mydomain.com, example.com
No*
* indicates that it's actually required, but probably already has a valid default value

Action: bulkdelete

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-01-20 Use delete instead.

Bulk delete SiteWorx accounts.

Input Parameters

Name Type Notes Required?
domains struct (string)
Example Values
mydomain.com, example.com
Yes
confirm_action struct (integer)
Example Values
1
No*
* indicates that it's actually required, but probably already has a valid default value

Action: delete

Delete a SiteWorx Account.

Input Parameters

Name Type Notes Required?
domain struct (string)
Example Values
mydomain.com, example.com
Yes
confirm_action struct (integer)
Example Values
1
No*
* indicates that it's actually required, but probably already has a valid default value

Action: edit

Edit a SiteWorx account.

Input Parameters

Name Type Notes Required?
domain string
Example Values
mydomain.com, example.com
Yes
ipaddress string
Help Entry
The IP address list shows you the current IP addresses that are available on your server.
Example Values
123.123.123.123, 123.123.123.125
Example Default Value
123.123.123.123
No*
ipenable struct (integer)
Example Values
1
Example Default Value
["1"]
No
reseller integer
Example Values
1, 2
Example Default Value
1
No*
billing_day integer
Help Entry
The billing day is the day of the month (1-31) that this reseller's monthly bandwidth calculation will start back at 0.
Example Values
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
Example Default Value
1
No*
status integer
Example Values
1, 0
Example Default Value
1
No*
nickname string
Help Entry
A 'nickname' can be given to each SiteWorx account holder. This field is optional.
Example Default Value
Test User
No
email string
Help Entry
Enter the e-mail address of this SiteWorx account holder. This will serve as a contact address for the account and will be used by the account holder to login to SiteWorx.
Example Default Value
test@user.com
No*
encrypted string
Description
"y" if the password is ALREADY encrypted, "n" if the password is not yet encrypted. Default: n
Example Values
y, n
Example Default Value
n
No*
password string
Help Entry
Enter a password for the SiteWorx account holder and make it secure (i.e. long and random) ;).
No
confirm_password string
Help Entry
Confirm the password field by providing it again. Must match the password provided.
No
language string
Help Entry
Language used for user when logged in
Example Values
cs, en-us, fr, de, hu, it, pl, pt, sk, es, sv, tr
Example Default Value
en-us
No*
theme string
Example Values
blue_steel, calliope, coolfreshness, interstate, interworx, nexcess, vanillaice
Example Default Value
interworx
No*
menu_style string
Example Values
big, small
Example Default Value
small
No*
packagetemplate string
Help Entry
A package template is a blueprint for the package to setup. You don't have to use a package template but it is often easier to use one so you don't have to specify all options every time you setup a SiteWorx account.
Example Values
__mydomain.com, hosting package one
Example Default Value
__mydomain.com
No
OPT_STORAGE double
Description
Megabytes
Help Entry
The amount of storage space allowed in megabytes
Example Default Value
10
No*
OPT_BANDWIDTH double
Description
Gigabytes / Month
Help Entry
The amount of bandwidth allowed per month in gigabytes
Example Default Value
10
No*
OPT_EMAIL_ALIASES integer
Help Entry
The number of e-mail aliases (often called e-mail forwards) allowed
Example Default Value
10
No*
OPT_EMAIL_AUTORESPONDERS integer
Help Entry
The number of e-mail autoresponders, also called robots, allowed
Example Default Value
10
No*
OPT_EMAIL_BOXES integer
Help Entry
The number of POP3/IMAP e-mail boxes allowed
Example Default Value
10
No*
OPT_EMAIL_GROUPS integer
Help Entry
The number of group e-mail (aliases that send to multiple recipients) accounts allowed
Example Default Value
10
No*
OPT_FTP_ACCOUNTS integer
Help Entry
The number of FTP accounts allowed
Example Default Value
10
No*
OPT_MYSQL_DBS integer
Help Entry
The number of MySQL databases allowed
Example Default Value
10
No*
OPT_MYSQL_DB_USERS integer
Help Entry
The number of MySQL users allowed
Example Default Value
10
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
10
No*
OPT_SLAVE_DOMAINS integer
Help Entry
The number of secondary domains allowed. Sometimes called "add-on" domains.
Example Default Value
10
No*
OPT_SUBDOMAINS integer
Help Entry
The number of subdomains allowed
Example Default Value
10
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
0
No*
OPT_RESOLVE_XFERLOG_DNS integer
Help Entry
If you choose to resolve DNS name, your statistics will reflect human readable domain names rather than numeric ip addresses.
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*
simplescripts integer
Example Values
1, 0
Example Default Value
1
No*
* indicates that it's actually required, but probably already has a valid default value

Action: listAccounts (Added in version 4.8.0-393)

List Siteworx accounts summary.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'siteworx_id' => '131',
      'uniqname' => 'example',
      'date_created' => '1336523004',
      'status' => 'active',
      'nodeworx_id' => '1',
      'package_id' => '132',
      'nickname' => 'Example User',
      'email' => 'user@example.com',
      'user_type' => 'master',
      'domain' => 'example.com',
      'domain_type' => 'master',
      'storage' => '7712768',
      'storage_pct' => '7.3554687573555e-07',
      'bandwidth' => '0',
      'bandwidth_pct' => '0',
      'max_bandwidth' => '999999999',
      'max_storage' => '999999999',
      'is_favorite' => '0',
    ),
    1 => 
    array (
      'siteworx_id' => '1',
      'uniqname' => 'mydomain',
      'date_created' => '1250740800',
      'status' => 'active',
      'nodeworx_id' => '1',
      'package_id' => '1',
      'nickname' => 'Test User',
      'email' => 'test@user.com',
      'user_type' => 'master',
      'domain' => 'mydomain.com',
      'domain_type' => 'master',
      'storage' => '9146368',
      'storage_pct' => '87.2265625',
      'bandwidth' => '0',
      'bandwidth_pct' => '0',
      'max_bandwidth' => '10',
      'max_storage' => '10',
      'is_favorite' => '0',
    ),
  ),
)

Action: listBandwidthAndStorage (Added in version 4.2.0-264)

Lists bandwidth and storage usage for the current billing period.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'id' => '1',
      'domain' => 'mydomain.com',
      'bandwidth_used' => '0.00',
      'bandwidth' => '10',
      'storage_used' => '8.72',
      'storage' => '10',
    ),
    1 => 
    array (
      'id' => '131',
      'domain' => 'example.com',
      'bandwidth_used' => '0.00',
      'bandwidth' => '999999999',
      'storage_used' => '7.36',
      'storage' => '999999999',
    ),
  ),
)

Action: listCurrentDomainBandwidthData (Added in version 4.7.1-343)

List bw data for all master and secondary domains for the active biling period.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'reseller_id' => '1',
      'email' => 'nodeworx_user@example.com',
      'domain_name' => 'example.com',
      'master_domain' => 'example.com',
      'bw_type' => 'http',
      'in_counter' => '0',
      'out_counter' => '0',
      'in_bytes' => '0',
      'out_bytes' => '0',
    ),
    1 => 
    array (
      'reseller_id' => '1',
      'email' => 'nodeworx_user@example.com',
      'domain_name' => 'example.com',
      'master_domain' => 'example.com',
      'bw_type' => 'ftp',
      'in_counter' => '0',
      'out_counter' => '0',
      'in_bytes' => '0',
      'out_bytes' => '0',
    ),
    2 => 
    array (
      'reseller_id' => '1',
      'email' => 'nodeworx_user@example.com',
      'domain_name' => 'mydomain.com',
      'master_domain' => 'mydomain.com',
      'bw_type' => 'http',
      'in_counter' => '0',
      'out_counter' => '0',
      'in_bytes' => '0',
      'out_bytes' => '0',
    ),
  ),
)

Action: listDedicatedFreeIps

List available dedicated ip addresses.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      0 => '123.123.123.125',
      1 => '123.123.123.125 (Dedicated)',
    ),
  ),
)

Action: listFreeIps

List available ip addresses.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      0 => '123.123.123.123',
      1 => '123.123.123.123 (Shared)',
    ),
    1 => 
    array (
      0 => '123.123.123.125',
      1 => '123.123.123.125 (Dedicated)',
    ),
  ),
)

Action: listMasterDomains

List master domains.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 'mydomain.com',
    1 => 'example.com',
  ),
)

Action: listSharedFreeIps

List available shared ip addresses.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      0 => '123.123.123.123',
      1 => '123.123.123.123 (Shared)',
    ),
  ),
)

Action: listSiteworxAccounts

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-01-21 Use listAccounts.

List SiteWorx accounts (id, status, domain).

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'id' => '1',
      'domain' => 'mydomain.com',
      'status' => 'active',
    ),
    1 => 
    array (
      'id' => '131',
      'domain' => 'example.com',
      'status' => 'active',
    ),
  ),
)

Action: queryAccountBandwidth (Added in version 4.9.0-426)

Query Siteworx Account bandwidth usage data for any billing period.

Input Parameters

Name Type Notes Required?
domains struct (string)
Help Entry
Select accounts to view bandwidth data for. Selecting none is the same as selecting all.
Example Values
mydomain.com, example.com
No
timestamp integer
Help Entry
A Unix Timestamp to identify the billing period from which the bandwidth data will be shown. If blank, defaults to the current time.
No

Action: queryDomainInfo (Added in version 4.9.0-426)

Get info about a domain on the system. Can be used to see if a domain exists.

Input Parameters

Name Type Notes Required?
domain string
Example Values
mydomain.com, example.com, sub.example.com, pointer.com, secondary.com
Yes

Action: querySiteworxAccountDetails

Get all SiteWorx account properties of a given domain.

Input Parameters

Name Type Notes Required?
domain string
Example Values
mydomain.com, example.com
Yes

Action: querySiteworxAccounts

Query Siteworx accounts by specifying which properties you want returned.

Input Parameters

Name Type Notes Required?
domain struct (string)
Example Values
mydomain.com, example.com
Example Default Value
["mydomain.com","example.com"]
No*
account_data struct (string)
Example Values
all, id, status, billingday, external_id, unixuser, date_created, nickname, email, language, theme, domain, ip, package_name, storage_used, bandwidth_used, uid, gid, reseller_id, opt_storage, opt_bandwidth, opt_email_aliases, opt_email_autoresponders, opt_email_boxes, opt_email_groups, opt_ftp_accounts, opt_mysql_dbs, opt_mysql_db_users, opt_pointer_domains, opt_slave_domains, opt_subdomains, opt_backup, opt_cgi_access, opt_crontab, opt_dns_records, opt_resolve_xferlog_dns, opt_ssl, opt_burstable, opt_save_xfer_logs, all_package_options
Example Default Value
["id","status","domain"]
No*
* indicates that it's actually required, but probably already has a valid default value

Search siteworx accounts summary.

Input Parameters

Name Type Notes Required?
query string No
reseller string
Example Values
all, 1, 2
Yes

Action: siteworxLogin

Login to a given SiteWorx account.

Input Parameters

Name Type Notes Required?
login_domain string
Example Values
mydomain.com, example.com, sub.example.com, pointer.com, secondary.com
Yes
account_action string
Example Values
siteworxLogin, edit
Example Default Value
siteworxLogin
No*
* indicates that it's actually required, but probably already has a valid default value

Action: suspend (Added in version 4.3.0-290)

Suspend a SiteWorx account.

Input Parameters

Name Type Notes Required?
domain struct (string)
Example Values
mydomain.com, example.com
Yes

Action: suspendByUser (Added in version 4.8.0-393)

Suspend a SiteWorx account by unix user name.

Input Parameters

Name Type Notes Required?
user struct (string)
Example Values
example, mydomain
Yes

Action: syncServerAlias (Added in version 4.3.0-290)

Synchronize server aliases with InterWorx database.

Input Parameters

Name Type Notes Required?
domain string
Example Values
mydomain.com, example.com, secondary.com
Yes
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: syncVirtualHosts (Added in version 4.3.0-290)

Synchronize InterWorx and Apache vitrual host blocks.

Input Parameters

Name Type Notes Required?
domain string
Example Values
mydomain.com, example.com
Yes
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: toggleFavorite

Toggle a "favorite" SiteWorx account.

Input Parameters

Name Type Notes Required?
domain string
Example Values
mydomain.com, example.com
Yes

Action: unsuspend (Added in version 4.3.0-290)

Unsuspend a SiteWorx account.

Input Parameters

Name Type Notes Required?
domain struct (string)
Example Values
mydomain.com, example.com
Yes

Action: unsuspendByUser (Added in version 4.8.0-393)

Unsuspend a SiteWorx account by unix user name.

Input Parameters

Name Type Notes Required?
user struct (string)
Example Values
example, mydomain
Yes