UAPI Functions - Market::get_pending_ssl_certificates

Description

This function lists all pending SSL certificates from a cPanel Market provider for which the system currently polls.

Examples


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/Market/get_pending_ssl_certificates?provider=cPStore

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// List pending SSL certificates.
$list_pending $cpanel->uapi(
    'Market''get_pending_ssl_certificates',
     array(
        'provider'        => 'cPStore',
  )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# List pending SSL certificates.
my $list_pending $cpliveapi->uapi(
    'Market''get_pending_ssl_certificates',    {
        'provider'         => 'cPStore',
   }
);

 cPanel Template Toolkit

<!-- List pending SSL certificates. -->
[% execute('Market', 'get_pending_ssl_certificates', { provider => 'cPStore'}) %]

 Command Line

uapi --user=username Market get_pending_ssl_certificates provider=cPStore

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

{
   "result":{
      "errors":null,
      "metadata":{
         "transformed":1
      },
      "data":[
         {
            "last_poll_time":1457475501,
            "domains":[
               "example.com"
            ],
            "created_time":1417475501,
            "order_item_id":"1",
            "support_url":"http://support.example.com",
            "order_id":"AAE35B28-E57B-11E5-A5DD-B633DD41FB49",
            "first_poll_time":1437475501,
            "vhost_names":[
               "example.com"
            ],
            "provider":"cPStore",
            "csr":"-----BEGIN CERTIFICATE REQUEST-----
MIIC4DCCAcgCAQAwgZoxFjAUBgNVBAMTDXRlc3RzaW1vbi5jb20xFjAUBgNVBAsT
DURvY3VtZW50YXRpb24xDjAMBgNVBAgTBVRleGFzMQ8wDQYDVQQKEwZjUGFuZWwx
KDAmBgkqhkiG9w0BCQEWGWxhdXJlbmNlLnNpbW9uQGNwYW5lbC5uZXQxCzAJBgNV
BAYTAlVTMRAwDgYDVQQHEwdIb3VzdG9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEA4AVM6J4Qg3DIFWr/eJ5GRmIATYsJIepKbrDy70sq+udcO8R8xxak
0oMZ/9mUdpjSNK/fLVTuCO0kxTfQ9VUWJllX7ThD6Zh9ZvlC/nf/OEZLm3ZbnBgu
8rbC8E9wuDOkKbJLnINgdhtowIydLK2MJ++q62bFV89jkHWTMcKyyqHENo3hc+lk
pd9vnp8rZTinaVb7nX26uQqAFZYRo+WU0G/NPsq40QVSMoqPxyEz4qXo0hvuIlCX
mzFZq/6fCVPEKPLhQgMmpdBkMz4dVOazREfqXdjMD2+QXSNiA1AwWr8l0r4rtzlx
EYDJIR41yXp0xMl3KoolxMyvLBqZy32niQIDAQABoAAwDQYJKoZIhvcNAQEFBQAD
ggEBAEaCn+rg6qlhp6SEKuZg1G6z1M+1XQoTN3E6bTdM3rD1wXjqtyFfYGTy5Bvv
gUKrl6t312owJ2si8/K9v/ocVxdjc0rPWSOWScfSc1Od3i1L1YuqbboL2aQSak3y
gpGnZMHCUED1y4xyABAFOaXUurFiZj5u3P2mBAYGt2ez2afiPlo5YpTRNCoTUlVz
KNKkyUnptBLOvlwGgerBmOoP4QdVhTSuxO9TECsiPdldE1BVZrlFclDFvoP01jFZ
WOTWz+k3O202gK4w/tPP2VMVldNFrC0QoENu85ohT1nJj6F3mrM1CZ+1c8zYzr+S
6aAXFhHE6FweeunRAGjEJggoTPo= -----END CERTIFICATE REQUEST-----",
            "product_id":"12345",
            "status":"confirmed"
         }
      ],
      "messages":null,
      "status":1
   },
   "module":"Market",
   "apiversion":3,
   "func":"get_pending_ssl_certificates"
}

 

Note:

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

 

Parameters

 Parameter 

 Type 

Description

 Possible values 

 Example 

provider

 string 

Required

 The cPanel Market provider's name. 

A valid string.

cPStore

 

Returns

Return

Type

Description

Possible values

Example

 

hash

A hash that contains information about each certificate for which the system polls the provider.

This hash includes the domains,created_time, csr, first_poll_time,last_poll_time, order_id,support_uri, order_item_id,product_id, provider, status, andvhost_names returns.

 

last_time_poll

integer

The last time that the system polled the provider for the certificate.

The function returns this value in the unnamed hash.

A date in Unix time format.

1457475501

domains

array

The domains on the certificate.

The function returns this array in the unnamed hash.

A list of domain names.

example.com

created_time

integer

When the system placed the order.

The function returns this value in the unnamed hash.

A date in Unix time format.

1417475501

support_url

string

The URI of the cPanel Market Provider's support site.

The function returns this value in the unnamed hash.

A valid URI.

http://support.example.com/

order_item_id

string

The ID of the ordered item.

The function returns this value in the unnamed hash.

A valid string.

1

order_id

string

The ID of the order.

The function returns this value in the unnamed hash.

A valid string.

AAE35B28-E57B-11E5-A5DD-B633DD41FB49

 first_poll_time 

 integer 

The first time that the system polled the provider for the certificate.

The function returns this value in the unnamed hash.

A date in Unix time format.

1437475501

vhost_names

array

The virtual host domains on the certificate.

The function returns this array in the unnamed hash.

A list of virtual host names.

example.com

provider

string

The cPanel Market provider's name.

The function returns this value in the unnamed hash.

A valid string.

cPStore

csr

string

The Certificate Signing Request's (CSR's) text.

The function returns this value in the unnamed hash.

A CSR file in Base64 PEM format.

 

product_id

string

The product's ID.

The function returns this value in the unnamed hash.

A valid string.

12345

status

string

The status of the order.

The function returns this value in the unnamed hash.

  • confirmed — Payment confirmed.
  • unconfirmed — Payment notconfirmed.

confirmed

 

  • 14 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....