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.

SecurityBasicAuth
Request
query Parameters
name
required
string

The application’s current name.

Example: name=Ruby Slippers
clear_envvars
integer
Default: 0

Whether to clear the application’s environment variables.

Enum: 0 1
Example: clear_envvars=0
deployment_mode
string

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.
Enum: "production" "development"
Example: deployment_mode=production
domain
string <domain>

The application’s new domain. If you do not use this parameter, the function does not change the application’s domain.

Example: domain=toto.com
enabled
integer
Default: 1

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.
Enum: 0 1
Example: enabled=1
envvar_name
Array of strings

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.

Example: envvar_name=SCARECROW&envvar_name=TINMAN&envvar_name=LION
envvar_value
Array of strings [ 1 .. 1024 ] characters

Each environment variable’s value.

Note:

For each envvar_name parameter you send you must include an envvar_value parameter.

Example: envvar_value=brain&envvar_value=heart&envvar_value=courage
new_name
string

The application’s new name. If you do not use this parameter, the function does not change the application's name.

Example: new_name=Little Dog
path
string <path>

The application’s new filepath. If you do not use this parameter, the function does not change the application’s filepath.

Example: path=/home/dorothy/littledog
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/PassengerApps/edit_application
Request samples
uapi --output=jsonpretty \
  --user=username \
  PassengerApps \
  edit_application \
  name='Ruby Slippers'
Response samples
application/json
{
  • "data": {
    • "Little Dog": {
      • "base_uri": "/littledog",
      • "deployment_mode": "production",
      • "domain": "toto.com",
      • "enabled": 1,
      • "envvars": {
        • "LION": "courage",
        • "SCARECROW": "brain",
        • "TINMAN": "heart"
        },
      • "name": "Little Dog",
      • "path": "/home/dorothy/littledog"
      }
    },
  • "errors": null,
  • "messages": null,
  • "metadata": { },
  • "status": 1
}