Import Pfx

Import a Pfx file

This can be used to import a Pfx file. If the pfx password is used (optional), the file has to be in a pfx format and will be used as a Certificate file, as well.

POST/api/Certificates/ImportPfx
Body
PfxPasswordstring

Password of the pfx File to be uploaded

PfxFilestring (binary)

Private Key File to be uploaded.

Namestring

The name of the target Certificate

SiteIdinteger (int32)

Site ID in which to add the Certificate

Descriptionstring

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

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/ImportPfx', {
    method: 'POST',
    headers: {
      "Content-Type": "multipart/form-data"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": 0,
  "adminCreate": "text",
  "adminLastMod": "text",
  "timeCreate": "2025-01-04T23:10:15.010Z",
  "timeLastMod": "2025-01-04T23:10:15.010Z",
  "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": "2025-01-04T23:10:15.010Z",
  "keySize": [
    "0 = KeySize1024",
    "1 = KeySize2048",
    "2 = KeySize4096",
    "3 = KeySize3072",
    "4 = KeySize521",
    "255 = KeySizeUnknown"
  ],
  "commonName": "text",
  "name": "text",
  "siteId": 0,
  "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"
}

© 2024 Parallels International GmbH. All rights reserved.