UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
A server running cPanel.
https://{host}:{port}/execute/
Request
This function returns the directory indexing settings of the subdirectories in a directory.
Security
BasicAuth
- 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'Response
application/json
{ "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.
Security
BasicAuth
Query
The directory for which to manage directory indexing.
Example: dir=/home/example/example.com
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.
Enum"standard""disabled""inherit""fancy"
Example: type=inherit
- 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'Response
application/json
{ "apiversion": 3, "func": "set_indexing", "module": "DirectoryIndexes", "result": { "data": "disabled", "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }