Add methods to return generic data

Adds API method to return generic data from programme plant.

Bonus feature: Refactor the API's HTTP cache code to remove duplicate code.