Chapter 93: Controller: /siteworx/twofactorauth Up Part III: SiteWorx API Spec

94 Controller: /siteworx/users

Required Permissions "USERS"
Action: activate
Added in version 4.8.0-393
Description Activates a SiteWorx user.
Input Parameters
Name Type Notes Required?
user struct (string) Example Values
second@interworx.com
Yes
Action: add
Added in version 4.7.0-339
Description Add a siteworx user.
Input Parameters
Name Type Notes Required?
nickname string No
email string 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 Yes
confirm_password string Help Entry
Confirm the password field by providing it again. Must match the password provided.
Yes
language string Example Values
zh, cs, da, nl, en-us, fr, de, hu, it, pl, pt, ru, sk, es, sv, tr
Example Default Value
en-us
No*
menu_style string Example Values
big, small
Example Default Value
big
No*
perms struct (string) Example Values
OVERVIEW, LOGIN, EMAIL, STATS, FTP, LOGS, MYSQL, BACKUP, SUBDOMAINS, PREFERENCES, USERS, FILEMANAGER, POINTERDOMS, CRONTAB, SSL, HTACCESS, SLAVEDOMS, RUBYONRAILS, DNS, simplescripts
Example Default Value
["LOGIN"]
No
locked_domains string Help Entry
Users may be locked to a subset of domains. This field is a comma separated list of domains, and may additionally use the negation operator (!) and the wildcard (*).
No
* indicates that it’s actually required, but probably already has a valid default value
Action: deactivate
Added in version 4.8.0-393
Description Deactivates (but does not delete) a SiteWorx user.
Input Parameters
Name Type Notes Required?
user struct (string) Example Values
second@interworx.com
Yes
Action: delete
Added in version 4.7.0-339
Description Delete a siteworx user.
Input Parameters
Name Type Notes Required?
user struct (string) Example Values
second@interworx.com
Yes
Action: edit
Added in version 4.7.0-339
Description Edit a siteworx user.
Input Parameters
Name Type Notes Required?
user string Example Values
user@example.com, second@interworx.com
Yes
nickname string Example Default Value
Example User
No
email string Example Default Value
user@example.com
No*
language string Example Values
zh, cs, da, nl, en-us, fr, de, hu, it, pl, pt, ru, sk, es, sv, tr
Example Default Value
en-us
No*
menu_style string Example Values
big, small
Example Default Value
big
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 No
confirm_password string Help Entry
Confirm the password field by providing it again. Must match the password provided.
No
* indicates that it’s actually required, but probably already has a valid default value
Action: list
Added in version 4.7.0-339
Description List SiteWorx users.
Warning This action has been deprecated as of version 4.8.0-393. 2011-01-27 use ListUsersAction
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
0 => ’user@example.com’,
1 => ’Example User (user@example.com)’,
),
1 =>
array (
0 => ’second@interworx.com’,
1 => ’NW Secondary User (second@interworx.com)’,
),
),
)
Action: listDeletable
Added in version 4.7.0-339
Description List deletable SiteWorx users.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
0 => ’second@interworx.com’,
1 => ’NW Secondary User (second@interworx.com)’,
),
),
)
Action: listEditable
Added in version 4.7.0-339
Description List editable SiteWorx users.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
0 => ’user@example.com’,
1 => ’Example User (user@example.com)’,
),
1 =>
array (
0 => ’second@interworx.com’,
1 => ’NW Secondary User (second@interworx.com)’,
),
),
)
Action: listMasterUser
Added in version 4.7.0-339
Description Get details of the working user.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’userid’ => 378,
’nickname’ => ’Example User’,
’email’ => ’user@example.com’,
’ismaster’ => true,
’status’ => ’active’,
’language’ => ’en-us’,
’theme’ => ’calliope’,
’menu_style’ => ’big’,
’perms’ =>
array (
0 => ’MASTER’,
),
),
)
Action: listUsers
Added in version 4.8.0-393
Description List SiteWorx users.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’global_uid’ => ’sw378’,
’email’ => ’user@example.com’,
’nickname’ => ’Example User’,
’language’ => ’en-us’,
’user_status’ => ’active’,
’type’ => ’master’,
),
1 =>
array (
’global_uid’ => ’sw379’,
’email’ => ’second@interworx.com’,
’nickname’ => ’NW Secondary User’,
’language’ => ’en-us’,
’user_status’ => ’active’,
’type’ => ’slave’,
),
),
)
Action: listWorkingUser
Added in version 4.7.0-339
Description Get details of the working user.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’userid’ => 378,
’nickname’ => ’Example User’,
’email’ => ’user@example.com’,
’ismaster’ => true,
’status’ => ’active’,
’language’ => ’en-us’,
’theme’ => ’calliope’,
’menu_style’ => ’big’,
’perms’ =>
array (
0 => ’MASTER’,
),
),
)

Footnotes

[A]Last Updated: Thursday, December 13, 2012 for InterWorx Version 4.11.1-458

(C) 2017 by InterWorx LLC