Change the way direct api is included inside a view