/
/
API: Let's Encrypt certificate issue

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 -i

List 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 (on or off values);
  • dns_check — perform DNS verification (on or  off values);
  • skip_check_a_record — skip A-record verification (on or  off values);
  • enable_cert — enable (link to the website) the certificate (on or  off values).

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=ok

Example 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