def get_endpoint(handler, defaults, callback):
    '''
    Makes a call to an API endpoint, using parameters from default.
    '''
    try:
        args = {}
        for name, default, parser in defaults:
            arg = handler.get_argument(name, default=None)
            if arg is None:
                args[name] = default
            else:
                args[name] = parser(arg)
        handler.write(callback(**args))
    except Exception as e:
        handler.write(api.exception_response(e))
Makes a call to an API endpoint, using parameters from default.
frontend/securitybot_frontend.py