curl - Calling an PingAccess APIs from Powershell -


i trying call pingaccess apis configure pingaccess. new using apis this, , have question.

i trying use curl api .

curl -k -u administrator:dummypsswd -h "x-xsrf-header: pingaccess" -h "content-type: application/json" -d '{"alias":"placeholder_star_mingle","filedata": [[system.io.file]::readallbytes("c:\test.pfx")],"password": "1234"}' https://localhost:9000/pa-admin-api/v1/keypairs/import -v 

when run following error.

error on powershell

i still dont know why unauthorized. appreciated.

when have special characters in password you'll need enclose username/password tuple in double quotes:

curl -k -u "administrator:dummypsswdwithspecialcharslike&&" -h "x-xsrf-header: pingaccess" -h "content-type: application/json" -d '{"alias":"placeholder_star_mingle","filedata": [[system.io.file]::readallbytes("c:\test.pfx")],"password": "1234"}' https://localhost:9000/pa-admin-api/v1/keypairs/import -v 

Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -