Import a KSS Keystore

Imports a Keystore Service (KSS) keystore from a KSS keystore file.

REST Request

POST /idaas/platform/admin/v1/keystoreservice/keystore

Request Body

Media Types: multipart/form-data

The response body contains information about the import request, including:

Attribute Description
"keyAliases" Comma-separated list of aliases for the keys to be imported from the keystoreFile.
"keyPasswords" Comma-separated list of passwords for the keys to be imported from the keystoreFile.
"keystoreFile" Name of a valid local KSS keystore file
"keystoreName" Name for the KSS keystore.
"keystorePassword" Password for the local keystore file that is being imported and the keystore entry, if password-protected.
"keystoreType" Keystore type. This value must be set to JKS.
"permission" Boolean value that specifies whether to import as a permission-based keystore.
"stripeName" Name of the stripe.

Response Body

Media Types: application/json

The response body contains information about the import operation, including:

Attribute Description
"alias n" List of keystores in the stripe, where n serves as an index that starts at 1 and is incremented by 1 for each additional keystore.
"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".

cURL Example

The following example shows how to import a KSS 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 -H Content-Type:multipart/form-data --form "stripeName=myStripe" --form "keystoreFile=@clientkeystore" --form "keystoreName=myKeystore" --form "keystorePassword=password" --form "keystoreType=JKS" --form "keyAliases=client" --form "keyPasswords=password" --form "permission=false" http://myhost:7001/idaas/platform/admin/v1/keystoreservice/keystore

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 201 Created

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "STATUS":"Succeeded",
    "SUCCESS_MSG":"Aliases:client imported successfully",
    "alias 1":"client"
}