Download HIP Report via XML API

Reply
Highlighted
Not applicable

Download HIP Report via XML API

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!

Tags (3)
Not applicable

Re: Download HIP Report via XML API

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>

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 Live Community as a whole!

The Live Community thanks you for your participation!