def resource_model_filter(
        self, model, instance, requester_user=None, **from_model_kwargs
    ):
        """
        Method which converts DB object to API object and performs any additional filtering.
        """
        item = model.from_model(instance, **from_model_kwargs)
        return item

        Method which converts DB object to API object and performs any additional filtering.
        
st2api/st2api/controllers/resource.py