Upload private key file and password as multipart/form-data
POST/qsystem/rest/config/agent/:agentId/security/certificate/:alias/preGenerated
Upload private key file and password as multipart/form-data. This call only works on distributed Queue Agents with version 3.2 or higher.
Example:
curl -i -X POST --cookie {cookies_file} -F 'xsrfToken={token}' -F 'data={"keyPassword":"password"};type=application/json' -H 'Content-type: multipart/form-data'
-F 'file=@mykey.pfx' -F 'file=@signer.cer' -F 'file=@root.cer' http://ip:port/qsystem/rest/config/agent/{agentId}/security/certificate/{alias}/preGenerated
{alias} refers to the alias to attach the private key for {"keyPassword":"password"} is a JSON object that describes the password required for the private key. file=@mykey.pfx is the PKCS12 private key file to upload file=@signer.cer is the signers certificate file=@root.cer is the root certificate {cookies_file} is a file containing cookies retrieved from a login request {token} is a generated security token, see SecurityService#getXsrfToken
If the certificate authority chain has a different number of certificates, adjust and add/remove additional files using the -F flags shown above.
Login cookie retrieval example: curl -i --cookie-jar {cookies_file} -X POST http://ip:port/login.jsp -d "username={username}&password={password}"
Request
Responses
- 201