cPanel/PassengerApps
cPanel module

PassengerApps

7 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="PassengerApps", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

disable_application GET#

Disable Passenger application

This function disables a Passenger application on an account.

Important:

When you disable the Web Server role, the system disables this function.

namestringRequired
The application to disable.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

Payload varies by call.

edit_application GET#

Update Passenger application settings

This function edits a Passenger application for an account.

Note:

When you disable the Web Server role, the system disables this function.

namestringRequired
The application’s current name.
clear_envvarsintegerOptional
Whether to clear the application’s environment variables.
deployment_modestringOptional
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.
domainstringOptional
The application’s new domain. If you do not use this parameter, the function does not change the application’s domain.
enabledintegerOptional
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.
envvar_namearray<any>Optional
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.
envvar_valuearray<any>Optional
Each environment variable’s value. Note: For each envvar_name parameter you send you must include an envvar_value parameter.
new_namestringOptional
The application’s new name. If you do not use this parameter, the function does not change the application's name.
pathstringOptional
The application’s new filepath. If you do not use this parameter, the function does not change the application’s filepath.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

Payload varies by call.

enable_application GET#

Enable Passenger application

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.

namestringRequired
The Passenger application to enable on the account.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

Payload varies by call.

ensure_deps GET#

Install Passenger application dependencies

This function installs the dependencies for a Passenger application.

Note:

This function starts the installation process. This may take a long time to complete.

Important:

When you disable the Web Server role, the system disables this function.

app_pathstringRequired
The application’s filepath.
typestringRequired
The application’s type. gem — Ensure ruby gems in the application’s Gemfile file. npm — Ensure node packages in the application’s package.json file. * pip — Ensure python pips in the application’s requirements.txt file.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

sse_urlstring
The SSE URI to track the progress of the process.
task_idstring
The task id of the SSE process.

list_applications GET#

Return Passenger applications

This function lists an account’s Passenger applications.

Important:

When you disable the Web Server role, the system disables this function.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

An object describing each application.

register_application GET#

Register Passenger application

This function registers a Passenger application for an account.

Important:

  • This function only registers an application. It does not create the application. You must create an application before you register the application. For an example of how to do this, read our How to Create Ruby Web Applications documentation.
  • When you disable the Web Server role, the system disables this function.
domainstringRequired
The domain for which to register the application.
namestringRequired
The application’s name.
pathstringRequired
The application’s filepath relative to the user’s home directory.
base_uristringOptional
The application’s base URI.
deployment_modestringOptional
The type of server environment in which to run the application. development — Sets the application to run in a development environment. production — Sets the application to run in a production environment.
enabledintegerOptional
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.
envvar_namearray<any>Optional
Environment variables that the application needs. Note: For each envvar_name parameter you send, you must include an envvar_value parameter. This parameter's value can only contain letters, numbers, underscores, and dashes, and cannot begin with a number. This parameter's value must also not exceed 256 characters.
envvar_valuearray<any>Optional
Each environment variable’s value. Note: For each envvar_name parameter you send, you must include an envvar_value parameter. An environment variable value must contain 1024 or fewer ASCII-printable characters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

An object describing the newly-registered application.

unregister_application GET#

Unregister Passenger application

This function unregisters a Passenger application on an account.

Note:

  • This function only unregisters an application. It does not delete the application. You must manually delete the application from your system.
  • When you disable the Web Server role, the system disables this function.
namestringRequired
The application to unregister.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

Payload varies by call.