ufdbGuard REST API for URL classification and URL filteringUse the REST API to query the URL databaseThe 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:
REST API ExamplesThe 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.1and 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. |