v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
PassengerApps
Application Manager

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.
get/PassengerApps/register_application

Query parameters

domainstring domain required
Example:dorothy.com

The domain for which to register the application.

namestring required
Example:Name of Application

The application’s name.

pathstring path required
Example:/slippers

The application’s filepath relative to the user’s home directory.

base_uristring url-path
Example:/ruby

The application’s base URI.

deployment_mode'production' | 'development'
Example:production

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.
enabled0 | 1
Example: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.
envvar_namestring[]

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.

[
  "SHOES",
  "TINMAN"
]
envvar_valuestring[]

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.

[
  "ruby",
  "heart"
]

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "register_application",
  "module": "PassengerApps",
  "result": {
    "data": {
      "Name of Application": {
        "base_uri": "/ruby",
        "deployment_mode": "production",
        "domain": "dorothy.com",
        "enabled": 1,
        "envvars": {
          "SHOES": "ruby",
          "TINMAN": "heart"
        },
        "name": "Name of Application",
        "path": "/home/dorothy/slippers"
      }
    },
    "status": 1
  }
}