You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

Child pages
  • UAPI Functions - cPAddons::list_addon_instances
Skip to end of metadata
Go to start of metadata

Description

This function lists an account's deployed cPAddons instances.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/cPAddons/list_addon_instances?addon=cPanel%3A%3ABlogs%3A%3AWordPressX


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 account's cPAddons instances.
 $instances = $cpanel->uapi(
    'cPAddons', 'list_addon_instances',
   array(
	'addon'	=>'cPanel::Blogs::WordPressX'
   )
);


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 account's cPAddons instances.
my $instances = $cpliveapi->uapi(
    'cPAddons', 'list_addon_instances',
	{
	'addon'	=>'cPanel::Blogs::WordPressX'
	}
);


Note:

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

 Command Line
uapi --user=username cPAddons list_addon_instances addon='cPanel::Blogs::WordPressX'


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. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
	"data": [{
		"installdir": "/home/example/public_html/wordpress",
		"addon": "cPanel::Blogs::WordPressX",
		"unique_id": "cPanel::Blogs::WordPressX.0.1486754861",
		"instance": "cPanel::Blogs::WordPressX.0",
		"domain": "example.com"
	}],
	"status": 1,
	"metadata": {
		"transformed": 1
	},
	"messages": null,
	"errors": null
}


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExamples
addonstringThe cPAddon for which to return the instances data.

<Vendor>::<Category>::<Application>

cPanel::Blogs::WordPressX


Returns

ReturnTypeDescriptionPossible valuesExample

addon

stringThe name of the cPAddon in double colon-delimited form.

<Vendor>::<Category>::<Application>

cPanel::Blogs::WordPressX

domainstringThe domain on which the instance is installed.A valid domain that exists on the server.example.com 
installdirstringThe full path of the directory in which the system deployed the cPAddon.A valid directory path./home/example/public_html/wordpress
instancestringThe name of the instance and the number suffix.A cPAddons module name that precedes an integer.cPanel::Blogs::WordPressX.0
unique_idstring

The unique identifier for the cPAddon.

Note:

This identifier will not change when you change the cPAddon's settings. However, if a new instance reuses a cPaddon's instance name, the system updates the unique identifier. You can use this identifier to select a specific instance to modify.

A unique identifier.

cPanel::Blogs::WordPressX.0.1486754861