0

Duplicate parameters in URL

I created an interesting problem for myself.  Due to my own copy/paste error on a GET Certificate/Retrieve call, I included the IncludePrivateKey=true parameter twice.  For whatever reason, the API did not include the private key in the JKS, but it also did not return any error at all - I got a happy little status 200 back, along with a slightly incomplete JKS.

This is what my failing call looked like (translated into cURL):

curl -X GET '{{venafi_url}}/vedsdk/certificates/Retrieve?CertificateDN={{certificateDN}}&Format=JKS&FriendlyName={{alias}}&IncludeChain=true&IncludePrivateKey=true&IncludePrivateKey=true&Password={{key_PW}}&KeystorePassword={{store_PW}}' -H 'X-Venafi-Api-Key: {{api_key}}'

Oddly, the behavior was to not include the private key. It's as if the two trues silently canceled each other out and made a false.

This is not a big deal; it was clearly my fault for not properly following the published API specs.  Still, it would have saved me some troubleshooting time to have gotten a 40x status back along with a stern lecture about the importance of carefully following the API. 

3 comments

Please sign in to leave a comment.