<?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 Re: Use API to retrieve list of all reports a given user is authorized to view in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/706616#M1055</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/360975"&gt;@zmetz&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A colleague of mine mentioned the following:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If one has a list of all the reports, then one can use &lt;/SPAN&gt;&lt;A title="https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision" href="https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision&lt;/A&gt;&lt;SPAN&gt; to get the decision on whether a user can read a report.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We should be able to use this API to get a list of reports:&amp;nbsp;&lt;A href="https://developer.sas.com/apis/rest/Visualization/#get-a-collection-of-reports" target="_blank"&gt;https://developer.sas.com/apis/rest/Visualization/#get-a-collection-of-reports&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've not used auth decision API previously and I don't see a set of examples. Let's explore together if we can make calls to get the info you need. I'll also check with development to get more details on the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;</description>
    <pubDate>Thu, 17 Dec 2020 12:50:19 GMT</pubDate>
    <dc:creator>joeFurbee</dc:creator>
    <dc:date>2020-12-17T12:50:19Z</dc:date>
    <item>
      <title>Use API to retrieve list of all reports a given user is authorized to view</title>
      <link>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/706108#M1053</link>
      <description>&lt;P&gt;I'm developing a front-end to a client's SAS install along with some other services. I've been successful using the Viya 3.5 APIs to retrieve collections of reports, thumbnails, etc. using an admin account token. My main task, though, is to get a list of all reports that a given user is authorized to view. Any suggestions on how I would go about that? Ideally it would all be done with the REST APIs.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 20:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/706108#M1053</guid>
      <dc:creator>zmetz</dc:creator>
      <dc:date>2020-12-15T20:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use API to retrieve list of all reports a given user is authorized to view</title>
      <link>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/706310#M1054</link>
      <description>&lt;P&gt;Edit to add: I'm not so much looking for a code example as an approach to how I would collect this and match it up. I'm a little confused by the SAS terminology (principles, memberships) as I've just shifted from doing this same thing for Tableau. Again I'm running the API as an admin user. I'm collecting this information ahead of time into my applications DB, so I will have a table of users, table of reports, and a linking table, and that will all be updated periodically. Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 14:34:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/706310#M1054</guid>
      <dc:creator>zmetz</dc:creator>
      <dc:date>2020-12-16T14:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use API to retrieve list of all reports a given user is authorized to view</title>
      <link>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/706616#M1055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/360975"&gt;@zmetz&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A colleague of mine mentioned the following:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If one has a list of all the reports, then one can use &lt;/SPAN&gt;&lt;A title="https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision" href="https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision&lt;/A&gt;&lt;SPAN&gt; to get the decision on whether a user can read a report.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We should be able to use this API to get a list of reports:&amp;nbsp;&lt;A href="https://developer.sas.com/apis/rest/Visualization/#get-a-collection-of-reports" target="_blank"&gt;https://developer.sas.com/apis/rest/Visualization/#get-a-collection-of-reports&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've not used auth decision API previously and I don't see a set of examples. Let's explore together if we can make calls to get the info you need. I'll also check with development to get more details on the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 12:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/706616#M1055</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2020-12-17T12:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Use API to retrieve list of all reports a given user is authorized to view</title>
      <link>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/711730#M1082</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214450"&gt;@joeFurbee&lt;/a&gt;&amp;nbsp;for your direction. I was able to accomplish this with an admin token and a combination of:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;API "folders/rootFolders" and a function that recurses through folders, collecting reports&lt;/LI&gt;&lt;LI&gt;API "annotations/annotations?id=" for tags&lt;/LI&gt;&lt;LI&gt;API "reportImages/jobs" for thumbnails (excellent documentation here:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sgf/2018/10/31/sas-viya-rest-apis-to-access-images-from-sas-visual-analytics/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2018/10/31/sas-viya-rest-apis-to-access-images-from-sas-visual-analytics/&lt;/A&gt;)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Then to determine what the user has read access to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;API "authorization/decisions" passing: { "request": { "uri": "[uri]", "method": "GET" }, "principals": [ { "name": "[name]", "type": "user" } ], "permission": "read" }&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 15 Jan 2021 18:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Use-API-to-retrieve-list-of-all-reports-a-given-user-is/m-p/711730#M1082</guid>
      <dc:creator>zmetz</dc:creator>
      <dc:date>2021-01-15T18:07:32Z</dc:date>
    </item>
  </channel>
</rss>

