adding api directory to views