BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
des2
SAS Employee

Hi All,

I am trying to transfer/upload a file to SAS Content Server specifically to /SASContentServer/repository/default/sasdav/Products/SASRiskGovernanceFramework/RiskGovFrwkMid-Tier/rmc/Resources using proc http as below:


%let SASContentServer = /SASContentServer/repository/default/sasdav/Products/SASRiskGovernanceFramework/RiskGovFrwkMid-Tier/rmc/Resources;
%let webdav_url = &rgf_protocol.://&rgf_host.:&rgf_port.&SASContentServer.;

%put &=webdav_url;

 

filename in_file '/sasdata/json/test.json';
filename out_file '/sasdata/json/SASContent_log.txt';

 

proc http
   url="&webdav_url."               
   method="PUT"                     
   in=in_file                    
   out=out_file                     /* Log or response file */
   ct="application/json" 
http_tokenauth;    
run;
 
However, I am getting 415 unsupported media type in the logs. Any idea on how to go about this? Or is there any other way on how I can upload files to SAS Content Server repository automatically? Appreciate any feedback on this. Thank you.
1 ACCEPTED SOLUTION

Accepted Solutions
des2
SAS Employee

Just to update , we were able to transfer the file using curl command.

View solution in original post

5 REPLIES 5
MIPELI
SAS Employee

Hi Des2,

Have you tried to add +json to the content type header? Like in the example below:

 

ct="application/vnd.sas.models.project+json"

 

Kind Regards

des2
SAS Employee

Hi Mipeli,

 

Thanks for the reply. I've only tried /vnd.sas.collection+json because I am also not sure what to put.

 

I've tried what you suggested but it's still the same.

 

des2_0-1741962554065.png

 

des2
SAS Employee
Hi Mipeli,

Noted on this. Will take a look and try at my side. Thanks.

Regards,
Des
des2
SAS Employee

Just to update , we were able to transfer the file using curl command.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 874 views
  • 1 like
  • 2 in conversation