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.
Authorizations:
query Parameters
domain
required
string <domain>

The domain for which to register the application.

Example: domain=dorothy.com
name
required
string [ 1 .. 50 ] characters

The application’s name.

Example: name=Name of Application
path
required
string <path>

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

Example: path=/slippers
base_uri
string <url-path>
Default: "/"

The application’s base URI.

Example: base_uri=/ruby
deployment_mode
string
Default: "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.
Enum: "production" "development"
Example: deployment_mode=production
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 <= 256 characters

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.

Example: envvar_name=SHOES&envvar_name=TINMAN
envvar_value
Array of strings <= 1024 characters

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.

Example: envvar_value=ruby&envvar_value=heart

Responses

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

Request samples

uapi --output=jsonpretty \
  --user=username \
  PassengerApps \
  register_application \
  name='Name of Application' \
  path='/slippers' \
  domain='dorothy.com'

Response samples

Content type
application/json
{
  • "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"
        }
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}