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 deletes an Apache MIME type handler.
Important:
When you disable the WebServer role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Mime/delete_handler
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mime/delete_handler
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mime \
delete_handler \
extension='.foo'{ "apiversion": 3, "func": "delete_handler", "module": "Mime", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lists all of Apache's MIME handlers.
Important:
When you disable the WebServer role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Mime/list_handlers
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mime/list_handlers
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mime \
list_handlers \
type='user'{ "apiversion": 3, "func": "list_handlers", "module": "Mime", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function retrieves redirect information for a URL or ** All Public Domains **.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Mime/redirect_info
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mime/redirect_info
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mime \
redirect_info \
url='http://redirect.example.com' \
domain='example.com'{ "apiversion": 3, "func": "redirect_info", "module": "Mime", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }