Description

This function deletes a GnuPG key.


We deprecated this function in cPanel & WHM version 82. We strongly recommend that you use the following UAPI function instead of this function:


Examples 




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$delete_public_key = $cpanel->api1('Gpg', 'deletekey', array('75442F4C','1') ); // Call the function.




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.



<cpanel Module="Gpg::deletekey($FORM('key','secret'))">




cpapi1 --user=username Gpg deletekey 75442F4C 1


This function does not return output.



   

Parameters

ParameterTypeDescriptionPossible valuesExample
idstring

Required

The key's identifier.

The identifier for a key on the server.

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.

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


1

Returns

This function does not return output.