Implementation of /similarity REST endpoint

yup its already been repeated in a few endpoints; makes sense to move this to parent class.