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 lists FTP account and disk usage information.
Important:
When you disable the FTP role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/list_ftp_with_disk
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/list_ftp_with_disk
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Ftp \
list_ftp_with_disk{ "apiversion": 3, "func": "list_ftp_with_disk", "module": "Ftp", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function changes an FTP account's password.
Important:
When you disable the FTP role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/passwd
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/passwd
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Ftp \
passwd \
user='ftpaccount' \
pass='123456luggage'{ "apiversion": 3, "func": "passwd", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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 } }