Child pages
  • UAPI Functions - WebVhosts::list_ssl_capable_domains

Versions Compared

Key

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

Description

Excerpt

This function lists every domain for which you may purchase an SSL certificate.

The possible domains for the Secure Sockets Layer (SSL) certificate include applicable service subdomains (proxy subdomains).

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/WebVhosts/list_ssl_capable_domains

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 every domain for which you may purchase an SSL certificate.
$list_vhosts = $cpanel->uapi(
    'WebVhosts', 'list_ssl_capable_domains'
);

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 every domain for which you may purchase an SSL certificate.
my $list_vhosts = $cpliveapi->uapi(
    'WebVhosts', 'list_ssl_capable_domains',
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
titlecPanel Template Toolkit


Code Block
languagexml
linenumberstrue
<!-- List every domain for which you may purchase an SSL certificate. -->
[% execute('WebVhosts', 'list_ssl_capable_domains', {} ) %]

Include Page
LIB:_TTLink
LIB:_TTLink
 


Expand
titleCommand Line


Code Block
languagebash
uapi --user=username WebVhosts list_ssl_capable_domains

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "data": [
      {  
         "domain":"example.com",
         "vhost_name":"hostname.example.com",
		 "is_proxy":0
      },
      {
         "domain":"another.example.com",
         "vhost_name":"hostname.example.com",
		 "is_proxy":0
      },
      {
         "domain":"cpanel.example.com",
         "vhost_name":"hostname.example.com",
		 "is_proxy":1
      },
      {
         "domain":"webmail.example.com",
         "vhost_name":"hostname.example.com",
		 "is_proxy":1
      },
      {
         "domain":"autodiscover.example.com",
         "vhost_name":"hostname.example.com",
		 "is_proxy":1
      },
      {
         "domain":"webdisk.example.com",
         "vhost_name":"hostname.example.com",
		 "is_proxy":1
      },
      {
         "domain":"another.example.com",
         "vhost_name":"hostname.example.com",
		 "is_proxy":1
      },
   ]
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  
      "transformed":1
   },
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
 hash

A hash of data for a domain.

This hash includes the domain, vhost_name, and is_proxy returns. 

domain

string

The domain name.

The function returns this value in the unnamed hash.

A valid domain name on the virtual host.example.com

vhost_name

string

The name of the virtual host or website.

The function returns this value in the unnamed hash.

A valid domain name that the cPanel user owns and that exists on the virtual host.
hostname.example.com

is_proxy

Boolean

Whether the system automatically created the service subdomain (proxy subdomain) or a user manually created the domain.

The function returns this value in the unnamed hash.

  • 1 — The system automatically created the service subdomain (proxy subdomain).
  • 0A user manually created the domain.
Note
titleNote:

If a user manually creates a subdomain that matches a preassigned subdomain (for example, cpanel or whm) the function returns 0.


1