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 returns the FTP port.
Important:
When you disable the FTP role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/get_port
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/get_port
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/get_port{ "apiversion": 3, "func": "get_port", "module": "Ftp", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function kills FTP sessions.
Important:
When you disable the FTP Role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/kill_session
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/kill_session
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/kill_session?login=weeones'{ "apiversion": 3, "func": "kill_session", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lists the FTP server's active sessions.
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_sessions
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/list_sessions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/list_sessions{ "apiversion": 3, "func": "list_sessions", "module": "Ftp", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }