API & Custom reports

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

API & Custom reports

Not applicable

Hi,

I want to change my custom reports time frame just before executing them, using the XML API.

Here is how I proceed:

  1. Modify the <start-time> and <end-time> using a "action=edit" API request
  2. Pull the results out my report with a "type=report&reporttype=custom" API request

The first step works fine, I see the time frame modification in the web interface and the config logs.

But when I pull the results, the new time frame is not taken into account. It seems that the "running config" time frame is used, instead of the one in the "candidate config".

How can I manage to make it work without doing a commit ?

Regards,

Adrien

1 accepted solution

Accepted Solutions

Hi Adrien,

Yes... I ammended my post because the commit API feature is officially in version 4.1 which is in beta testing currently.  Have you checked out the updated Perl Package for interacting with the XML API? There are many useful libs to simplify scripting efforts...

Current version is located here:

https://live.paloaltonetworks.com/docs/DOC-1910

I will take a look to see if <period> will be supported with custom reports....

Regards,

Marc

View solution in original post

3 REPLIES 3

L2 Linker

Hi Adrien,

Unfortunately the system requires that you commit the custom report changes prior to being able to invoke them using the API, unlike the 'run now' function in the gui.

Regards,

Marc

Hi Marc,

Ok, too bad the API doesn't mimic the GUI behavior.

Any chances the commit requirement will be lifted in a next version ? Or that the "starttime" and "endtime" parameters are going to be supported when requesting custom reports through the API ?

On another note, it seems you have edited some lines out of your post, about committing through the API being possible since v4.0.2.

I didn't try it out nor found any documentation about it. Is it ready for "prime-time" ?

Regards,

Adrien

Hi Adrien,

Yes... I ammended my post because the commit API feature is officially in version 4.1 which is in beta testing currently.  Have you checked out the updated Perl Package for interacting with the XML API? There are many useful libs to simplify scripting efforts...

Current version is located here:

https://live.paloaltonetworks.com/docs/DOC-1910

I will take a look to see if <period> will be supported with custom reports....

Regards,

Marc

  • 1 accepted solution
  • 3436 Views
  • 3 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!