API test url category

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

API test url category

L2 Linker

I want to use the API to query URL (Brightcloud) categorisation.  This is the command in the CLI:

pan1(active)> test url theguardian.com

theguardian.com news-and-media (Base db)


running the same check via the API browser:

https://x.x.x.x/api/?REST_API_TOKEN=250290343&type=op&cmd=<test><url>theguardian.com</url></test>

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

<result>

<msg>Unsupported command.</msg>
</result>

</response>


the firewall is on 6.0.1, and I think this worked via the API on PAN-OS 5.  Other commands under the API "test" hierarchy are coming back unsupported also - perhaps the syntax has changed? (can't find anything in the API reference though).

4 REPLIES 4

L7 Applicator

Hello ,

Have you generated the key: http(s)://hostname/api/?type=keygen&user=username&password=password

PFB a helpful document for the same.

PAN-OS and Panorama 5.0 XML API Usage Guide

Thanks

I'm testing through the API browser (ie the GUI) so the key is automatically generated (that's the API_TOKEN in the URL I pasted above).  It doesn't work using a generated key either - we're already using the API for other functions that work fine.

Have you been able to resolve this? I'm also getting the "unsupported command" message when running operation commands with the API.

I'm running 6.0.4 on the firewall.

L5 Sessionator

Hi,

The test command is no longer supported in XML API. This was a design change.

Thanks

  • 5614 Views
  • 4 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!