trigger post write api on successful query