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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 918 views
  • 1 like
  • 2 in conversation