Moved XML/JSON export api call to controllers/api.py