Ejemplo n.º 1
0
def history(record_id):
    # get the history of an object
    from_date = request.values.get("from") # <date to get the history stats from>
    until_date = request.values.get("until") # <date to provide history until>
    
    h = RegistryAPI.get_history(record_id, from_date=from_date, until_date=until_date)
    if h is None or len(h) == 0:
        abort(404)
    
    # return a json response
    resp = make_response(json.dumps(h))
    resp.mimetype = "application/json"
    return resp