@bottle.get('/api/v3/tagreport/<tag>')
def get_tag_report(tag: str, database: Database):
    'Get a report with all metrics that have the specified tag.'
    date_time = report_date_time()
    reports = latest_reports(database, date_time)
    data_model = latest_datamodel(database, date_time)
    subjects = _get_subjects_and_metrics_by_tag(data_model, reports, tag)
    tag_report = dict(title=f'Report for tag "{tag}"', subtitle='Note: tag reports are read-only', report_uuid=f'tag-{tag}', timestamp=date_time, subjects=subjects)
    hide_credentials(data_model, tag_report)
    summarize_report(tag_report, recent_measurements_by_metric_uuid(database, date_time), data_model)
    return tag_report
Get a report with all metrics that have the specified tag.
@bottle.get('/api/v3/tagreport/<tag>')
def get_tag_report(tag: str, database: Database):
    
    date_time = report_date_time()
    reports = latest_reports(database, date_time)
    data_model = latest_datamodel(database, date_time)
    subjects = _get_subjects_and_metrics_by_tag(data_model, reports, tag)
    tag_report = dict(title=f'Report for tag "{tag}"', subtitle='Note: tag reports are read-only', report_uuid=f'tag-{tag}', timestamp=date_time, subjects=subjects)
    hide_credentials(data_model, tag_report)
    summarize_report(tag_report, recent_measurements_by_metric_uuid(database, date_time), data_model)
    return tag_report