def get_one(
        self,
        id,
        requester_user,
        exclude_attributes=None,
        include_attributes=None,
        show_secrets=False,
        max_result_size=None,
    ):
        """
        Retrieve a single execution.

        Handles requests:
            GET /executions/<id>[?exclude_attributes=result,trigger_instance]

        :param exclude_attributes: List of attributes to exclude from the object.
        :type exclude_attributes: ``list``
        """
        exclude_fields = self._validate_exclude_fields(
            exclude_fields=exclude_attributes
        )
        include_fields = self._validate_include_fields(
            include_fields=include_attributes
        )

        from_model_kwargs = {
            "mask_secrets": self._get_mask_secrets(
                requester_user, show_secrets=show_secrets
            )
        }

        max_result_size = self._validate_max_result_size(
            max_result_size=max_result_size
        )

        # Special case for id == "last"
        if id == "last":
            execution_db = (
                ActionExecution.query().order_by("-id").limit(1).only("id").first()
            )

            if not execution_db:
                raise ValueError("No executions found in the database")

            id = str(execution_db.id)

        return self._get_one_by_id(
            id=id,
            exclude_fields=exclude_fields,
            include_fields=include_fields,
            requester_user=requester_user,
            from_model_kwargs=from_model_kwargs,
            permission_type=PermissionType.EXECUTION_VIEW,
            get_by_id_kwargs={"max_result_size": max_result_size},
        )

        Retrieve a single execution.

        Handles requests:
            GET /executions/<id>[?exclude_attributes=result,trigger_instance]

        :param exclude_attributes: List of attributes to exclude from the object.
        :type exclude_attributes: ``list``
        
st2api/st2api/controllers/v1/actionexecutions.py