Add API endpoints to serve data in JSON format.