api and views