PanOS 4.1 and Commits via XML API

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.

PanOS 4.1 and Commits via XML API

Not applicable

I upgraded to PanOS 4.1 and noticed I could no longer make commits via the XML API. Seems like maybe the syntax has changed but I can't find any documentation. When I execute the query below either by script or browser I'm returned with '500 Internal Server Error'. Correct me if I'm wrong but the XML API is kind of useless if we can't commit changes made with it. :smileysilly:

Commit Query:

https://<panfw>/esp/restapi.esp?type=config&action=commit&key=<apikey>

Any one have any suggestions?

-Brandon

1 REPLY 1

L2 Linker

Hi Brandon,

In 4.1 the XML API has been re-organized and has several enhancements.  One of which is that commit is now a 'type' and no longer nested as an 'action' under config.  There are also several additional options for partial and vsys specific commit operations.

https://hostname/api/?type=commit&action=set&key=keyvalue&cmd=<commit></commit>

This will also work (the original API path has been preserved for backward compatability:

https://honstame/esp/restapi.esp?type=commit&action=set&key=keyvalue&cmd=<commit></commit>

If you log into your firewall as a super user for an admininstrative web session, then open a new tab in your browser and navigate to:

https://hostname/api/

You will be greeted with the new API command browser to assist you in constructing XML API calls.

Best Regards,

Marc

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