<?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 Re: Create Ranger hive policy through REST API in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Create-Ranger-hive-policy-through-REST-API/m-p/319903#M228025</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;It worked ,i did mistake .i forgot to add "access" before second group permission.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 05:06:56 GMT</pubDate>
    <dc:creator>srinivasp</dc:creator>
    <dc:date>2021-07-06T05:06:56Z</dc:date>
    <item>
      <title>Create Ranger hive policy through REST API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Create-Ranger-hive-policy-through-REST-API/m-p/319901#M228023</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement like, I need to create hive policy through REST API in CDP Env with two groups .Here , we are giving permission at group level not at user level.&lt;/P&gt;&lt;P&gt;one group with "ALL" permissions&amp;nbsp; and 2nd group with "select" permission.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created policy through REST API with one group with "all" permissions but how to mention 2nd group with "select" permission in same create policy command.&lt;/P&gt;&lt;P&gt;I have tried the below method but did not worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CURLURL="https://host:6182/service/public/v2/api/policy/"
CURLDATA='{   "isEnabled":true,"service":"cm_hive","name":"policy_test1","description":"Policy for employees database access","isAuditEnabled":true,"resources":{"database":{"values":["DBNAME"],"isExcludes":false,"isRecursive":false},"table":{"values":["*"],"isExcludes":false,"isRecursive":false}},"policyItems":[{"accesses":[{"type":"ALL","isAllowed":true}],"users":[""],"groups":["GROUP1"],[{"type":"SELECT","isAllowed":true}],"users":[""],"groups":["GROUP2"]"conditions":[],"delegateAdmin":false}],"denyPolicyItems":[],"allowExceptions":[],"denyExceptions":[],"dataMaskPolicyItems":[],"rowFilterPolicyItems":[]}'
RESPONSE=`curl -k -iv -u username:password -H "Content-Type: application/json" -X POST "$CURLURL"  -d "$CURLDATA"`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Srini Podili&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 09:01:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Create-Ranger-hive-policy-through-REST-API/m-p/319901#M228023</guid>
      <dc:creator>srinivasp</dc:creator>
      <dc:date>2026-04-21T09:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create Ranger hive policy through REST API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Create-Ranger-hive-policy-through-REST-API/m-p/319903#M228025</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;It worked ,i did mistake .i forgot to add "access" before second group permission.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 05:06:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Create-Ranger-hive-policy-through-REST-API/m-p/319903#M228025</guid>
      <dc:creator>srinivasp</dc:creator>
      <dc:date>2021-07-06T05:06:56Z</dc:date>
    </item>
  </channel>
</rss>

