returning the history as a json result, will embed this in devices in the future