PAN OS REST API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

PAN OS REST API

L2 Linker

 

 I am just starting out and learning automation.  I am using PAN OS 10.2 on PA 820 lab device.  When I try to use a use the GET Method to query addresses, the restapi-doc shows: https://10.x.x.x/restapi/v10.2/Objects/Addresses  . 

 

I don’t see the “"Invalid Query Parameter: key".  Could it be that my API key is bad or invalid?  Below is my curl command I was using

 

curl -k -X GET "https://10.x.x.x.x/restapi/v10.2/Objects/Addresseslocation=vsys&vsys=vsys1&key=LUF7************==" | jq

 

I have attached the output response.

 

Thanks

-Amin

1 REPLY 1

Cyber Elite
Cyber Elite

@Amin2,

You won't use &key= with the REST API like you can with the XML API. With REST you're forced to actually use the X-PAN-KEY:<key> header for authentication.

  • 72 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!