cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Who Me Too'd this topic

REST API and Powershell

Not applicable

Has anyone used Powershell to interact with REST API on PA500?

When I use the Invoke-RestMethod cmdlet to try and generate a key, I get back an empty response. If I run the keygen through a browser, it successfully returns a key. Running 6.1.1.

PS C:> Invoke-RestMethod -Uri http://<ip-of-PA500>/api/?type=keygen%26ampuser=<adminuser>%26amppassword=<adminpassword>

response

-------------

response

http://<ip-of-PA500>/api/?type-keygen&user=<adminuser>&password=<adminpassword>

<response status="success">

     <result>

          <key>

               <.....generated key.....>

          </key>

     </result>

</response>

Who Me Too'd this topic