ArcGIS API for JavaScript: DataExport/Data_Export (MapServer)
Built using the ArcGIS API for JavaScript