Call Uapi in WHM Plugin
Hello,
I have some issues in calling Perl module function from WHM Plugin using uapi.
I have read the document that says to call command line and web based.
But, i have default function to load my dropdown list when form loading.
PS : CPanel Version v68.0.36 Appreciate your help on this please Thanks in Advance ! Rajkumar
$gapp_details = $cpanel->uapi(
'GAppMod', 'load_gapp_details'
);
Select Domain
['result'>['data'> as $values){
?>
PS : CPanel Version v68.0.36 Appreciate your help on this please Thanks in Advance ! Rajkumar
-
Hi @srkumar1986 The following may be helpful for this issue: Thank you, 0 -
Hello, You should be able to use the whmapi1 to call cPapi2 functions the cpanel_jsonapi_user should be the cPanel user w/no password specified. Can you show me an example of the API function you're using that's providing an error? 0 -
Hello, You should be able to use the whmapi1 to call cPapi2 functions the cpanel_jsonapi_user should be the cPanel user w/no password specified. Can you show me an example of the API function you're using that's providing an error?
Hello, Here is my URL for reference.https://mydomain.com:2087/cpsess####/json-api/cpanel?api.version=1&cpanel_jsonapi_user=root&cpanel_jsonapi_module=CertificateDetails&cpanel_jsonapi_func=createcertificate&cpanel_jsonapi_apiversion=3&domain_name=mytestdomain.com
in this createcertificate i have system command to create lets encrypt ssl certificate that accessible only by root user. But i am getting the below error The user "root" is not associated with a cPanel account and cannot call cPanel API 2 currently the plugin is in WHM Console. By default WHM Console will execute all process as root i hope. Please specify my mistake on this. thanks0 -
Hello, When running the API you shouldn't be using root as the user, you're running the command as root but the user should be the user you want to generate the certificate for. Furthermore, can you link me to the documentation of this API call, it looks like you're using a cPAPI1 function and I'd like to look at it further. Thank you, 0 -
Hello, When running the API you shouldn't be using root as the user, you're running the command as root but the user should be the user you want to generate the certificate for. Furthermore, can you link me to the documentation of this API call, it looks like you're using a cPAPI1 function and I'd like to look at it further. Thank you,
Hello, Here is my updated link ,"status":0,"messages":null,"metadata":{},"data":null}} The reference URL I've used as, Use WHM API to Call cPanel API and UAPI - Developer Documentation - cPanel Documentation Thank you!0 -
Hello, Thank you for that, but I'm looking for the API you're using for CertificateDetails, do you have that? Thank you, 0 -
Hello, Thank you for that, but I'm looking for the API you're using for CertificateDetails, do you have that? Thank you,
Hello Lauren, The Perl Module CertificateDetails that you're looking for is custom developed. If you need, i will share it with you. Thanks Rajkumar S0 -
That's what I was trying to understand, thank you. Where do you have it stored? Have you ensured that you've followed the guides in the following: Prepare Perl Scripts for Our Internal Perl - cPanel Knowledge Base - cPanel Documentation Guide to Perl in cPanel - Custom Modules - Developer Documentation - cPanel Documentation UAPI - Custom UAPI Modules - Developer Documentation - cPanel Documentation 0
Please sign in to leave a comment.
Comments
9 comments