<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to extract all groups using the Viya REST API? in Developers</title>
    <link>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722579#M1137</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;'../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 -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="sasSource"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;&amp;lt;collection accept="application/vnd.sas.identity.group.summary" count="574" l&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;imit="50" name="groups" start="0" version="2"&amp;gt;&amp;lt;items&amp;gt;&amp;lt;groupSummary version="1"&amp;gt;&amp;lt;links&amp;gt;&amp;lt;link href="/identities/groups/SASAdministrato&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;rs" method="GET" rel="self" type="application/vnd.sas.identity.group" uri="/identities/groups/SASAdministrators"/&amp;gt;&amp;lt;link href="/ident&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;ities/groups/SASAdministrators" method="GET" rel="alternate" type="application/vnd.sas.identity.group.summary" uri="/identities/grou&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;ps/SASAdministrators"/&amp;gt;&amp;lt;link href="/identities/groups/SASAdministrators" method="DELETE" rel="delete" uri="/identities/groups/SASAdm&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;inistrators"/&amp;gt;&amp;lt;link href="/identities/groups/SASAdministrators" method="PUT" rel="update" type="application/vnd.sas.identity.group"&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;uri="/identities/groups/SASAdministrators"/&amp;gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;Can anyone help me specify the correct content type (e.g.&amp;nbsp;Accept:"="application/vnd.sas.identity.group")?&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;I realize that there are CLI commands for this, I may resort to using those, however this is puzzling me. Any help appreciated!&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;regards,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;Richard&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 13:48:49 GMT</pubDate>
    <dc:creator>RichardP</dc:creator>
    <dc:date>2021-03-01T13:48:49Z</dc:date>
    <item>
      <title>How to extract all groups using the Viya REST API?</title>
      <link>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722579#M1137</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;'../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 -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="sasSource"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;&amp;lt;collection accept="application/vnd.sas.identity.group.summary" count="574" l&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;imit="50" name="groups" start="0" version="2"&amp;gt;&amp;lt;items&amp;gt;&amp;lt;groupSummary version="1"&amp;gt;&amp;lt;links&amp;gt;&amp;lt;link href="/identities/groups/SASAdministrato&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;rs" method="GET" rel="self" type="application/vnd.sas.identity.group" uri="/identities/groups/SASAdministrators"/&amp;gt;&amp;lt;link href="/ident&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;ities/groups/SASAdministrators" method="GET" rel="alternate" type="application/vnd.sas.identity.group.summary" uri="/identities/grou&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;ps/SASAdministrators"/&amp;gt;&amp;lt;link href="/identities/groups/SASAdministrators" method="DELETE" rel="delete" uri="/identities/groups/SASAdm&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;inistrators"/&amp;gt;&amp;lt;link href="/identities/groups/SASAdministrators" method="PUT" rel="update" type="application/vnd.sas.identity.group"&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;uri="/identities/groups/SASAdministrators"/&amp;gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;Can anyone help me specify the correct content type (e.g.&amp;nbsp;Accept:"="application/vnd.sas.identity.group")?&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;I realize that there are CLI commands for this, I may resort to using those, however this is puzzling me. Any help appreciated!&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;regards,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;Richard&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 13:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722579#M1137</guid>
      <dc:creator>RichardP</dc:creator>
      <dc:date>2021-03-01T13:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract all groups using the Viya REST API?</title>
      <link>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722585#M1138</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274763"&gt;@RichardP&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Nice detective work. You are correct that the identities API is not documented publicly on &lt;A href="https://developer.sas.com/apis/rest/" target="_self"&gt;developer.sas.com&lt;/A&gt;. That could change at some point, but not sure if/when.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;groups&lt;/TD&gt;
&lt;TD&gt;GET&lt;/TD&gt;
&lt;TD&gt;Link to return a collection of groups.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;URI: /identities/groups&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;Response type:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://swagger.na.sas.com/swagger-ui/?url=/apis/identities/v6/openapi-all.json#application/vnd.sas.collection" target="_blank" rel="noopener noreferrer"&gt;&lt;CODE&gt;application/vnd.sas.collection&lt;/CODE&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;Response item type:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://swagger.na.sas.com/swagger-ui/?url=/apis/identities/v6/openapi-all.json#application-vnd.sas.identity.group.summary" target="_blank" rel="noopener noreferrer"&gt;&lt;CODE&gt;application/vnd.sas.identity.group.summary&lt;/CODE&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;Response item type:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://swagger.na.sas.com/swagger-ui/?url=/apis/identities/v6/openapi-all.json#application-vnd.sas.identity.basic" target="_blank" rel="noopener noreferrer"&gt;&lt;CODE&gt;application/vnd.sas.identity.basic&lt;/CODE&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps clear things up.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 14:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722585#M1138</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2021-03-01T14:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract all groups using the Viya REST API?</title>
      <link>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722587#M1139</link>
      <description>&lt;P&gt;Hi Richard,&lt;BR /&gt;&lt;BR /&gt;We formulated a macro for this in the&amp;nbsp;@sasjs/core library you can find the documentation here:&amp;nbsp;&amp;nbsp;&lt;A href="https://core.sasjs.io/mv__getgroups_8sas.html" target="_blank"&gt;https://core.sasjs.io/mv__getgroups_8sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Allan&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 14:23:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722587#M1139</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-03-01T14:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract all groups using the Viya REST API?</title>
      <link>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722601#M1141</link>
      <description>&lt;P&gt;The answer in this case was to specify the correct header code - &lt;BR /&gt;&lt;BR /&gt;headers "Accept"="application/json";&lt;BR /&gt;&lt;BR /&gt;Thanks to the ever dependable gentlemen - &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214450"&gt;@joeFurbee&lt;/a&gt; and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/28909"&gt;@AllanBowe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 15:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-extract-all-groups-using-the-Viya-REST-API/m-p/722601#M1141</guid>
      <dc:creator>RichardP</dc:creator>
      <dc:date>2021-03-01T15:50:06Z</dc:date>
    </item>
  </channel>
</rss>

