API test url category

Reply
Highlighted
L2 Linker

API test url category

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).

Highlighted
L7 Applicator

Re: API test url category

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

Highlighted
L2 Linker

Re: API test url category

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.

Highlighted
L4 Transporter

Re: API test url category

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

Re: API test url category

Hi,

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

Thanks

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!