Description

This function lists the account's SSL keys.

We strongly recommend that you use the following UAPI function instead of this function:

Examples 


https://hostname.example.com:2087/cpsess###########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=SSL&cpanel_jsonapi_func=listkeys

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Retrieve a list of SSL keys.
$list_keys = $cpanel->api2(
    'SSL', 'listkeys'
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Retrieve a list of SSL keys.
my $list_keys = $cpliveapi->api2(
    'SSL', 'listkeys',
);

 

cpapi2 --user=username SSL listkeys

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "listkeys",
    "data": [
      {
        "host": "example.com"
      }
    ],
    "event": {
      "result": 1
    },
    "module": "SSL"
  }
}

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
hoststring

A domain for which a key exists.

A domain on the cPanel account.example.com
reasonstring

A reason for failure.

A string that describes the error. This is an error message.
resultBoolean

Whether the function succeeded.

  • 1 — The function succeeded.
  • 0 — The function failed.
1