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/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DirectoryIndexes/get_indexing
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DirectoryIndexes/get_indexing
- 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/DirectoryIndexes/get_indexing?dir=%2Fhome%2Fexample%2Fexample.com'{ "apiversion": 3, "func": "get_indexing", "module": "DirectoryIndexes", "result": { "data": "disabled", "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function returns the directory indexing settings of the subdirectories in a directory.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DirectoryIndexes/list_directories
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DirectoryIndexes/list_directories
- 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/DirectoryIndexes/list_directories?dir=%2Fhome%2Fexample%2Fexample.com'{ "apiversion": 3, "func": "list_directories", "module": "DirectoryIndexes", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function configures the directory indexing settings for a directory on the cPanel account.
The directory for which to manage directory indexing.
The type of directory indexing.
standard— The directory uses directory indexing with standard formatting.disabled— The directory doesn't use directory indexing.inherit— The directory uses the system's default settings.fancy— The directory uses directory indexing with Apache FancyIndexing directive. The directory will include additional information such as file size and the date of the file's last update.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DirectoryIndexes/set_indexing
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DirectoryIndexes/set_indexing
- 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/DirectoryIndexes/set_indexing?dir=%2Fhome%2Fexample%2Fexample.com&type=inherit'{ "apiversion": 3, "func": "set_indexing", "module": "DirectoryIndexes", "result": { "data": "disabled", "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }