Custom URL Category imports via XML API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Custom URL Category imports via XML API

L0 Member

Greetings,

I have been trying to populate a custom URL category with a list of URLs that we maintain ourselves. Ideally, I would like to do this using the XML API, on a schedule. I have been able to successfully call the API, but I haven't been able to import data yet.

If I read the XML-API documentation (XML-API-6.1.pdf) correctly, the call to import a custom URL category database is

$ curl -k --form file=@BAD_URLS.txt 'https://device/api?type=import&category=url-database&key=...'


Performing this call does do something:


<response status="success"><msg><line>uploaded_bc_db_full saved</line></msg></response>


The file BAD_URLS.txt file contains the following sample data:


<entry name="mycategory">

<list>

<member>www.example.com/bad_url.html</member>

</list>

</entry>


The category 'mycategory' has been created in the Web GUI prior to running the import action. Unfortunately, while the response status says 'success', I cannot find the imported data anywhere. Did I miss something that I should have done either right before, or right after the curl call, or am I just completely misunderstanding the API doc?


Any guidance will be appreciated!

0 REPLIES 0
  • 1751 Views
  • 0 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!