Child pages
  • cPanel API 1 Functions - Gpg::deletekey

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function deletes a GnuPG key.


Include Page
LIB:_cPanelAPI1NoEquivalent
LIB:_cPanelAPI1NoEquivalent

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$delete_public_key = $cpanel->api1('Gpg', 'deletekey', array('75442F4C','1') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

 

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $delete_public_key = $cpliveapi->api1('Gpg', 'deletekey', ['75442F4C','1'] ); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="Gpg::deletekey($FORM('key','secret'))">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username Gpg deletekey 75442F4C 1

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote

Expand
titleOutput (none)

This function does not return output.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
idstring

Required

The key's identifier.

The identifier for a key on the server.

Note
titleNote:

This value should closely resemble the example value. 

75442F4C
secretBoolean

Required

Whether to delete the private key or the public key.

  • 1 — Delete the private key.
  • 0 — Delete the public key.
Warning
titleImportant:

You must delete the private key before you delete the public key. 

1

Returns

This function does not return output.