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 disables a Passenger application on an account.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/PassengerApps/disable_application
- A server running cPanel.
https://cpanel-server.tld:2083/execute/PassengerApps/disable_application
- 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/PassengerApps/disable_application?name=slippers'{ "apiversion": 3, "func": "disable_application", "module": "PassengerApps", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function edits a Passenger application for an account.
Note:
When you disable the Web Server role, the system disables this function.
Whether to clear the application’s environment variables.
The new server environment in which to run the application. If you do not use this parameter, the function does not change the application’s server environment.
development— Sets the application to run in a development environment.production— Sets the application to run in a production environment.
The application’s new domain. If you do not use this parameter, the function does not change the application’s domain.
Whether to enable the application and generate the web server configuration for it.
1— Enable the application and generate the web server configuration.0— Don’t enable the application and generate the web server configuration.
New set of environment variables for the application.
Important:
The function replaces all current environment variables with the variables that you pass in this parameter.
Note:
For each envvar_name parameter you send you must include an envvar_value parameter.
Each environment variable’s value.
Note:
For each envvar_name parameter you send you must include an envvar_value parameter.
The application’s new name. If you do not use this parameter, the function does not change the application's name.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/PassengerApps/edit_application
- A server running cPanel.
https://cpanel-server.tld:2083/execute/PassengerApps/edit_application
- 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/PassengerApps/edit_application?name=Ruby+Slippers&clear_envvars=0&deployment_mode=production&domain=toto.com&enabled=1&envvar_name=SCARECROW%2CTINMAN%2CLION&envvar_value=brain%2Cheart%2Ccourage&new_name=Little+Dog&path=%2Fhome%2Fdorothy%2Flittledog'{ "data": { "Little Dog": { … } }, "errors": null, "messages": null, "metadata": {}, "status": 1 }
Request
This function enables a Passenger application and generates the Apache configuration on an account.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/PassengerApps/enable_application
- A server running cPanel.
https://cpanel-server.tld:2083/execute/PassengerApps/enable_application
- 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/PassengerApps/enable_application?name=slippers'{ "apiversion": 3, "func": "enable_application", "module": "PassengerApps", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }