ufdbGuard REST API for URL classification and URL filtering

Use the REST API to query the URL database

The REST API is supported by a multi-threaded daemon that has the same core speed as the native ufdbGuard API.  Due to REST protocol overhead, however, the number of URL classifications per second is less compared to the native API.  Therefore, if performance is an important requirement, it is recommended to use the native API for URL classification and URL filtering. 

The REST API daemon has the following properties:
  • classifies URLs in content categories like ads, webmail, entertainment, adult, etc.
  • supports JSON data format
  • is multithreaded and scales well
  • loads the URL database into memory
  • high performance

REST API Examples

The REST client sends a query for a single URL.

   GET http://ufdbrest1.prod.local/useparams/no/url/http%3A%2F%2Fwww.cnn.com%2Fshowbiz HTTP/1.1
and the REST server replies
   HTTP/1.1 200 OK
   { "url": "www.cnn.com/showbiz", "categories": [ "news", "entertainment" ], "reloading": "no" }


The REST client sends a query for a list of URLs.  The maximum size of the list is currently 256.

   POST http://ufdbrest1.prod.local/useparams/no/geturllist.json HTTP/1.1
   { "urls": [ "http%3A%2F%2Fwww.cnn.com%2Fshowbiz", ... ] }
and the REST server replies
   HTTP/1.1 200 OK
   { "urlcategories": [ 
      { "url": "www.cnn.com/showbiz", "categories": [ "news", "entertainment" ] },
      ...
   ] }

See the ufdbGuard REST API Reference Manual for a complete list of supported queries.

The REST API is very different from ufdbGuard for Squid and has a different license scheme targeted for environments with large volumes.  System integrators and vendors may contact the sales and support desk for more information about how to use the REST API for URL filtering and URL classification.