UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
This function changes the home directory for FTP accounts.
Important:
When you disable the FTP role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/set_homedir
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/set_homedir
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Ftp \
set_homedir \
user='example1'{ "apiversion": 3, "func": "set_homedir", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function changes an FTP account's quota.
Important:
When you disable the FTP role, the system disables this function.
The user's associated domain.
Note:
The default value is the cPanel account's primary domain.
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.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/set_quota
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/set_quota
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Ftp \
set_quota \
user='ftpaccount'{ "apiversion": 3, "func": "set_quota", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function sets the FTP welcome message.
Important:
When you disable the FTP role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/set_welcome_message
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/set_welcome_message
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Ftp \
set_welcome_message \
message='Greetings, Professor Falken.'{ "apiversion": 3, "func": "set_welcome_message", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }