change directive api