added javascript REST calls to the contacts API