API and the internet of things