Added RESTful code for confidence querying