Download HIP Report via XML API

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

Download HIP Report via XML API

Not applicable

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!

3 REPLIES 3

Not applicable

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>

L1 Bithead

I have the same question, is there anyway to get that Magnifying Glass report to export?

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>

 

 

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂
  • 4535 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!