- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-23-2015 09:35 AM
Hello,
I've been trying to find a way to programmatically access the HIP check reports that are surfaced in the UI under Monitor > HIP Match > (Magnifying Glass Icon). It's an incredibly handy report whose data I'd like to be able to incorporate into different tools, but I've not been able to find the right API call magic to make it work. The only thing I've been able to pull thus far has been HIP Match logs.
I ran a report while in debug mode and found that the request looks something like:
[2015/01/22 14:54:18]
<request cmd="op" cookie="70133667733XXXXX" target="001701XXXXXX">
<operations xml="yes">
<download>
<hip-report>
<vsys>vsys1</vsys>
<machinename>USER-LAP3</machinename>
<ip>IP_ADDR</ip>
<username>DOMAIN\USER</username>
</hip-report>
</download>
</operations>
</request>
But when I tried to feed an op command to the API (via the pan-python tool, but this is a response from the API layer rather than the library) using that <download> structure as the argument, I got back:
>>> cmd
'<download><hip-report><vsys>vsys1</vsys><machinename>USER-LAP3</machinename><ip>IP_ADDR</ip><username>DOMAIN\\USER</username></hip-report></download>'
>>> xapi.op(cmd=cmd)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pan/xapi.py", line 758, in op
self.__type_op(cmd, vsys)
File "/Library/Python/2.7/site-packages/pan/xapi.py", line 779, in __type_op
raise PanXapiError(self.status_detail)
pan.xapi.PanXapiError: download not available to xmlapi client
which looks to be an error message generate by the API itself.
Is there any way to get the data provided by that report programmatically? Even if I have to go make each individual call myself, that'd be fine.
Thanks!
01-23-2015 10:35 AM
Raw XML response when submitting this directly via curl doesn't look promising, but hopefully there's a workaround:
<response status="error" code="17">
<msg>
<line>
<![CDATA[ download not available to xmlapi client ]]>
</line>
</msg>
</response>
06-01-2021 08:33 AM
I have the same question, is there anyway to get that Magnifying Glass report to export?
06-02-2021 02:19 AM
Does this help?
https://{{host}}/api/?key={{key}}&type=op&cmd=<show><user><hip-report><user>{{username}}</user><ip>{{user-ip}}</ip><computer>{{user-hostname}}</computer></hip-report></user></show>
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!