custom-url-category replacement with XML-API

Reply
L0 Member

custom-url-category replacement with XML-API

To be honest, the UI change for updating the custom-url-category in 4.03 threw us for a loop.

We generate hundreds of domain names and IP addresses to block through our malware threat analysis system.  The old 3.19 interface of copy and paste the text worked fine for us.

Since there is no "clear all" options for the new interface, I did manage to figure out the CLI way of doing it:

    configure

    edit shared profiles custom-url-category OUR_Malware_Threat_List

    delete list

What I can't find in any documentation is the path to the file and a way to automate deletion of the old list and importing the new one.

Any help would be most welcomed.

Thanks.

Mark

SRA
L4 Transporter

Re: custom-url-category replacement with XML-API

You can use config edit API request to replace the entire list of urls in a url filtering profile with a new set of urls:

http(s)://hostname/api/?type=config&action=edit&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/profiles/url-filtering/entry[@name='blocked-url-profile']&element=<entry name='blocked-url-profile'><member>www.badsite.com</member><member>www.badsite2.com</member></entry>

L3 Networker

Re: custom-url-category replacement with XML-API

I described an approach that may fit your requirements here.

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!