PROC HTTP Method Verb Examples: • PUT • POST • PATCH • CREATE proc http url="https://clinicaltrialsapi cancer gov/v1/terms?
Previous PDF | Next PDF |
[PDF] The ABCs of the HTTP Procedure - SAS
2 mai 2019 · An example of using the headers statement is shown below: proc http url="httpbin org/headers"; headers "Accept"="application/json"; run; The resulting output is
[PDF] Efficient implementation and applications of PROC - LexJansen
locate and import files from SharePoint to SAS are explored, followed by a look at “404 Not Found” is a well-known example of an HTTP return code when a
[PDF] Efficient Implementation and Applications of PROC - LexJansen
PROC HTTP Method Verb Examples: • PUT • POST • PATCH • CREATE proc http url="https://clinicaltrialsapi cancer gov/v1/terms?
[PDF] Executing a PROC from a DATA Step - MidWest SAS Users Group
In SAS 9 2 and later, the RUN_MACRO function executes a macro and waits for it to The second example executes PROC HTTP from a DATA step to get the
[PDF] Using SAS® for Application Programming Interface - PharmaSUG
requests You can submit input and receive output from a fileref (SAS) Also if a user name and password is given PROC HTTP can support basic authentication
[PDF] Web Scraping in SAS - Squarespace
PROC HTTP is useful for connecting to the webpage and reading the HTML source code into a SAS data set, as is demonstrated in the example below:
[PDF] PROC SOAP, PROC HTTP und der ganze REST - SAS-Wiki
Die wichtigsten Punkte dieser Definition sind: Erstens handelt es sich um eine Software Zweitens lässt sich der Webservice durch einen URI bzw eine URL
[PDF] Using the REDCap API for Data Import and Export Look for
proc http in=&_in out=&_out headerout=&_hdrout url="&_url" method="post" ct=" &_ct“ ; run; mend _transfr; In this example we are exporting records (all of them) in XML format Exporting raw Getting the data into SAS (CSV) Just as you
[PDF] Whats new in SAS 94 M6 - VA HSRD
On-going integration between SAS 9 4M6 and SAS Viya Cloud Analytic Includes examples, such as customizing a header using PROC TEMPLATE Hive 3 0 • When invoking a web service using PROC HTTP, you can set SSL options
[PDF] sas proc http post
[PDF] sas proc http sharepoint
[PDF] sas proc https
[PDF] sas proc json write values
[PDF] sas proc sql create table as select
[PDF] sas proc sql create table join
[PDF] sas proc sql create table like
[PDF] sas proc sql create table replace
[PDF] sas proc sql create table syntax
[PDF] sas proc sql format
[PDF] sas proc sql; create table as select example
[PDF] sas retain array
[PDF] sas sum(of array name * )
[PDF] sascrunch arrays
Efficient Implementation and Applications of PROC HTTP in Analysis and ReportingSimon Todd
Project Background
SAS CodeMicrosoft Graph® APIMicrosoft Sharepoint®Icons made by Freepik & Eucalypfromwww.flaticon.comRequestResponse(e.g. SAS Datasets)
PROC HTTP
PROC HTTP
PROC HTTP
PROC HTTP
Method Verb Examples:•PUT•POST•PATCH•CREATEprochttpurl="https://clinicaltrialsapi.cancer.gov/v1/terms?term=metastatic&term_type=official_title"method="GET"out=outfile;run;
PROC HTTP
prochttpurl="https://clinicaltrialsapi.cancer.gov/v1/terms?term=metastatic&term_type=official_title"method="GET"out=outfile;run;%* Set up libname for JSON file output *;libnamenciterms json fileref=outfile;
PROC HTTP
PROC HTTP
Utility Access Macros
•%get_token•Acquire access token•%refresh_token•Uses Refresh token to update access token in case of expiry•%process_token_file•Set token values to macro variablesAuthors: Joseph Henry and Chris Hemedinger from SAS
Locating and Importing a file
•ID values used to build full URL•Return all groups user has access to•'GET' methodhttps://graph.microsoft.com/v1.0/groupshttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid.
Locating and Importing a file
•ID values used to build full URL•Return all groups user has access to•'GET' methodhttps://graph.microsoft.com/v1.0/groupshttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid.
Locating and Importing a file
•ID values used to build full URL•Query strings -OData System Query Options •Prevent 'overfetching'https://graph.microsoft.com/v1.0/groups?$filter=displayname eq 'Example Project'&$select=DisplayName,IDhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid.
Locating and Importing a file
•ID values used to build full URL•'Content' action parameter•'GET' methodhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid.https://graph.microsoft.com/v1.0/groups/Ab321C789d/drive/items/M09s6sa5/content
File Import Application
•Validation Tracker -Titles and Footnotes•Automation of key locations:•SAS_EXECFILENAME•SAS_EXECFILEPATH•Instant update timing•Files not locked when open for manual edit
File Export Process
•'PUT' method•'Content' action parameter•Relative path URL ':' •SAS Datasets exported to work library as xlsx•Only works for files <4MB•'413 -Payload Too Large'•FSIZE functionhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/root:/example.xlsx:/content
File Export Process
•'PUT' method•'Content' action parameter•Relative path URL ':' •SAS Datasets exported to work library as xlsx•Only works for files <4MB•'413 -Payload Too Large'•FSIZE functionhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/root:/example.xlsx:/content
File Export Process
•'PUT' method•'Content' action parameter•Relative path URL ':' •SAS Datasets exported to work library as xlsx•Only works for files <4MB•'413 -Payload Too Large'•FSIZE functionhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/root:/example.xlsx:/content
File Export Application
•Raw data issue reports•Can be shared automatically with non-organisation team members •'Invite' action parameter•'POST' method •Read/Write access control•'423 -Locked'https://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./invite
File Export Application
•Raw data issue reports•Can be shared automatically with non-organisation team members •'Invite' action parameter •'POST' method•Read/Write access control•'423 -Locked'https://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./invite
Workbook manipulation
•Retrieve and edit specific cell content•Not restricted by sheets open for editing•'PersistChanges' header•'POST' method•'CreateSession' action parameter •Session ID key value for subsequent requests•'RefreshSession' action parameterhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./workbook/createSession
Workbook manipulation
•Retrieve and edit specific cell content•Not restricted by sheets open for editing•'PersistChanges' header•'POST' method•'CreateSession' action parameter •Session ID key value for subsequent requests•'RefreshSession' action parameterhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./workbook/createSession
Workbook manipulation
•Retrieve and edit specific cell content•Not restricted by sheets open for editing•'PersistChanges' header•'POST' method•'CreateSession' action parameter •Session ID key value for subsequent requests•'RefreshSession' action parameterhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./workbook/createSession
Workbook manipulation
•Sheet name or ID required for URL•'Range(address='A1:B2')' action parameter•'PATCH' method•Value for cell update as inputhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./workbook/worksheets/&sheetname./range(address='A1')
Workbook manipulation
•Sheet name or ID required for URL•'Range(address='A1:B2')' action parameter•'PATCH' method•Value for cell update as inputhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./workbook/worksheets/&sheetname./range(address='A1')
Workbook manipulation
•Sheet name or ID required for URL•'Range(address='A1:B2')' action parameter•'PATCH' method•Value for cell update as inputhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./workbook/worksheets/&sheetname./range(address='A1')
Workbook manipulation application
•Validation tracker can be updated automatically•Instant date updates•Log and compare summaries•No chance for human error•Determining correct row to edit
Workbook manipulation application
•Validation tracker can be updated automatically•Instant date updates•Log and compare summaries•No chance for human error•Determining correct row to edit:•Import and subset•Workbook: 'UsedRange'•Excel function: Match
Workbook manipulation application
•Validation tracker can be updated automatically•Instant date updates•Log and compare summaries•No chance for human error•Determining correct row to edit:•Import and subset•Workbook: 'UsedRange'•Excel function: Match
Workbook manipulation application
•Validation tracker can be updated automatically•Instant date updates•Log and compare summaries•No chance for human error•Determining correct row to edit:•Import and subset•Workbook: 'UsedRange'•Excel function: Matchhttps://graph.microsoft.com/v1.0/groups/&groupid./drive/items/&fileid./workbook/functions/match
Conclusion
•Minor manual setup•Huge potential for automation of processes•Access token security considerations•Alternative API and cloud storage providers
Questions
Simon ToddPhastarUnit 2, 2a Bollo LaneChiswick, London, W4 5LEEmail: simon.todd@phastar.comWeb: www.phastar.com
quotesdbs_dbs17.pdfusesText_23