Chapter 76: Controller: /siteworx/email/spf Up Part III: SiteWorx API Spec Chapter 78: Controller: /siteworx/ftp/sessions 

77 Controller: /siteworx/ftp

Required Permissions "FTP"
Required Options FTP Accounts
Action: add
Added in version 4.7.0-339
Description Add an FTP account.
Input Parameters
Name Type Notes Required?
user string Help Entry
Username of FTP user currently logged in
Yes
password string Yes
confirm_password string Help Entry
Confirm the password field by providing it again. Must match the password provided.
Yes
homedir string Example Default Value
/home/example
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: delete
Added in version 4.7.0-339
Description Delete an FTP account.
Input Parameters
Name Type Notes Required?
user struct (string) Help Entry
Username of FTP user currently logged in
Example Values
ftp, sw_ftp_secondary
Yes
Action: edit
Added in version 4.7.0-339
Description Edit a FTP account.
Input Parameters
Name Type Notes Required?
user string Example Values
ftp, sw_ftp_secondary
Yes
password string No
confirm_password string Help Entry
Confirm the password field by providing it again. Must match the password provided.
No
homedir string Example Default Value
/home/example
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 FTP accounts.
Warning This action has been deprecated as of version 4.8.0-393. 2010-11-18 use listFtpAccounts
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
0 => ’ftp’,
1 => ’ftp@example.com’,
),
1 =>
array (
0 => ’sw_ftp_secondary’,
1 => ’sw_ftp_secondary@example.com’,
),
),
)
Action: listFtpAccounts
Added in version 4.8.0-393
Description List FTP Accounts.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’username’ => ’ftp’,
’homedir’ => ’/home/example’,
’login_count’ => ’0’,
’fulluser’ => ’ftp@example.com’,
’status’ => ’active’,
),
1 =>
array (
’username’ => ’sw_ftp_secondary’,
’homedir’ => ’/home/example’,
’login_count’ => ’0’,
’fulluser’ => ’sw_ftp_secondary@example.com’,
’status’ => ’active’,
),
),
)
Action: queryEdit
Added in version 5.1.0-838
Description Displays the information available to the action "edit".
Input Parameters
Name Type Notes Required?
user string Example Values
ftp, sw_ftp_secondary
Yes
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’username’ => ’ftp’,
’password’ => NULL,
’confirm_password’ => NULL,
’homedir’ => ’/home/example’,
’user’ => ’ftp’,
),
)
Action: suspend
Added in version 5.1.0-954
Description Suspend an FTP account.
Input Parameters
Name Type Notes Required?
user struct (string) Help Entry
Username of FTP user currently logged in
Example Values
ftp, sw_ftp_secondary
Yes
Action: unsuspend
Added in version 5.1.0-954
Description Unsuspend an FTP account.
Input Parameters
Name Type Notes Required?
user struct (string) Help Entry
Username of FTP user currently logged in
Example Values
ftp, sw_ftp_secondary
Yes
 Chapter 76: Controller: /siteworx/email/spf Up Part III: SiteWorx API Spec Chapter 78: Controller: /siteworx/ftp/sessions 

(C) 2017 by InterWorx LLC