20 functions, invoked through the cpanel_uapi tool.
scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Ftp", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.
When you disable the FTP role, the system disables this function.
userstringRequired
The new FTP account username.
disallowdotintegerOptional
Whether to strip dots (.) from the username. 1 — Strip dots. 0 — Do not strip dots.
domainstringOptional
The FTP user's associated domain. This must be a domain that the cPanel account owns. Note: This parameter defaults to the cPanel account's primary domain.
homedirstringOptional
The path to the FTP account's root directory, relative to the cPanel account's home directory. If you don't set this, it defaults to a directory with the same name as the FTP account.
passstringOptional
The new FTP account password. Note: You can use the pass_hash parameter in place of this parameter. However, you cannot use both the pass and pass_hash parameters in the same request.
pass_hashstringOptional
The account's password hash. Note: You can use this parameter in place of the pass parameter. However, you cannot use both the pass and pass_hash parameters in the same request. You can find your server's password hash type in the /etc/sysconfig/authconfig file.
quotaintegerOptional
The FTP account's maximum disk usage quota, in megabytes (MB). Note: A value of 0 grants the FTP account unlimited disk space.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
When you disable the _FTP role_, the system disables this function.
accountstringRequired
The FTP account's username.
domainstringOptional
The user's associated domain. Note: This parameter defaults to the cPanel account's primary domain.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
The FTP account's quota. unlimited A positive integer that represents the maximum amount of disk space that the FTP account can use, in megabytes (MB).
When you disable the FTP role, the system disables this function. For more information, read our How to Use Server Profiles documentation.
include_acct_typesstringOptional
A list of the FTP account types to include in the function's results. anonymouslogaccessmainsub If you do not specify this parameter, this function returns all FTP account types. Note: Separate multiple types with the pipe character (|). In browser-based calls, use %7C.
skip_acct_typesstringOptional
A list of the FTP account types to exclude from the function's results. anonymouslogaccessmainsub If you do not specify this parameter, this function does not exclude any account types. Note: Separate multiple types with the pipe character (|). In browser-based calls, use %7C.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
homedirstring
The absolute path to the FTP account's document root.
typestring
The type of FTP account. anonymouslogaccessmainsub
One of: anonymouslogaccessmainsub
userstring
The username for an FTP account on the cPanel account.
This function lists FTP account and disk usage information.
Important:
When you disable the FTP role, the system disables this function.
include_acct_typesstringOptional
A pipe-delimited list of the FTP account types to include in the function's results. If you do not specify this parameter, the function returns all FTP account types. Valid types for this list are: anonymouslogaccessmainsub
skip_acct_typesstringOptional
A pipe-delimited list of the FTP account types to exclude from the function's results. If you do not specify this parameter, the function does not exclude any account types. Valid types for this list are: anonymouslogaccessmainsub
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
_diskquotastring
The FTP account's quota in megabytes, with two digits of fractional precision, encoded as a string. 0.00 means that the quota is unlimited. Note: This value is different from the value for diskquota.
_diskusedstring
The amount of disk space in megabytes that the account currently uses, with two digits of fractional precision, encoded as a string. Note: This value is the same as the value for diskused.
accttypestring
The type of FTP account. anonymouslogaccessmainsub
One of: anonymouslogaccessmainsub
deleteableinteger
Whether the function's caller can delete the account. 1 – The caller can delete the account. 0 – The caller cannot delete the account.
One of: 01
dirstring
The absolute path to the FTP account's document root.
diskquotaany
The FTP account's quota. unlimited The disk quota in megabytes, with two digits of fractional precision, encoded as a string. Note: This value is different from the value for _diskquota.
diskusedstring
The amount of disk space in megabytes that the account currently uses, with two digits of fractional precision, encoded as a string. Note: This value is the same as the value for _diskused.
diskusedpercentinteger
The percentage of the disk space quota that the account currently uses.
diskusedpercent20integer
The percentage of disk space that the account currently uses, rounded in 20 percent increments.
htmldirstring
The path to the FTP account's HTML directory.
humandiskquotastring
The FTP account's quota, in human-readable format. None — The function returns this value if the account has an unlimited quota. The quota in megabytes (MB), a space, and the characters MB.
humandiskusedstring
The amount of disk space that the account currently uses, in human-readable format. The function formats this value as the quota's size, a space, and the characters MB.
loginstring
The FTP account username.
reldirstring
The path to the FTP account's document root, relative to the cPanel account's home directory.
This function changes the home directory for FTP accounts.
Important:
When you disable the FTP role, the system disables this function.
userstringRequired
The FTP account username.
domainstringOptional
The user's associated domain. Note: The default value is the cPanel account's primary domain.
homedirstringOptional
The FTP account's home directory Note: This parameter defaults to the user@domain subdirectory in the cPanel account's home directory with the name, where user and domain represent the user and domain parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
When you disable the FTP role, the system disables this function.
userstringRequired
The FTP account username.
domainstringOptional
The user's associated domain. Note: The default value is the cPanel account's primary domain.
killintegerOptional
Whether to disable quotas for the FTP account. 1 - Disable quotas. 0 - Enable quotas. Note: If you disable quotas for an FTP account, you grant that account unlimited disk space.
quotaintegerOptional
The new quota, in megabytes. Note: Setting this parameter to 0 grants the account unlimited disk space.
Response — normalized as { ok, data, errors[], warnings[] }; data contains: