Api query problem

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

Api query problem

Not applicable

Hello,

I an doing a traffic query through the API like this

https://pa/api?/type=log&log-type=traffic&query=(add.src in 10.1.1.1)&key=API_KEY

I get the response with a job id.

But when i try to get the content of the job ID

https://pa/api?/type=log&action=get&job-id=JOB&key=API_KEY

I get the following error

<response status="error" code="17">

<msg>

    <line>show-> query -> id is unexpected </line>

</msg>

</response>

3 REPLIES 3

L1 Bithead

I was able to duplicate the error you were seeing and was able to get the query results using the following command:

//firewall/api/?&type=op&cmd=<show><query><result><id>JOB-ID</id></result></query></show>&key=API_KEY

//firewall/api/?&type=op&cmd=<show><query><result><id>JOB-ID</id></result></query></show>&key=API_KEY

This command resulted in an error.

<response status="error" code="17">

<msg>

<line>

<![CDATA[ show -> query -> result is unexpected ]]>

</line>

</msg>

</response>


//firewall/api/?&type=op&cmd=<show><query><id>JOB-ID</id></query></show>&key=API_KEY

This command worked.

//firewall/api?/type=log&action=get&job-id=JOB&key=API_KEY

This command worked, too.

Tested in 5.0.3.



L4 Transporter

Your usage is correct. Can you confirm the job id value you provided is the same as the one returned by the previous query.

  • 3000 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!