POST Certificates Import
The POST /Certificates/Import method is used to import a certificate provided in the request body into Keyfactor Command. This method returns HTTP 200 OK on a success with a message body containing information about the import.
Table 232: POST Certificates Import Input Parameters
Name | In | Description |
---|---|---|
Certificate | Body |
Required. A string containing the base-64 encoded contents of the certificate to be imported into Keyfactor Command. This may be a certificate with or without associated private key. With PowerShell, for example, you could use the following commands to convert certificates of various types to the appropriate format (referencing $b64Cert in the request body Certificate field).
Tip: You can use the POST /Certificates/Analyze method (see POST Certificates Analyze) to confirm that the string you have generated contains the contents that you expect.
|
Password | Body | Required*. A string containing the password used to decrypt the file containing the certificate to be imported. This field is required if a certificate of PKCS#12 format is provided in the Certificate field. |
Metadata | Body |
An object containing the certificate metadata that will be associated with the certificate once it is imported. This is provided as a set of key value pairs with the metadata field name in the key and the value in the value. For example: Copy
|
Store Ids | Body | An array of strings indicating the certificate store GUIDs that the imported certificate will be installed into. |
Store Types | Body | An array of objects indicating the information for the specified store IDs. Show store type details. |
Schedule | Body | A string containing the time the imported certificate should be scheduled to be installed into the certificate store. The date and time should be given using the ISO 8601 UTC time format YYYY-MM-DDTHH:mm:ss.000Z (e.g. 2023-11-19T16:23:01Z). |
Owner Role Id | Body |
An integer indicating the Keyfactor Command reference ID of the security role assigned as the certificate owner. Note: To assign a certificate owner, one of OwnerRoleId or OwnerRoleName is required, not both.
|
Owner Role Name | Body |
A string containing the name of the security role assigned as the certificate owner. This name must match the existing name of the security role. Note: To assign a certificate owner, one of OwnerRoleId or OwnerRoleName is required, not both.
|
Table 233: POST Certificates Import Response Data
Name | Description |
---|---|
An integer indicating the status of the import job indicating, for example, whether the certificate was newly created in Keyfactor Command or already existed in Keyfactor Command and was just updated based on provided private key, metadata, or location information. |
|
Invaild Key Stores | An array of objects indicating which key store items failed with some information. Show key store details. |
Job Status | An integer indicating the state of all certificate store jobs. |