def from_model(cls, model, mask_secrets=False, skip_db=False):
        """Create InquiryResponseAPI instance from model

        Allows skipping the BaseAPI._from_model function if you already
        have a properly formed dict and just need to prune it

        :param skip_db: Skip the parent class' _from_model function call
        :rtype: InquiryResponseAPI
        """

        if not skip_db:
            doc = cls._from_model(model, mask_secrets=mask_secrets)
        else:
            doc = model

        newdoc = {"id": doc["id"]}
        for field in ["route", "ttl", "users", "roles", "schema"]:
            newdoc[field] = doc["result"].get(field)

        return cls(**newdoc)
Create InquiryResponseAPI instance from model

        Allows skipping the BaseAPI._from_model function if you already
        have a properly formed dict and just need to prune it

        :param skip_db: Skip the parent class' _from_model function call
        :rtype: InquiryResponseAPI
        
st2common/st2common/models/api/inquiry.py