Hello,
I am using PROC HTTP to extract the groups from Viya. This appears to work well however I cannot find any documentation to determine the correct content-type header information (I believe this may be undocumented). I have determined that the endpoint is '../identities/groups' and when I examine the text being returned I can see all the groups. What I cannot determine is the custom content-type being returned - this is an excerpt from the results -
Hi Richard,
We formulated a macro for this in the @sasjs/core library you can find the documentation here: https://core.sasjs.io/mv__getgroups_8sas.html
/Allan
Hi @RichardP,
Nice detective work. You are correct that the identities API is not documented publicly on developer.sas.com. That could change at some point, but not sure if/when.
You've also discovered that you can deconstruct certain CLI calls and work backwards to build API endpoints. This is not supported by SAS Tech Support, but since you've gotten this far, I've confirmed what you see in the XML response. Here is a little more detail on the endpoint:
groups | GET | Link to return a collection of groups. |
URI: /identities/groups | ||
Response type: application/vnd.sas.collection |
||
Response item type: application/vnd.sas.identity.group.summary |
||
Response item type: application/vnd.sas.identity.basic |
I hope this helps clear things up.
Join us for SAS Community Trivia
Hi Richard,
We formulated a macro for this in the @sasjs/core library you can find the documentation here: https://core.sasjs.io/mv__getgroups_8sas.html
/Allan
The answer in this case was to specify the correct header code -
headers "Accept"="application/json";
Thanks to the ever dependable gentlemen - @joeFurbee and @AllanBowe
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.