Our documentation is getting an overhaul! We would like your input! Click here to take a look at the beta launch of our new documentation site! Only cPanel & WHM version 82 documentation exists on our beta at this time. 84 will be added to the new site soon! Leave your feedback here: https://go.cpanel.net/docsfeedback
WHM API 1 Functions - getminimumpasswordstrengths - Developer Documentation - cPanel Documentation
Child pages
  • WHM API 1 Functions - getminimumpasswordstrengths
Skip to end of metadata
Go to start of metadata

Description

This function retrieves the minimum password strength for cPanel & WHM accounts.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/getminimumpasswordstrengths
 Command Line
whmapi1 getminimumpasswordstrengths


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
       "default": 50,
       "cpaddons": 50,
       "createacct": 50,
       "list": 50,
       "mysql": 50,
       "passwd": 50,
       "postgres": 50,
       "sshkey": 50,
       "virtual": 50,
   },
   "metadata": {
       "reason": "OK",
       "result": 1,
       "version": 1,
       "command": "getminimumpasswordstrengths"
  }  
}

Parameters

ParameterTypeDescriptionPossible valuesExample
namestring

The service for which to display the minimum password value.

If you do not use this parameter, this function returns the minimum password setting for all values.

  • default
  • cpaddons
  • createacct
  • list
  • mysql
  • passwd
  • postgres
  • sshkey
  • virtual
default


Returns

Note:

This function does not return empty values.


ReturnTypeDescriptionPossible valuesExample
defaultinteger

The minimum password strength for all services.

A positive integer from 1 to 100. 50
cpaddonsintegerThe minimum password strength for cPAddons.A positive integer from 1 to 100. 50
createacctintegerThe minimum password strength for new cPanel accounts.A positive integer from 1 to 100. 50
listintegerThe minimum password strength for mailing lists.A positive integer from 1 to 100. 50
mysqlintegerThe minimum password strength for MySQL® database users.A positive integer from 1 to 100. 50
passwdintegerThe minimum password strength for WHM user or system accounts.A positive integer from 1 to 100. 50
postgresintegerThe minimum password strength for PostgreSQL database users.A positive integer from 1 to 100. 50
sshkeyintegerThe minimum password strength for SSH keys.A positive integer from 1 to 100. 50
virtualinteger

The minimum password strength for mail, FTP, Web Disk, and WebDAV accounts.

A positive integer from 1 to 100.

50