Can moodle call API in specific situations ?