API: Let's Encrypt certificate issue
Issue a Let's Encrypt certificate using the letsencrypt.generate function. To access function's parameter list, use the mgrctl utility:
/usr/local/mgr5/sbin/mgrctl -m ispmgr letsencrypt.generate -iList of parameters:
- domain_name — the website name in the panel;
- domain —the list of domain names protected by the certificate;
- email — contact email;
- crtname — the name of the certificate in the panel;
- name — the name of the CSR request in the panel;
- username — the username of the website and certificate owner;
- keylen — the encryption key length (by default:
2048); - wildcard — issue a wildcard certificate (
onoroffvalues); - dns_check — perform DNS verification (
onoroffvalues); - skip_check_a_record — skip A-record verification (
onoroffvalues); - enable_cert — enable (link to the website) the certificate (
onoroffvalues).
Example of an API request via CLI:
/usr/local/mgr5/sbin/mgrctl -m ispmgr letsencrypt.generate domain_name=exmaple.com domain="exmaple.com www.example.com" email=webmaster@example.com crtname=example.com_le name=exmaple.com_csr username=www-root keylen=2048 wildcard=off
dns_check=off skip_check_a_record=off enable_cert=on sok=okExample of an API request via HTTP:
https://10.20.30.40:1500/ispmgr?authinfo=root:rootpasswd&func=letsencrypt.generate&domain_name=exmaple.com&domain="exmaple.com www.example.com"&email=webmaster@example.com&crtname=example.com_le&name=exmaple.com_csr&username=www-root&keylen=2048&wildcard=off&dns_check=off&skip_check_a_record=off&enable_cert=on&sok=ok