Api request views and js