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

 

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

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 pending SSL certificates.
$list_pending = $cpanel->uapi(
    'Market', 'get_pending_ssl_certificates',
     array(
        'provider'        => 'cPStore',
  )
);

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 pending SSL certificates.
my $list_pending = $cpliveapi->uapi(
    'Market', 'get_pending_ssl_certificates',    {
        'provider'         => 'cPStore',
   }
);

Note:

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

 

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

Note:

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

 

 Command Line
uapi --user=username Market get_pending_ssl_certificates provider=cPStore

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)
{
   "result":{
      "errors":null,
      "metadata":{
         "transformed":1
      },
      "data":[
         {
            "last_poll_time":1457475501,
            "domains":[
               "example.com"
            ],
            "created_time":1417475501,
            "order_item_id":"1",
            "support_uri":"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",
            "last_status_code": "CertificateNotFound",
            "expired": 0,
            "identity_verification":
            {
                "organizationName": "cPanel, Inc.",
                "organizationalUnitName": "Team Cobra",
                "duns_number": "12-345-6789",
                "streetAddress": "2500 N. Loop W.",
                "localityName": "Houston",
                "stateOrProvinceName": "TX",
                "postalCode": "77092",
                "countryName": "US",
                "rep_forename": "Richard",
                "rep_surname": "Ang",
                "rep_email_address": "richard.ang@cpanel.net",
                "rep_telephone": "713-529-0800",
                "business_category": "b",
                "joi_locality_name": "Somewhere",
                "joi_state_or_province_name": "PA",
                "joi_country_name": "US",
                "date_of_incorporation": "1996-01-01",
                "assumed_name": "cPanel"
            }
         }
      ],
      "messages":null,
      "status":1
   },
   "module":"Market",
   "apiversion":3,
   "func":"get_pending_ssl_certificates"
}

Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
providerstring

Required

The cPanel Market provider's name.

A valid string.cPStore

 

Returns

ReturnTypeDescriptionPossible valuesExample
 hash

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

This hash includes the last_poll_time , domains, created_time, order_item_id , support_url , order_id ,   csr, first_poll_time, product_id, provider, status, and vhost_names returns, and the domains and vhost_names arrays.  

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 value 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

order_item_id

string

The ID of the ordered item.

The function returns this value in the unnamed hash.

A valid string.1

support_uri

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_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 value 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) text.

The function returns this value in the unnamed hash.

A CSR file in Base64 PEM format.
 Click to view...

-----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

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 not confirmed.
confirmed

last_status_code

string

The last status code of the order.

The function returns the value in the unnamed hash.

  • CertificateNotFound — The system cannot locate the specified certificate.
  • RequiresApproval — The specified certificate requires approval.
  • OrderCanceled — The system canceled the order of the specified certificate.
  • OrderItemCanceled — The system canceled the order item of the specified certificate.
CertificateNotFound

expired

Boolean

Whether the pending queue item has been deleted.

The function returns the value in the unnamed hash.

  • 1 - Deleted.
  • 0 - Not deleted.
0

identity_verification

hash

A hash that contains information to verify an OV or EV certificate request.

Notes:

  • We introduced this return in cPanel & WHM version 62.
  • The function returns this hash for OV or EV certificate requests.

 

 

This hash includes returns that vary between certificate providers. The output example demonstrates what the cPStore returns for an OV certificate.

This is an example for an OV certificate from cPanel Store. A different product may have different information.

"identity_verification":
            {
                "organizationName": "cPanel, Inc.",
                "organizationalUnitName": "Team Cobra",
                "duns_number": "12-345-6789",
                "streetAddress": "2500 N. Loop W.",
                "localityName": "Houston",
                "stateOrProvinceName": "TX",
                "postalCode": "77092",
                "countryName": "US",
                "rep_forename": "Richard",
                "rep_surname": "Ang",
                "rep_email_address": "richard.ang@cpanel.net",
                "rep_telephone": "713-529-0800",
                "business_category": "b",
                "joi_locality_name": "Somewhere",
                "joi_state_or_province_name": "PA",
                "joi_country_name": "US",
                "date_of_incorporation": "1996-01-01",
                "assumed_name": "cPanel"
            }