Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

WebDisk Module Documentation

The WebDisk module allows users to manage their WebDAV users and shares.

The functions within this module may or may not be governed by a feature list. The required feature list may vary from function to function, to review a total list of the available features sets on a cPanel server, please see "Feature Manager" in WHM.

WebDisk::passwdwebdisk

API Version: 2 - Click here for documentation
Description: Change a Web Disk account's password.
Parameters:  
  login (string)
  The full login name corresponding to the account for which you wish to change the password. (e.g. user@example.com).
  password (string)
  The new password the Web Disk account. This password will be checked against any password requirements set within WHM.
  enabledigest (boolean (optional)) For cPanel & WHM 11.34
  A boolean value indicating whether Digest Authentication should be enabled or disabled for the Web Disk user. A value of '1' will enable Digest Authentication for the user. A value of '0' or if the parameter is not provided will disable Digest Authentication for the user.
Returns:  
 
<data>
  <login> A string value that contains the full login name corresponding to the account whose password you have just changed.</login>
</data>

WebDisk::setstatus

API Version: 2 - Click here for documentation
Description: Change a Web Disk's home directory permissions. This function allows you to make a Web Disk (webdav) directory public or private.
Parameters:  
  login (string)
  The full Web Disk username corresponding to the home directory whose permissions you wish to change. (e.g. user@example.com).
  on (boolean)
  A value of '1' sets the home directory's permissions to 0700. '0' will change the directory's permissions to 0755.
Returns:  
 
<data>
  <private> A boolean value that describes the home directory's permissions. '1' reflects 0700, while '0' reflects 0755.</private>
</data>

WebDisk::addwebdisk

API Version: 2 - Click here for documentation
Description: Add a Web Disk (webdav) login and directory.
Parameters:  
  domain (string)
  The domain corresponding to the new Web Disk (webdav) account.
  homedir (string)
  The directory that will function as the home directory of the Web Disk account. All paths will start at the user's home directory (e.g. /home/user/webdav/). When adding a Web Disk account for an addon domain, you will need to create the Web Disk's home directory in the addon directory's home directory (e.g. /home/user/public_html/addon/webdav/). This allows users to manage their website's contents.
  password (string)
  The new password for the webdav user. If password strength checking is enabled, the password needs to conform to the server's rules.
  private (boolean (optional))
  Entering a value of '0' will change the directory's permissions to 0755. Entering a value of '1' will change the permissions to 0700.
  user (string)
  The username you wish to associate with the new Web Disk account. Any @ signs will be stripped. The final login name will use the 'domain' parameter, with the final login name being 'user'@'domain'.
  enabledigest (boolean (optional)) For cPanel & WHM 11.34
  A boolean value indicating if Digest Authentication should be enabled or disabled for the Web Disk user. A value of '1' indicates that Digest Authentication should be enabled. A value of '0' indicates that Digest Authentication should be disabled.
  perms (string (optional)) For cPanel & WHM 11.34
  The permissions to be assigned to the user. A value of 'ro' sets the user to have read-only permissions, while a value of 'rw' gives the user read-write permissions. If left empty, read-write ('rw') is assigned by default.
Returns:  
 
<data>
  <domain> The domain value that corresponds to the login name. (e.g. example.com)</domain>
  <user> The username portion of the login name. (e.g. user)</user>
  <login> The full login name. (e.g. user@example.com)</login>
<enabledigest> A boolean value indicating whether Digest Authentication was enabled for the user. A value of '1' indicates Digest Authentication was enabled; a value of '0' indicates it was not.</enabledigest>
</data>

WebDisk::listwebdisks

API Version: 2 - Click here for documentation
Description: Lists Web Disk accounts associated with your cPanel account. Essentially, these values are parsed from $home/etc/webdav/passwd.
Parameters:  
  regex (string (optional)) For cPanel & WHM 11.34
  If a valid regular expression is passed in this value, the results of the API call will return only those Web Disk users that match the expression.
Returns:  
 
<data>
  <mainport> An integer value that contains the account's non-SSL port; usually '2077'.</mainport>
  <private> A boolean value indicating whether account's home directory's permissions are set to 0700 or 0755. '0' if permissions are 0700 or lower, '1' if 0755 or higher.</private>
  <reldir> A string value that contains the relative directory to user's $HOME directory. (e.g. /public_html/domain/webdav/)</reldir>
  <sslport> An integer value that contains the account's SSL port; usually '2078'.</sslport>
  <login> A string value that contains the account's full login name. (e.g. user@example.com)</login>
  <homedir> A string value that contains the full path to the account's home directory. (e.g. /home/user/public_html/addon/webdav/)</homedir>
  <domain> A string value that contains the domain portion of the login name. (e.g. example.com)</domain>
  <user> A string value that contains the username part of login name. (e.g. user)</user>
  <hasdigest> A boolean value that indicates whether Digest Authentication is enabled or disabled. (e.g. '0' for disabled. '1' for enabled.)</hasdigest>
  <perms> A string value that contains the access permissions for the Web Disk user. (e.g. 'ro' for read-only)</perms>
</data>

WebDisk::delwebdisk

API Version: 2 - Click here for documentation
Description: Remove a Web Disk (webdav) account. This function does not remove the user's home directory or its contents.
Parameters:  
  login (string)
  The full login name corresponding to the account you wish to remove. (e.g. user@example.com).
Returns:  
 
<data>
  <login> A string value that contains the full login name of the account you have just removed. (e.g. user@example.com)</login>
</data>

WebDisk::hasdigest

For cPanel & WHM 11.34

API Version: 2 - Click here for documentation
Description: Verifies whether the account has Digest Authentication enabled for access to the WebDisk using Windows® Vista or later.
Returns:  
 
<data>
  <hasdigest>A boolean value indicating whether the cPanel account has Digest Authentication enabled for Web Disk. A value of '1' indicates that your cPanel account does have Digest Authentication enabled for Web Disk. A value of '0' indicates that your cPanel account does not have Digest Authentication enabled for Web Disk.</hasdigest>
</data>

WebDisk::set_digest_auth

For cPanel & WHM 11.34

API Version: 2 - Click here for documentation
Description: Enables or disables Digest Authentication for cPanel Web Disk users. Windows® Vista, Windows® 7, and Windows® 8 require Digest Authentication support to be enabled in order to access your Web Disk over a clear text, unencrypted connection. If the server has a SSL certificate signed by a recognized Certificate Authority and you are able to make a SSL connection over port 2078, you do not need to enable this.
Parameters:  
  login (string)
  The full login name of the Web Disk user for which to enable Digest Authentication. (e.g. user@domain.com)
  password (string)
  The current password for the Web Disk user.
  enabledigest (boolean)
  A boolean value indicating if Digest Authentication should be enabled or disabled for the Web Disk user. A value of '1' indicates that Digest Authentication should be enabled. A value of '0' indicates that Digest Authentication should be disabled.
Returns:  
 
<data>
  <result> A boolean value indicating if the call succeeded in setting Digest Authentication for the Web Disk user. A value of '1' indicates that the call was successful. A value of '0' indicates that the call was not successful. </result>
  <reason>A string value containing the reason the call failed or a status message if the call succeeded.</reason>
</data>

WebDisk::set_perms

For cPanel & WHM 11.34

API Version: 2 - Click here for documentation
Description: This function enables or disables read-only access for a Web Disk user. By default, Web Disk users are created with read-write privileges on their home directories.
Parameters:  
  login (string)
  The full login name corresponding to the Web Disk user for which to enable Digest Authentication. (e.g. user@example.com).
  perms (string)
  The permissions to be assigned to the user. A value of 'ro' sets the user to have read-only permissions, while a value of 'rw' gives the user read-write permissions.
Returns:  
 
<data>
  <result> A boolean value indicating if the call succeeded in setting the access permissions for the Web Disk user. A value of '1' indicates that the call was successful. A value of '0' indicates that the call was not successful.</result>
  <reason> A string value indicating either a status message if the call was successful or the reason the call failed, if the call was not successful.</reason>
</data>

WebDisk::set_homedir

For cPanel & WHM 11.34

API Version: 2 - Click here for documentation
Description: This function allows you to change the home directory for a Web Disk user.
Parameters:  
  login (string)
  The full login name corresponding to the Web Disk user for which to enable Digest Authentication. (e.g. user@example.com).
  homedir (string)
  The relative path where the Web Disk user will have their home directory set. (e.g. /public_html/bob)
  private (boolean (optional))
  Entering a value of '0' will change the directory's permissions to 0755. Entering a value of '1' will change the permissions to 0700.
Returns:  
 
<data>
  <result> A boolean value indicating if the call succeeded in setting the home directory for the Web Disk user. A value of '1' indicates that the call was successful. A value of '0' indicates that the call was not successful.</result>
  <reason> A string value indicating either a status message if the call was successful or the reason the call failed, if the call was not successful.</reason>
</data>

Topic revision: r3 - 25 Sep 2012 - 18:46:52 - Main.JenniferDoubrava