City APIs by city councils as a step to the internet of things

We always dream about the internet of things and how everything talk our devices so they do things for us.
Trains and their stations, metros, taxi cabs, traffic lights and many other appliances have so much information to send to us, add to that; sensors and cameras that can be put anywhere.
Collecting the data shouldn’t be all automated, specially at the beginning. A train station employee can trigger something if they think something will affect a journey.
The use of these APIs that can be sold to developers who know how to invest these data and make money out of it. It will also help cities to generate more income and make their people lives easier.
Do you think cities should do that? what are the obstacles and opportunities in implementing such a project?.. happy to listen to you!