Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

REST to download a csv file

manoj_s
Giga Contributor

I have an outbound REST call made to another application , Which then submits a Job and provides the response as a link to download the CSV file.

Is there anyway to do a REST call to download/read this CSV file from the link provided.

I need to read 3 columns from this csv file and then do some data validation before inserting into table.

I am looking into doing a REST call with a StreamWriter. But could not find any examples.

Can you please provide an example for doing this.

2 REPLIES 2

Community Alums
Not applicable

Use Import Set. You can point from where to import your file, as path , etc and how to handle the data. Just check System Import Sets.

Seamus2
Kilo Explorer
    1. Set the response's content type to text/csv .
    2. Use HttpHeaders. 
    3. Use response writer ( response. 
    4. Use write() method of StatefulBeanToCsv instance to write a list of users to CSV file.
    5. Afterwards, the data is pushed to the client where the browser downloads the attached users.

 

 

 

www.krogerfeedback.com