Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function lists an account's Ruby applications.

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/list_applications

Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

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

Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
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',
);

Note:

For more information, read our Guide to the LiveAPI System.

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

Note:

For more information, read our Guide to Template Toolkit documentation. 

 Command Line
uapi --user=username PassengerApps list_applications

Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • We introduced this functionality in cPanel & WHM version 56.

 Output (JSON)
{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
      
  },
	"data": {
	  "slippers" => {
		"domain" : "dorothy.com",
		"base_uri" : "/ruby",
		"enabled" : 1,
		"envvars" : {},
		"name" : "slippers",
		"path" : "/home/dorothy/slippers",
		"deployment_mode" : "production",
  },
	 "toto" => {
		"domain" : "notinkansas.com",
		"base_uri" : "/littledog",
		"enabled" : 1,
		"envvars" : {},
		"name" : "toto",
		"path" : "/home/dorothy/toto",
		"deployment_mode" : "production",
    }
  }
}

Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

This function does not accept parameters.


Returns

ReturnTypeDescriptionPossible valuesExample
application namehash

A hash of application data.

Note:

The hash's name is the application name.

This hash contains the base_uridomainenabledenvvarsnamepath, 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