Retrieving logs from PA device via Panorama 6.x XML API

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

Retrieving logs from PA device via Panorama 6.x XML API

L0 Member

Hello,

When I login to my PA device via ssh and run the command

show log config result equal succeeded

I get list of records.

I would like to get the exact same result but via Panorama XML API.

I tried:

https://panorama/api/?type=op&cmd=<show><log><config></config></log></show>&target=serialnumber&key=mykey

But I get:

 

<response status="error">
<msg>
<line>invalid client cli</line>
</msg>
</response>

How can I use the XML API in Panorama to retrieve the logs from managed device?

1 REPLY 1

L2 Linker

old but still relevant. Not all CLI commands translate directly to API call. If you use the REST API browser you can see there is a dedicated section for logs. https://docs.paloaltonetworks.com/pan-os/10-1/pan-os-panorama-api/pan-os-xml-api-request-types/retri...

 

  • 6632 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!