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.
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
Post a Comment