def _execute(self, request, **kwargs):
        """The top-level execute function for the endpoint.

        This method is intended to remain as-is, and not be overridden.
        It gets called by your HTTP framework's route handler, and performs
        the following actions to process the request:

        ``authenticate_request``
            Validate the Bearer token, populate the ``current_user``, and make
            sure that the token covers the scope needed to call the requested
            method.
                         *
                         *
        ``parse arguments``
            The argument parser is responsible for:
              - First, coercing and patching any parameters that might require
                it due to versioning (i.e. the caller is using an old API
                version that supports `index` as a parameter for pagination,
                but the current version uses the name `offset`)
              - Second, iterating through the endpoint's supported arguments
                and validating that the params passed in comply with the
                endpoint's requirements
              - Third, populating the `context.args` array with the validated
                arguments
            If any of the arguments are invalid, then the Argument parser will
            raise an ArgumentError that bubbles up to the `try/catch` block of
            the execute method.
                         *
                         *
        ``before handler``
            The before_handlers are specified by the Endpoint definition, and
            are intended to supporty DRY-ing up your codebase.  Have a set of
            Endpoints that all need to grab an object from the ORM based on the
            same parameter?  Make them inherit from an Endpoint subclass that
            performs that task in a before_handler!
                         *
                         *
        ``handle``
            The core logic of your API endpoint, as implemented by you in your
            Endpoint subclass.  The API Framework expects ``handle`` to return
            a dictionary specifying the response object and the JSON key that
            it should hang off of, or a tuple of a dictionary and an HTTP status
            code.
                         *
                         *
        ``after_handler``
            Like the before_handlers, the ``after_handlers`` happen after the
            handle method, and allow the endpoint developer to re-use code for
            post-processing data from an endpoint.
                         *
                         *
        ``render response``
            Like the argument parser, the response renderer is responsible for
            a few things:
              - First, it converts the ORM objects into JSON-serializable
                Python dictionaries using the Resource objects defined by the
                API implementation,
              - Second, it does any version parameter coersion, renaming and
                reformatting the edge version of the response to match the
                version requested by the API caller,
              - and Third, it serializes the Python dictionary into the response
                format requested by the API caller (right now, we only support
                JSON responses, but it'd be reasonble to support something like
                HTML or XML or whatever in the future).
            The rendered JSON text is then returned as the response that should
            be sent by your HTTP framework's routing handler.
                         *
                         *
        ``_after_response_handler``
            The `_after_response_handlers` are specified by the Endpoint
            definition, and enable manipulation of the response object before it
            is returned to the client, but after the response is rendered.

            Because these are instancemethods, they may share instance data
            from `self` specified in the endpoint's `_handle` method.

        ``_finalize_content``
            The `_finalize_content` method is overridden by the Endpoint and is called
            after the response is rendered into a serializable result.

            This method is called with two arguments, the context and the rendered content,
            and expected to return updated rendered content.

            For in-place modification of dicts, this method will still be expected
            to return the given argument.

        ``_allow_cors``
            This value is set to enable CORs for a given endpoint.

            When set to a string it supplies an explicit value to
            'Access-Control-Allow-Origin'.

            Set to True, this will allow access from *all* domains;
                Access-Control-Allow-Origin = "*"

        """
        try:
            self._create_context(request)
            self._authenticate()

            context = get_current_context()

            self._parse_args()

            if hasattr(self, '_before_handlers') and \
                    isinstance(self._before_handlers, (list, tuple)):
                for handler in self._before_handlers:
                    handler(context)

            context.handler_result = self._handle(context)

            if hasattr(self, '_after_handlers') and \
                    isinstance(self._after_handlers, (list, tuple)):
                for handler in self._after_handlers:
                    handler(context)

            self._render()
            response = context.response
            # After calling ._render(), the response is ready to go, so we
            # shouldn't need to handle any other exceptions beyond this point.
        except AuthenticationError as e:
            if hasattr(e, 'message') and e.message is not None:
                message = e.message
            else:
                message = "You don't have permission to do that."
            err = APIError.Forbidden(message)
            response = self._response_class(*err.response)
            response.headers["Content-Type"] = 'application/json'
        except ArgumentError as e:
            err = APIError.UnprocessableEntity(e.message)
            response = self._response_class(*err.response)
            response.headers["Content-Type"] = 'application/json'
        except APIError as e:
            response = self._response_class(*e.response)
            response.headers["Content-Type"] = 'application/json'
        except PaleRaisedResponse as r:
            response = self._response_class(*r.response)
            response.headers["Content-Type"] = 'application/json'
        except Exception as e:
            logging.exception("Failed to handle Pale Endpoint %s: %r", self.__class__.__name__,
                e)
            err = APIError.Exception(repr(e))
            response = self._response_class(*err.response)
            response.headers["Content-Type"] = 'application/json'

        allow_cors = getattr(self, "_allow_cors", None)
        if allow_cors is True:
            response.headers['Access-Control-Allow-Origin'] = '*'
        elif isinstance(allow_cors, basestring):
            response.headers['Access-Control-Allow-Origin'] = allow_cors

        context.response = response

        try:
            if hasattr(self, '_after_response_handlers') and \
                    isinstance(self._after_response_handlers, (list, tuple)):
                for handler in self._after_response_handlers:
                    handler(context, response)
        except Exception as e:
            logging.exception(
                "Failed to process _after_response_handlers for Endpoint %s",
                self.__class__.__name__)
            raise

        return response
The top-level execute function for the endpoint.

        This method is intended to remain as-is, and not be overridden.
        It gets called by your HTTP framework's route handler, and performs
        the following actions to process the request:

        ``authenticate_request``
            Validate the Bearer token, populate the ``current_user``, and make
            sure that the token covers the scope needed to call the requested
            method.
                         *
                         *
        ``parse arguments``
            The argument parser is responsible for:
              - First, coercing and patching any parameters that might require
                it due to versioning (i.e. the caller is using an old API
                version that supports `index` as a parameter for pagination,
                but the current version uses the name `offset`)
              - Second, iterating through the endpoint's supported arguments
                and validating that the params passed in comply with the
                endpoint's requirements
              - Third, populating the `context.args` array with the validated
                arguments
            If any of the arguments are invalid, then the Argument parser will
            raise an ArgumentError that bubbles up to the `try/catch` block of
            the execute method.
                         *
                         *
        ``before handler``
            The before_handlers are specified by the Endpoint definition, and
            are intended to supporty DRY-ing up your codebase.  Have a set of
            Endpoints that all need to grab an object from the ORM based on the
            same parameter?  Make them inherit from an Endpoint subclass that
            performs that task in a before_handler!
                         *
                         *
        ``handle``
            The core logic of your API endpoint, as implemented by you in your
            Endpoint subclass.  The API Framework expects ``handle`` to return
            a dictionary specifying the response object and the JSON key that
            it should hang off of, or a tuple of a dictionary and an HTTP status
            code.
                         *
                         *
        ``after_handler``
            Like the before_handlers, the ``after_handlers`` happen after the
            handle method, and allow the endpoint developer to re-use code for
            post-processing data from an endpoint.
                         *
                         *
        ``render response``
            Like the argument parser, the response renderer is responsible for
            a few things:
              - First, it converts the ORM objects into JSON-serializable
                Python dictionaries using the Resource objects defined by the
                API implementation,
              - Second, it does any version parameter coersion, renaming and
                reformatting the edge version of the response to match the
                version requested by the API caller,
              - and Third, it serializes the Python dictionary into the response
                format requested by the API caller (right now, we only support
                JSON responses, but it'd be reasonble to support something like
                HTML or XML or whatever in the future).
            The rendered JSON text is then returned as the response that should
            be sent by your HTTP framework's routing handler.
                         *
                         *
        ``_after_response_handler``
            The `_after_response_handlers` are specified by the Endpoint
            definition, and enable manipulation of the response object before it
            is returned to the client, but after the response is rendered.

            Because these are instancemethods, they may share instance data
            from `self` specified in the endpoint's `_handle` method.

        ``_finalize_content``
            The `_finalize_content` method is overridden by the Endpoint and is called
            after the response is rendered into a serializable result.

            This method is called with two arguments, the context and the rendered content,
            and expected to return updated rendered content.

            For in-place modification of dicts, this method will still be expected
            to return the given argument.

        ``_allow_cors``
            This value is set to enable CORs for a given endpoint.

            When set to a string it supplies an explicit value to
            'Access-Control-Allow-Origin'.

            Set to True, this will allow access from *all* domains;
                Access-Control-Allow-Origin = "*"