• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question API-RPC and Let's Encrypt?

selliott

New Pleskian
Is there a way to install a Let's Encrypt certificate using API-RPC? I've found that if I set a subscription to install it, and choose that subscription as the plan name during the webspace setup, it does eventually install the certificate, but not by the time the API has setup the website. I'd like to be able to complete the Let's Encrypt install within this script, so I can receive a response and know the site is secure at the end of the process.
 
As you may know, LE certificate can be installed with the help of following CLI command, for instance:

# plesk bin extension --exec letsencrypt cli.php -d domain.com -d www.domain.com

And you may know, that you can run Plesk CLI utilities with help of Plesk REST API. Here are some examples - How to manage Plesk via REST API? and REST API documentation - About REST API

Try to create your own REST API call for using the command above.
 
Is it possible to do this with packets? I developed my app using packets for all the rest of the calls and they were pretty easy to use, but I couldn't find any good examples of how to perform this on the v2 REST API with C#.
 
I need this, too. We are resellers with access to the XML RPC API, without access to the command line interface or the REST API.
Can it be done with the XML RPC API? How?
 
@IgorG thank you for this info. i wonder where you can find an overview for the plesk bin extension of all possible cli commands that are possible.
do you have a documentation about this? the xml api aswell the rest api are lacking of some other features that may be possible with the plesk cli
 
if anyone wonders how to do it:

curl --location --request POST 'yourserver.de:8443/api/v2/cli/extension/call' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YOURAPIKEY' \
--data-raw '{
"params": [
"--exec",
"letsencrypt",
"cli.php",
"-d",
"domain.com",
"-m",
"mail@domain.com"
]
}'
 
Back
Top