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

Description

This function lists a cPAddons instance's settings.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/cPAddons/get_instance_settings?unique_id=cPanel%3A%3ABlogs%3A%3AWordPress.0.1486754861

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 cPAddons instance's settings.
 $instance = $cpanel->uapi(
    'cPAddons', 'get_instance_settings',
   array(
	'unique_id'	=>'cPanel::Blogs::WordPress.0.1486754861'
   )
);

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 cPAddons instance's settings.
my $instance = $cpliveapi->uapi(
    'cPAddons', 'get_instance_settings',
	{
	'unique_id'	=>'cPanel::Blogs::WordPress.0.1486754861'
	}
);

Note:

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

 cPanel Template Toolkit
<!-- List the cPAddons instance's settings. -->
[% data = execute( 'cPAddons', 'get_instance_settings', { 'unique_id' => 'cPanel::Blogs::WordPress.0.1486754861' } ); %]

Note:

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

 Command Line
uapi --user=username cPAddons list_addon_instances unique_id='cPanel::Blogs::WordPress.0.1486754861'

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)
{
	"metadata": {},
	"errors": null,
	"status": 1,
	"messages": null,
	"data": {
		"db_type": "mysql",
		"installdir": "/home/example/public_html/wordpress",
		"db_name": "example_wp",
		"admin_user": "example",
		"addon": "cPanel::Blogs::WordPress",
		"url_to_install": "http://example.com/wordpress/",
		"autoupdate": "0",
		"db_user": "example_wp"
	}
}

Note:

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

Parameters

ParamaterTypeDescriptionPossible valuesExamples
unique_idstring

Required

The unique identifier of the cPAddon.

Note:

You can obtain this identifier with the list_addon_instances function.

A unique identifier.

cPanel::Blogs::WordPress.0.1486754861

 

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

admin_userstringThe administrative user for the cPAddon instance.A valid string.example
autoupdateBooleanWhether the system processes automatic updates for the cPAddon instance.
  • 1 — Automatic updates enabled.
  • 0 — Automatic updates disabled.
0
db_namestringThe cPAddon instance's database.A database name.example_wp
db_typestringThe cPAddon instance's database type.
  • mysql

  • postgre
mysql
db_userstringThe cPAddon instance's database user.A database user.example_wp
installdirstringThe full path of the directory in which the system deployed the cPAddon.A valid directory path./home/example/public_html/wordpress
url_to_installstringThe URL to access the cPAddon instance.A valid URL.http://example.com/wordpress/