updated rest api to use a json object
merged updates