Implement add data endpoint to server.