I get an error after submitting this code. How to fix this.
I could not find a proc http example with #rawUpload
%let baseurl=%sysfunc(getoption(SERVICESBASEURL)); proc http method=POST url="&baseurl./files/files/#rawUpload" in = 'sample file bytes' oauth_bearer = sas_services; debug level=1; headers 'Accept'= 'application/vnd.sas.collection+json'; run;
In the code you posted, the #rawupload is part of the URI:
proc http
method=POST
url="&baseurl./files/files/#rawUpload"
In a URI, the # indicates a named anchor, expressed in the HTML as an ID tag, in an HTML document. I've never seen one used in an API URI before. You will need to refer to your API documentation to properly construct the URI for your PROC HTTP step.
To clarify what I mean by a named anchor, this URL leads to the SAS documentation for the DOLLAR format:
https://go.documentation.sas.com/doc/en/pgmsascdc/v_026/leforinforref/p03sgbuduqemljn1nqj7qm1leql9.h...
But I want to send you a link that will take you straight to the Syntax portion of the page:
I inspect the page source and see the named anchor (ID) encoded in the HTML:
<h2 class="xisDoc-title" id="p13eaxol6sdchqn1atunoasthxge">Syntax</h2>
So I add the named anchor to the URL:
https://go.documentation.sas.com/doc/en/pgmsascdc/v_026/leforinforref/p03sgbuduqemljn1nqj7qm1leql9.h...#p13eaxol6sdchqn1atunoasthxge
And the link now leads straight to the Syntax section:
Thank you for the the suggestion!
The official api-documentation is as follows:
I'am still interpreting this in a strict literal manner. In the documention there is nothing one should replace the # with something else. But maybe I'm wrong
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.