@classmethod
    @jsonify
    def as_json(cls, slug, timestamp):
        timestamp_format = '%Y-%m-%d_%H-%M-%S'
        try:
            filename = '%s-%s.json' % (slug, time.strftime(timestamp_format, time.gmtime(float(timestamp))))
        except __HOLE__:
            abort(404, 'Invalid timestamp: %s' % timestamp)

        response.content_disposition = 'attachment; filename=%s' % filename
        data = MetricsSession.get_data_as_json(slug, timestamp)
        if not data:
            abort(404, 'Session does not exist: %s' % timestamp)

        return data
dataset/ETHPy150Open turbulenz/turbulenz_local/turbulenz_local/controllers/localv1/metrics.py/MetricsController.as_json