We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • UAPI Functions - cPAddons::get_instance_settings
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%3AWordPressX.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::WordPressX.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::WordPressX.0.1486754861'
	}
);


Note:

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

 Command Line
uapi --user=username cPAddons get_instance_settings unique_id='cPanel::Blogs::WordPressX.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. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
	"metadata": {},
	"errors": null,
	"status": 1,
	"messages": null,
	"data": {
		"db_type": "mysql",
		"installdir": "/home/example/public_html/wordpress",
		"db_name": "example_wp",
        "domain": "example.com",
		"admin_user": "example",
		"addon": "cPanel::Blogs::WordPressX",
		"url_to_install": "http://example.com/wordpress/",
		"autoupdate": "0",
		"db_user": "example_wp"
	}
}


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExamples
unique_idstring

Required

The unique identifier of the cPAddon.

A unique identifier.

Note:

To find this identifier, run the list_addon_instances function.

cPanel::Blogs::WordPressX.0.1486754861


Returns

ReturnTypeDescriptionPossible valuesExample

addon

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

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

cPanel::Blogs::WordPressX

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
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
url_to_installstringThe URL to access the cPAddon instance.A valid URL.http://example.com/wordpress/