Does anyone knows how to attach a file when calling a SAS BI web service ( json in my case ) ?
I am trying to set up the content-type but it is not working, probably I am using a wrong one. Any help will be appreciated.
I want to attach a file which will be read by stored process ( calling as an api ) and I will get response which is very short.
thank you.
afaik the sp-web-app can't handle attachments. You could provide path+name of file, but this is, of course, not what you want.
I haven't called stored processes as a web service, but this old thread talks about building a STP that allows a user to upload a file from a html form. Perhaps could be adapted for your need. https://communities.sas.com/t5/SAS-Stored-Processes/Uploading-a-file-through-an-html-form/td-p/20312...
I am not sure still if file type is not supported.
https://documentation.sas.com/doc/en/itechcdc/9.4/wbsvcdg/n0e44v8zffokk6n1b5uu2alusw8p.htm
if we use multi part when sending the request, it should be able to retrieve the attachment but I am not able to do that. on the other side I am thinking what could be option if I use rest instead of json.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.