Add REST API functionality for downloading results.