Modified XML API for Top Users last 30days

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

Modified XML API for Top Users last 30days

L3 Networker

Hi Support,


We want to get top all users for last 30 days  using XML API, how we get it?


This is XML API to get top 10 users (Worked😞

<type><panorama-trsum><sortby>sessions</sortby><group-by>srcuser</group-by><aggregate-by><member>src</member><member>app</member></aggregate-by><values><member>sessions</member><member>bytes</member><member>nthreats</member></values></panorama-trsum></type><period>last-30-days/period><<topn>10</topn><topm><count>30</count></topm><caption>top-10-users-last-30-days</caption><description>Traffic Reports</description><device-group>{0}</device-group><query>(device-group eq '" . $deviceGroup . "') AND ( (srcuser neq '') )</query><runnow>yes</runnow>


This is the XML API for all users that I get from ChatGPT but it didn't work:


<type><panorama-trsum><sortby>sessions</sortby><group-by>srcuser</group-by><aggregate-by><member>src</member><member>app</member></aggregate-by><values><member>sessions</member><member>bytes</member><member>nthreats</member></values></panorama-trsum></type><period>last-30-days</period><caption>all-users-last-30-days</caption><description>TrafficReportsforAllUsers</description><device-group>{0}</device-group><query>(device-group eq '" . $deviceGroup . "') AND ( (srcuser neq '') )</query><runnow>yes</runnow>


And this is the XML API I get from XML API documentation: 


this API only for 1 day.


I tried to modified the XML above, add start and end date for 1 month but it still only get for 1 day.


How to modified the XML API to get for last 30 days using API above?


Please advise 


thank you


Community Team Member

Hi @Fariq_Zaidi ,


Not sure about the XML API syntax for top users last 30 days.

That said, how about creating a custom report that gives you that exact information and then calling this custom report using XML API ?



Kind regards,


LIVEcommunity team member, CISSP
Please help out other users and “Accept as Solution” if a post helps solve your problem !

Read more about how and why to accept solutions.
  • 1 replies
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!