Added an api helper to process the JSON returned from the REST API