Delete URL from URL Category using api

Reply
L1 Bithead

Delete URL from URL Category using api

I'm wanting to be able to delete specific URLs from Objects -> Custom Objects -> URL Category using the api.  I have refered to an existing post here that offers a solution however, I am getting an error when I run the command.  My command running on PAN OS 6.1.9 is:

 

panxapi.py -d "/config/devices/entry/vsys/entry[@name='vsys1']/profiles/custom-url-category/entry[@name='Blocklist - Mine']/member[text()='pufikshop.ru/css/index.php']"

 

The response I get is:

 

delete: success [code="20"]: "Object doesn't exist"

 

The specific URL is still listed in the URL list.

 

Any suggestions?  Also, I would like to know if there is a way to empty all entries from the Blocklist - Mine URL category without deleting the category itself.

 

Thanks

Leigh

 

 

 

 

L1 Bithead

Re: Delete URL from URL Category using api

I think your XPath for the object may be a bit off.

 

Original:

/config/devices/entry/vsys/entry[@name='vsys1']/profiles/custom-url-category/entry[@name='Blocklist - Mine']/member[text()='pufikshop.ru/css/index.php']

 

New:

/config/devices/entry/vsys/entry[@name='vsys1']/profiles/custom-url-category/entry[@name='Blocklist - Mine']/list/member[text()='pufikshop.ru/css/index.php']

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!