json api call with cpanel for ssl details
i have installed the ssl certificate in client account and have been trying to call the json api from rails to get the response from SSL::listcrts, but i am getting the response is
"{\"cpanelresult\":{\"func\":\"listcrts\",\"apiversion\":2,\"module\":\"SSL\",\"data\":[],\"event\":{\"result\":1}}}\n",
but i can see that ssl certificate details in user's cpanel. why here the host is null?
-
Hello :) Could you provide more details on how you are utilizing the SSL::listcrts API2 function? How does it look in your application? Thank you. 0 -
These are the three calls, which calling the SSL::listkeys,SSL::listcsrs,SSL::listcrts IP:2086/json-api/cpanel?user=sslacnt&cpanel_jsonapi_module=SSL&cpanel_jsonapi_func=listkeys&cpanel_jsonapi_version=2 IP:2086/json-api/cpanel?user=sslacnt&cpanel_jsonapi_module=SSL&cpanel_jsonapi_func=listcsrs&cpanel_jsonapi_version=2 IP:2086/json-api/cpanel?user=sslacnt&cpanel_jsonapi_module=SSL&cpanel_jsonapi_func=listcrts&cpanel_jsonapi_version=2 Here in the three cases, i have got the details from keys and csrs but not from crts? 0 -
Hello :) If you are using WHM, you could try using WHM API 1. EX: hxxp://example.com:2086/cpsess123456789/json-api/fetchsslinfo?api.version=1&domain=test-domain.com
Or, with cPanel, you could try using UAPI. EX:hxxp://example.com:2086/cpsess123456789/execute/SSL/list_certs
A full list of SSL options with UAPI are available at: UAPI - SSL Thank you.0
Please sign in to leave a comment.
Comments
3 comments