UAPI Functions - SSL::list_csrs

Description

This function lists an account's Certificate Signing Requests (CSR).

Examples 


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/SSL/list_csrs

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// List an account's certificate signing requests.
$SSL_list_csrs $cpanel->uapi(
    'SSL''list_csrs'
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# List an account's certificate signing requests.
my $SSL_list_csrs $cpliveapi->uapi(
    'SSL''list_csrs',
);

 cPanel Template Toolkit

<!-- List an account's certificate signing requests. -->
[% data = execute( 'SSL', 'list_csrs' ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]

 Command Line

uapi --user=username SSL list_csrs

 

Notes:

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

 Output (JSON)

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

 

Note:

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

 

Parameters

This function does not accept parameters.

Returns

Return

Type

Description

Possible values

Example

created

integer

The CSR's creation date.

A date in Unix time format.

1365633415

domains

 Boolean 

The domains that the CSR covers.

 A valid domain name or list of domains. 

 example.com 

 commonName 

string

 The CSR's Common Name or Distinguished Name. 

A valid string.

example.com

modulus

string

The CSR's modulus.

A valid string.

 

id

string

The CSR's ID.

A valid string

 

friendly_name

string

The CSR's friendly name.

A valid string.

TestCSR

 

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