def get_stacks_report(report): """ Endpoint to retrieve a generated stacks report. A report matching with the filename retrieved using the /stacks-report/list/{frequency} will be returned. """ return flask.jsonify(_s3_helper.get_object_content(report))
def get_sentry_report(report): """ Endpoint to retrieve a generated sentry report. A report matching with the filename retrieved using the sentry-report/list will be returned. """ return flask.jsonify(_s3_helper.get_object_content(report))
def get_stacks_report(report): """ Endpoint to retrieve a generated stacks report. A report matching with the filename retrieved using the /stacks-report/list/{frequency} will be returned. """ try: return flask.jsonify(_s3_helper.get_object_content(report)), 200 except ClientError as e: return flask.jsonify({ 'key': "{key}".format(key=e.response.get('Error').get('Key')), 'message': "{}".format(e.response.get('Error').get('Message')) }), 404