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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.