Generate Lets Encrypt

Generate

Generate a new Let's Encrypt Certificate.

POST/api/Certificates/GenerateLetsEncrypt
Body

The Let's Encrypt Certificate details for a certificate to be generated.

name*nullable string

The name of the target Certificate.

siteIdinteger (int32)

Site ID in which to add the Certificate.

descriptionnullable string

A user-defined Certificate description.

usageCertificateUsages (enum)

Certificate Usage Certificate Usage

0 = None,2 = Gateway,4 = HALB
enabledboolean

Whether to enable or disable the certificate being created.

keySizeCertificateKeySize (enum)

Certificate Key Size Certificate Key Size

0 = KeySize1024,1 = KeySize2048,2 = KeySize4096,3 = KeySize3072,4 = KeySize521,255 = KeySizeUnknown
countryCodenullable string

The Country Code for the certificate to be generated. By default, the country code from the PowerShell region information is used.

fullStateOrProvincenullable string

The Full State or Province for the certificate to be generated.

citynullable string

The City for the certificate to be generated.

organisationnullable string

The Organisation for the certificate to be generated.

organisationUnitnullable string

The Organisation Unit for the certificate to be generated.

email*nullable string

The Email for the certificate to be generated.

commonName*nullable string

The Common Name for the certificate to be generated.

alternateNamesnullable string

The Alternate Names for the certificate to be generated. eg. IP:1.2.3.4,DNS:example.com

Response

Created

Body
idinteger (int32)

ID of the object.

adminCreatenullable string

User who created the object.

adminLastModnullable string

User who last modified the object.

timeCreatestring (date-time)

Time when the object was created.

timeLastModstring (date-time)

Time when the object was last modified.

statusCertificateStatus (enum)

Certificate Status Certificate Status

0 = Valid,1 = Expiring,2 = Expired,3 = InProgress,4 = Revoked,5 = Issuing,6 = IssuingFailed,7 = Renewing,8 = RenewingFailed,9 = Revoking,10 = RevokingFailed
publicKeynullable string

The public key.

expirationDatenullable string (date-time)

The expiration date of the certificate.

keySizeCertificateKeySize (enum)

Certificate Key Size Certificate Key Size

0 = KeySize1024,1 = KeySize2048,2 = KeySize4096,3 = KeySize3072,4 = KeySize521,255 = KeySizeUnknown
commonNamenullable string

The common name of the certificate.

namenullable string

Certificate Name.

siteIdinteger (int32)

ID of the site.

enabledboolean

Whether the certificate is enabled or not.

typeCertificateType (enum)

Certificate Type Certificate Type

0 = SelfSigned,1 = Request,2 = Imported,3 = LetsEncrypt
usageCertificateUsages (enum)

Certificate Usage Certificate Usage

0 = None,2 = Gateway,4 = HALB
intermediatenullable string

The intermediate.

requestnullable string

The certificate request.

descriptionnullable string

The description of the certificate.

alternateNamesnullable string

The alternate names of the certificate.

Request
const response = await fetch('/api/Certificates/GenerateLetsEncrypt', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json; api-version=1.0"
    },
    body: JSON.stringify({
      "commonName": "text",
      "email": "text",
      "name": "text"
    }),
});
const data = await response.json();
Response
{
  "adminCreate": "text",
  "adminLastMod": "text",
  "timeCreate": "2024-10-05T06:03:50.346Z",
  "timeLastMod": "2024-10-05T06:03:50.346Z",
  "status": [
    "0 = Valid",
    "1 = Expiring",
    "2 = Expired",
    "3 = InProgress",
    "4 = Revoked",
    "5 = Issuing",
    "6 = IssuingFailed",
    "7 = Renewing",
    "8 = RenewingFailed",
    "9 = Revoking",
    "10 = RevokingFailed"
  ],
  "publicKey": "text",
  "expirationDate": "2024-10-05T06:03:50.346Z",
  "keySize": [
    "0 = KeySize1024",
    "1 = KeySize2048",
    "2 = KeySize4096",
    "3 = KeySize3072",
    "4 = KeySize521",
    "255 = KeySizeUnknown"
  ],
  "commonName": "text",
  "name": "text",
  "enabled": false,
  "type": [
    "0 = SelfSigned",
    "1 = Request",
    "2 = Imported",
    "3 = LetsEncrypt"
  ],
  "usage": [
    "0 = None",
    "2 = Gateway",
    "4 = HALB"
  ],
  "intermediate": "text",
  "request": "text",
  "description": "text",
  "alternateNames": "text"
}

Last updated

Other Resources

Feedback

© 2024 Parallels International GmbH. All rights reserved.