need help with the api call in index.html