Imports a trusted certificate at the specified alias into the JKS keystore. The certificate must be Base64 encoded.
The following table summarizes the POST request parameter.
Name | Description | Type |
---|---|---|
alias |
Alias of the trusted certificate to be imported.
The alias will be created. The alias must not already exist in the JKS keystore; otherwise, the request will fail. |
Path |
Media Types: | application/json |
The request body contains the details of the import request:
Attribute | Description |
---|---|
"certificate" |
Base64-encoded certificate. |
"component" |
Component to which the certificate is imported. This value must be set to JKS . |
Media Types: | application/json |
The response body returns the status of the import operation, including:
Attribute | Description |
---|---|
"ERROR_CODE" |
If "STATUS" is set to "Failed" , provides the error code. |
"ERROR_MSG" |
If "STATUS" is set to "Failed" , provides the contents of the error message. |
"STATUS" |
Status of operation. For example, "Succeeded" or "Failed" . |
"SUBJECT_DN" |
Subject DN list that was imported. |
The following example shows how to import a trusted certificate into the JKS keystore by submitting a POST request on the REST resource using cURL. For more information, see "cURL Access".
curl -i -X POST -u username:password --data @importjkscert.json -H Content-Type:application/json http://myhost:7001/idaas/platform/admin/v1/keystore/mytestkey
The following shows an example of the request body in JSON format.
{ "component":"JKS", "certificate": "Base64-encoded certificate" }
The following shows an example of the response header. For more about the HTTP status codes, see "Status Codes."
HTTP/1.1 200 OK
The following shows an example of the response body in JSON format.
{ "STATUS": "Succeeded", "SUBJECT_DN": "CN=y,OU=y,O=y,L=y,ST=y,C=y" }