I have seen screenshots of details showing a CAS table URI, but I can't find out where in VIYA I can find those details. Have also tried getting the URI thourgh code, which works for tables on our 9.4 environment, but not on the CAS libs.
Need the URI for testing out the API functions
Hi @Ullsokk,
I'll provide some general information about table APIs, but the more information you can provide on your task/use case, the more details I can provide.
First there is the Data Tables API as defined on developer.sas.com. Using curl, the most basic GET endpoint for this API takes the form:
curl -X GET https://www.example.com/dataTables/dataSources/{dataSourceId}/tables/{tableId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.data.table+json'
Here is an example url:
https://mysasserver.sas.com/dataTables/dataSources/cas~fs~cas-shared-default~fs~public/tables/CAMPAIGN_POST_TEST
There are many other endpoints within this API for tables. Additional examples are on GitHub.
You also may consider the tables CAS action set. This API provides a host of other table endpoints.
An example of loading a table to memory API call is:
https://mysasserver.sas.com/cas-shared-default-http/cas/sessions/{{sessionid}}/actions/table.loadTable
with body contents:
Join us for SAS Community Trivia
SAS Bowl XLVI, Causal Analysis
Wednesday, December 18, 2024, at 10 a.m. ET | #SASBowl
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.