@bottle.post('/api/v3/report/<report_uuid>/copy')
def post_report_copy(report_uuid: ReportId, database: Database):
    'Copy a report.'
    data_model = latest_datamodel(database)
    reports = latest_reports(database)
    data = ReportData(data_model, reports, report_uuid)
    report_copy = copy_report(data.report, data.datamodel)
    user = sessions.user(database)
    report_copy['delta'] = dict(uuids=[report_uuid, report_copy['report_uuid']], email=user['email'], description=f"{user['user']} copied the report '{data.report_name}'.")
    result = insert_new_report(database, report_copy)
    result['new_report_uuid'] = report_copy['report_uuid']
    return result
Copy a report.
@bottle.post('/api/v3/report/<report_uuid>/copy')
def post_report_copy(report_uuid: ReportId, database: Database):
    
    data_model = latest_datamodel(database)
    reports = latest_reports(database)
    data = ReportData(data_model, reports, report_uuid)
    report_copy = copy_report(data.report, data.datamodel)
    user = sessions.user(database)
    report_copy['delta'] = dict(uuids=[report_uuid, report_copy['report_uuid']], email=user['email'], description=f"{user['user']} copied the report '{data.report_name}'.")
    result = insert_new_report(database, report_copy)
    result['new_report_uuid'] = report_copy['report_uuid']
    return result