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 combines calls for multiple UAPI functions and performs them in order.
Note:
- If a function call in the list fails, the
Batch::strictfunction does not run further function calls in the list. - Due to the potential length of calls of this function, we recommend that you use the HTTP POST method for extremely long batch commands.
Security
BasicAuth
Query Examples:
A UAPI function call, encoded as a JSON array with two or three items:
- The UAPI module.
- The UAPI function.
- A JSON object containing the parameters to pass to this function. You can omit this value if you do not pass any parameters to the function.
To submit multiple commands, duplicate the parameter name, or index all parameter names and increment the index for each one.
- When using the cPanel LiveAPI PHP Library, you must increment the parameter name when you submit the arguments in an associative array. For example: use
command-0,command-1, andcommand-2. - When using the cPanel LiveAPI Perl Library, you must increment the parameter name when you submit the arguments in a hash. For example: use
command-0,command-1, andcommand-2. - You do not need to add an index to
commandparameters for query string calls of this function.
command=["command=[\"PasswdStrength\",\"get_required_strength\",{\"app\":\"webdisk\"}]","command=[\"SSH\",\"get_port\"]"]
command=["command-0=[\"PasswdStrength\",\"get_required_strength\",{\"app\":\"webdisk\"}]","command-1=[\"SSH\",\"get_port\"]"]
One of:
string
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Batch/strict
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Batch/strict
- 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/Batch/strict?command=%5B%22string%22%2C%22string%22%5D'Response
application/json
{ "apiversion": 3, "func": "strict", "module": "Batch", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }