Implementation of /similarity REST endpoint

Will do, thanks for the feedback.