Code for jersey apis