<?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>question rest api to provide views in ambari in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/rest-api-to-provide-views-in-ambari/m-p/178068#M67794</link>
    <description>&lt;P&gt; I am executing this curl command ,When  I provide files view to a particular user, then in files views, only that user persisted and other users get deleted.&lt;/P&gt;&lt;P&gt;admin-&amp;gt; manage amabri -&amp;gt; views &amp;gt; files  : here I find only user whom i given access with this curl command but users those were earlier there got deleted &lt;/P&gt;&lt;P&gt;curl -i -u $Ambariadmin:$ambaripass -H "X-Requested-By: ambari" -X PUT  -d '[{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"'$username'","principal_type":"USER"}}]'  &lt;A href="http://localhost:8080/api/v1/views/$viewname/versions/$version/instances/$instance/privileges" target="_blank"&gt;http://localhost:8080/api/v1/views/$viewname/versions/$version/instances/$instance/privileges&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 12:12:59 GMT</pubDate>
    <dc:creator>amol_08</dc:creator>
    <dc:date>2022-09-16T12:12:59Z</dc:date>
    <item>
      <title>rest api to provide views in ambari</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/rest-api-to-provide-views-in-ambari/m-p/178068#M67794</link>
      <description>&lt;P&gt; I am executing this curl command ,When  I provide files view to a particular user, then in files views, only that user persisted and other users get deleted.&lt;/P&gt;&lt;P&gt;admin-&amp;gt; manage amabri -&amp;gt; views &amp;gt; files  : here I find only user whom i given access with this curl command but users those were earlier there got deleted &lt;/P&gt;&lt;P&gt;curl -i -u $Ambariadmin:$ambaripass -H "X-Requested-By: ambari" -X PUT  -d '[{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"'$username'","principal_type":"USER"}}]'  &lt;A href="http://localhost:8080/api/v1/views/$viewname/versions/$version/instances/$instance/privileges" target="_blank"&gt;http://localhost:8080/api/v1/views/$viewname/versions/$version/instances/$instance/privileges&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:12:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/rest-api-to-provide-views-in-ambari/m-p/178068#M67794</guid>
      <dc:creator>amol_08</dc:creator>
      <dc:date>2022-09-16T12:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: rest api to provide views in ambari</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/rest-api-to-provide-views-in-ambari/m-p/178069#M67795</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay SenSharma&lt;/A&gt; could you pls look into issue &lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 14:15:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/rest-api-to-provide-views-in-ambari/m-p/178069#M67795</guid>
      <dc:creator>amol_08</dc:creator>
      <dc:date>2017-09-08T14:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: rest api to provide views in ambari</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/rest-api-to-provide-views-in-ambari/m-p/178070#M67796</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/19322/mishraanurag643.html" nodeid="19322"&gt;@Anurag Mishra&lt;/A&gt;&lt;/P&gt;&lt;P&gt;- You will need to pass all the previous user privilege details as well along with the new user when you want to edit the list using API call:&lt;/P&gt;&lt;P&gt;Example if you already have users privilleges for "123jay", "jay". Now you want to add another user "jayyarn" in the privilleges list then you should PUT the whole list again.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -i -u $Ambariadmin:$ambaripass -H "X-Requested-By: ambari" -X PUT  -d '[{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"123jay","principal_type":"USER"}},{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"jay","principal_type":"USER"}},{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"jayyarn","principal_type":"USER"}},{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"CLUSTER.ADMINISTRATOR","principal_type":"ROLE"}},{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"CLUSTER.OPERATOR","principal_type":"ROLE"}},{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"SERVICE.OPERATOR","principal_type":"ROLE"}},{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"SERVICE.ADMINISTRATOR","principal_type":"ROLE"}},{"PrivilegeInfo":{"permission_name":"VIEW.USER","principal_name":"CLUSTER.USER","principal_type":"ROLE"}}]'   &lt;A href="http://localhost:8080/api/v1/views/$viewname/versions/$version/instances/$instance/privileges" target="_blank"&gt;http://localhost:8080/api/v1/views/$viewname/versions/$version/instances/$instance/privileges&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 14:38:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/rest-api-to-provide-views-in-ambari/m-p/178070#M67796</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-09-08T14:38:25Z</dc:date>
    </item>
  </channel>
</rss>

