UAPI Functions - SSL::delete_csr

Description

This function deletes a Certificate Signing Request (CSR).

Examples 


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/SSL/delete_csr?friendly_name=TestCSR

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Remove the certificate signing request TestCSR
$SSL_delete_csr $cpanel->uapi(
    'SSL''delete_csr',    array(
        'friendly_name'    => 'TestCSR',
    )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# TEMPLATE
my $SSL_delete_csr $cpliveapi->uapi(
    'SSL''delete_csr',    {
        'friendly_name'    => 'TestCSR',
    }
);

 cPanel Template Toolkit

<!--  List redirection info -->
[% data = execute( 'SSL', 'delete_csr', { friendly_name => 'TestCSR',} ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]

 Command Line

uapi --user=username SSL delete_csr friendly_name=TestCSR

 

Notes:

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

 Output (JSON)

{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": [
    {
      "created": "1365714527",
      "domains": [
        "example.com"
      ],
      "commonName": "example.com",
      "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
      "id": "example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f",
      "friendly_name": "TestCSR"
    }
  ],
  "metadata": {
    "transformed": 1
  }
}

 

Note:

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

 

Parameters

 You must include one of the following parameters:

Parameter

Type

Description

 Possible values 

Example

id

string

The CSR's ID.

A valid string.

 

 friendly_name 

 string 

 The CSR's friendly name. 

A valid string.

TestCSR

 

Returns

Return

Type

Description

Possible values

Example

created

string

The CSR's creation date.

 A date in Unix time format. 

1365714527

domains

 string 

 The domains that the CSR covers. 

A valid domain or domains.

example.com

 commonName 

string

The CSR's common name.

A valid string.

example.com

modulus

string

The CSR's modulus.

A valid string.

 

id

string

The CSR's ID.

A valid string.

 example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f 

friendly_name

string

The CSR's friendly name.

A valid string.

TestCSR

 

 

 
  • 5 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....