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 removes a MIME type from Apache.
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_mime
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mime/delete_mime
- 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_mime?type=text%2Ffoo'{ "apiversion": 3, "func": "delete_mime", "module": "Mime", "result": { "data": null, "errors": null, "messages": null, "status": 1, "warnings": null } }
Request
This function lists all of Apache's MIME types.
Note:
This function does not list PHP versions with MIME types when the user or domain enables PHP-FPM. The system displays only custom MIME types.
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/list_mime
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mime/list_mime
- 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_mime?type=user'{ "apiversion": 3, "func": "list_mime", "module": "Mime", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }