Description

This function lists an account's Passenger applications.

Examples




https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/list_applications



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List the applications for the cPanel account.
$poll = $cpanel->uapi(
    'PassengerApps', 'list_applications',
);



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
#  List the applications for the cPanel account.
my $poll = $cpliveapi->uapi(
    'PassengerApps', 'list_applications',
);



<!-- List the applications for the cPanel account. -->
[% execute('PassengerApps', 'list_applications', ) %]



uapi --user=username PassengerApps list_applications



{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
      
  },
	"data": {
	  "slippers" => {
		"domain" : "dorothy.com",
		"base_uri" : "/ruby",
		"enabled" : 1,
        "deps" : {
             "npm" : "cd /home/dorothy/slippers && /opt/cpanel/ea-nodejs10/bin/npm install"
         },
		"envvars" : {},
		"name" : "slippers",
		"path" : "/home/dorothy/slippers",
		"deployment_mode" : "production",
  },
	 "toto" => {
		"domain" : "notinkansas.com",
		"base_uri" : "/littledog",
		"enabled" : 1,
        "deps" : {
             "npm" : "cd /home/dorothy/toto && /opt/cpanel/ea-nodejs10/bin/npm install"
         },
		"envvars" : {},
		"name" : "toto",
		"path" : "/home/dorothy/toto",
		"deployment_mode" : "production",
    }
  }
}



Parameters

This function does not accept parameters.


Returns

ReturnTypeDescriptionPossible valuesExample
application namehash

A hash of application data.

The hash's name is the application name.


This hash contains the deps hash and the base_uri, domain, enabled, envvars, name, path, and deployment_mode returns.

 

base_uri

string

The application's base URI.

The function returns this value in the application name hash.

A valid base URI./ruby

domain

string

The domain on which the function created the application.

The function returns this value in the application name hash.

A valid domain on the cPanel account.dorthy.com

enabled

Boolean

Whether the application is enabled or disabled.

The function returns this value in the application name hash.

  • 1 — Enabled.
  • 0 — Disabled.
1

envvars

hash

A hash of application environment variables and their values.

The function returns this value in the application name hash.

A hash of valid environment variables and their values. 

name

string

The application's name.

The function returns this value in the application name hash.

A valid application name.slippers

path

string

The application's filepath.

The function returns this value in the application name hash.

A valid filepath./home/dorthy/slippers

deployment_mode

string

The application's environment type.

The function returns this value in the application name hash.

  • development
  • production
production

deps

hash

A hash of application types and the command to install an application's dependencies, if needed.

The function returns this value in the application name hash.

We added this return in cPanel & WHM version 80.


This hash includes the apptype return.
                

apptype

string

The command to install an application's dependencies, if needed.

The function returns this value in the deps hash.

  • We added this return in cPanel & WHM version 80.
  • The return's name is the application type.


A valid shell command.

If an application does not use the specified application type, this value returns a 0.


cd /home/username/hello && /opt/cpanel/ea-nodejs10/bin/npm install