Added some example code for a rest api in java