I need to upload a file from my local disk to a SAS Content folder. I am using the SAS REST APIs for this.
I am a bit confused reading the API doc on https://developers.sas.com. On the one hand in the "folders" API there is an option to add a "member" to an existing folder. On the other hand, on the "files" API there is an option to create a new file. Not sure what to use and what is the relationship between the two.. Any advice?
Hi @EyalGonen,
You can use the Upload a file end point under the dataTables API. I'm attaching a Postman collection with example usage. Look in step 2. upload data for an example.
Join us for SAS Community Trivia
SAS Bowl XLVII, SAS Visual Text Analytics
Wednesday, December 18, 2024, at 10:30 a.m. ET | #SASBowl
Hi @joeFurbee
I need to upload text files such SAS programs or binary files like JPG files. Is your solution appropriate for these use cases?
Hi @EyalGonen,
Yes, a text file should be fine. In my example (see below) I use a csv file. In order to provide the file path, I went to the Body section, created a new file Key and provided the path from my client as the Value.
I've not tried with .jpg. Would be interested if that works or not.
Join us for SAS Community Trivia
SAS Bowl XLVII, SAS Visual Text Analytics
Wednesday, December 18, 2024, at 10:30 a.m. ET | #SASBowl
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.