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 creates an Apache MIME type handler for a file extension.
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/add_handler
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mime/add_handler
- 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/Mime/add_handler?extension=.foo&handler=txt-foo'{ "apiversion": 3, "func": "add_handler", "module": "Mime", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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
- 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/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
- 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/Mime/list_handlers?type=user'{ "apiversion": 3, "func": "list_handlers", "module": "Mime", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }