APIs provide access to capabilities not standard in the user interface, not available to the admin through Manage Environment or through the Command Line Interface (CLI). A comprehensive list of documented APIs on https://developer.sas.com/ is available. You can find many Categories like Auto Machine Learning, CAS, Compute and Jobs, Data Management, Fraud and Compliance, Health and Life Sciences, Models and Decisions, Platform Administration, Visual Investigator, Visualization and Reports and more.
I solved the following use case with an API. "Customize the personal user setting for region and language."
This can be very useful if you want to unburden the users by doing this with a piece of code. "
Visual Analytics looks at the web browser the user is using for the language setting. The user has the option to override it with his personal settings. These settings affect, for example, the notation of thousands
The notation of thousands may vary from country to country. In the Netherlands, for example, a period is used instead of a comma.
The setting for Region and Language can be adjusted by going to the user icon, top right and choosing settings. then click on the option 'Region and Language' and on the right you can change the 'Browser locale' to the desired language.
The following code allows you to see a user's current preferences.
------------------------------------------------------------
* Get the Viya Host URL;
%let viyaHost=%sysfunc(getoption(SERVICESBASEURL));
%let user = <user-id> ;
filename rprtOut temp ;
proc http
method='Get'
url="&viyaHost./preferences/preferences/&user.?start=0&limit=20"
oauth_bearer = sas_services
out=rprtOut;
headers 'Accept' = 'application/json';
headers 'Content-Type' = 'application/json';
run;
libname rprtOut json;
------------------------------------------------------------
If you navigate to the library rprtOut you can see the tables that have been created. The table 'Items' shows the current preferences of the user. With the limit statement you can see 20 lines at a time. By adjusting the starting value of 0 you can also see the other settings.
The id to override the browser locale is 'FormatLocale.DefaultLocale'. You can use the following code for that.
------------------------------------------------------------
------------------------------------------------------------
This change is effective as soon as the user logs back into the environment.
Enjoy!
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.