API commits no longer working

Reply
L2 Linker

API commits no longer working

Has anyone encountered this problem?  I have noticed since upgrading Panorama to 8.1.7 that two of my API commits no longer work: log collector and forced template stack.  I get the following message from Panorama:

<response status="success" code="19">
<msg>There are no changes to commit.</msg>
</response>

 

However, there are outstanding changes, and I am able to commit them manually through the GUI.

 

API calls being used:

Log Collector commit -

<commit-all><log-collector-config><log-collector-group>$LC-group</log-collector-group></log-collector-config></commit-all>

 

 

Force template stack commit -

<commit-all>
<template-stack>
<name>stack_{{$TEMP-NAME}}</name>
<device>
<member>{{$serialnum}}</member>
</device>
<merge-with-candidate-cfg>no</merge-with-candidate-cfg>
<force-template-values>yes</force-template-values>
</template-stack>
</commit-all>

 

 

I am going to try downgrading my Panorama install in my lab to test again.  The last time i remember i ran these calls successfully was on 8.1.5.

 

 

L2 Linker

Re: API commits no longer working

Updated - I tested on 8.1.5 with the same results.  I did resolve my problem.  I must've edited my API calls at some point and removed the "action=all" paramater:

 

/api/?type=commit&action=all&cmd=<commit-all>

 

 

 

 

L0 Member

Re: API commits no longer working

Hello, we have the same issue with v.8.1.5 and 8.1.7, we confirm it works with "commit all" API string. However in this way we commit all the changes made by other users. Is there any way to make a partial commit related to one user only (API user)?

L1 Bithead

Re: API commits no longer working

This should work. I have a script that is tied to a specific user via the API key and whenever it runs to update an address, I have the script only commit the changes made by this user. In my script, I define the $ADMIN variable as my api user.

 

/api/?&type=commit&action=partial&cmd=<commit><partial><admin><member>$ADMIN</member></admin></partial></commit>

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 Live Community as a whole!

The Live Community thanks you for your participation!