Child pages
  • UAPI Functions - cPAddons::list_addon_instances

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description


Excerpt

This function lists an account's deployed cPAddons instances.


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


Code Block
languagetext
https://hostname.example.com:2083/cpsess##########/execute/cPAddons/list_addon_instances?addon=cPanel%3A%3ABlogs%3A%3AWordPressX

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$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'
   )
);

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
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'
	}
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
titlecPanel Template Toolkit


Code Block
languagexml
linenumberstrue
<!-- List the account's cPAddons instances. -->
[% data = execute( 'cPAddons', 'list_addon_instances', { 'addon' => 'cPanel::Blogs::WordPressX' } ); %]

Include Page
LIB:_TTLink
LIB:_TTLink


Expand
titleCommand Line


Code Block
languagetext
uapi --user=username cPAddons list_addon_instances addon='cPanel::Blogs::WordPressX'

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
{
	"data": [{
		"installdir": "/home/example/public_html/wordpress",
		"addon": "cPanel::Blogs::WordPressX",
		"unique_id": "cPanel::Blogs::WordPressX.0.1486754861",
		"instance": "cPanel::Blogs::WordPressX.0"
	}],
	"status": 1,
	"metadata": {
		"transformed": 1
	},
	"messages": null,
	"errors": null
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

ParamaterTypeDescriptionPossible 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

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
titleNote:

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