- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-01-2021 09:06 AM
I'm working on a script to pull logs from our firewall, and noticed that I'm unable to grab logs more than couple days ago from the current date. For example, I can see logs in the UI for a specific domain on 8/20, but querying with the API won't yield results that far back. Even when adding (time_generated leq 'some date here') to the query, it doesn't pull any results. Is there something I am missing regarding API settings in the firewall, or does the logging API not go back that far?
09-01-2021 09:33 AM
Hi @Stromboni,
In a lab Panorama, I just did:
https://{{host}}/api?key={{key}}&type=log&log-type=traffic&query=( time_generated leq '2021/08/20 17:12:33' )
...then retrieved logs with:
https://{{host}}/api?type=log&action=get&key={{key}}&job-id={{job-id}}
...and got the expected logs. I was using Postman for the API calls, with Panorama 10.0.6.
Maybe you can share the API calls you are using?
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!