Page tree
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%3AWordPress

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::WordPress'
   )
);

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::WordPress'
	}
);

Note:

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

 cPanel Template Toolkit
<!-- List the account's cPAddons instances. -->
[% data = execute( 'cPAddons', 'list_addon_instances', { 'addon' => 'cPanel::Blogs::WordPress' } ); %]

Note:

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

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

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)
{
	"data": [{
		"installdir": "/home/example/public_html/wordpress",
		"addon": "cPanel::Blogs::WordPress",
		"unique_id": "cPanel::Blogs::WordPress.0.1486754861",
		"instance": "cPanel::Blogs::WordPress.0"
	}],
	"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

ParamaterTypeDescriptionPossible valuesExamples
addonstringThe cPAddon for which to return the instances data.
  • cPanel::Blogs::WordPress
  • cPanel::Bulletin_Boards::YaBB
  • cPanel::CMS::E107
  • cPanel::Ecommerce::AgoraCart
  • cPanel::Ecommerce::OSCommerce
  • cPanel::Gallery::Coppermine

cPanel::Blogs::WordPress

 

Returns

ReturnTypeDescriptionPossible valuesExample

addon

stringThe name of the cPAddon in double colon-delimited form.
  • cPanel::Blogs::WordPress
  • cPanel::Bulletin_Boards::YaBB
  • cPanel::CMS::E107
  • cPanel::Ecommerce::AgoraCart
  • cPanel::Ecommerce::OSCommerce
  • cPanel::Gallery::Coppermine

cPanel::Blogs::WordPress

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::WordPress.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::WordPress.0.1486754861