API to get Global protect users logs

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

API to get Global protect users logs

L0 Member

Hi All,

 

Any suggestions on how to get Global protect logs for last 24 hours from panorama.

In the Web interface in the systems logs  if we put the filter globalprotectportal-config-succ using the Time frame, we get all the previous user detail for global protect

 

 

Thanks in Advance.

1 REPLY 1

L6 Presenter

Hello @Umakant 

 

You can use below syntax to get the required data using API.

 

https://<IP-Address>/api/?type=log&log-type=system&query=(eventid eq globalprotectportal-config-succ)&key=<api-key>

 

Now I have put query equal to event log - globalprotectportal-config-succ. You can mention here the exact query in above syntax that you are matching in the system logs on the WebUI. Once you query it, you will see result as shown below.

 

<response status="success" code="19">

<result>

<msg>

<line>query job enqueued with jobid 783</line>

</msg>

<job>783</job>

</result>

</response>

 

 

Now you get the job id. Using that job id you need retrieve the required data using below API query. In place of job id, you need to mention the id that you're getting (In above case, it is 783). Once query is successful, you will get the desired information.

 

https://<IP-Address>/api/?key=apikey&type=log&action=get&job-id=<id>

 

You can even try same using Reports. I personally never tried it but i think, it should also work as per your requirements. You can defined Custom Reports for Global Protect. And see the  report using below syntax.

 

/api/?type=report&async=yes&reporttype=custom&reportname=<Report-Name>

 

Hope it helps!

 

M

Check out my YouTube channel - https://www.youtube.com/@NetworkTalks
  • 2728 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!