Import Wallet
- Last Updated: April 14, 2026
- 1 minute read
- MarkLogic Server
- Version 10.0
- Documentation
To import the embedded KMS (the PKCS #11 secured wallet) using REST, you can use this form in XQuery:
POST manage/v2/security?
operation=import-wallet&filename=/my/test.wallet&password=test
As a curl command (using MANAGEADMIN="admin" and MANAGEPASS="admin") it would look like this:
curl -v -X POST --anyauth --user $MANAGEADMIN:$MANAGEPASS \
--header "Content-Type:application/xml" \
-d@data/security/import-wallet.xml \
http://$host:8002/manage/v2/security
Where import-wallet.xml is:
<import-wallet-operation xmlns="http://marklogic.com/manage/security">
<operation>import-wallet</operation>
<filename>/tmp/mywallet.txt</filename>
<password>mypassword</password>
</import-wallet-operation>
Or you can use this form for JavaScript:
POST manage/v2/security
{"operation":"import-wallet","filename":"/my/test.wallet","password":"test"}
As a curl command (using MANAGEADMIN="admin" and MANAGEPASS="admin") it would look like this:
curl -v -X POST --anyauth --user $MANAGEADMIN:$MANAGEPASS \
--header "Content-Type:application/json" \
-d@data/security/import-wallet.json \
http://$host:8002/manage/v2/security
Where import-wallet.json is:
{
"operation":"import-wallet",
"filename":"/tmp/mywallet.tmp",
"password":"mypassword"
}
Note:
MarkLogic will only import keys generated by the embedded MarkLogic Server KMS.