*Hi Hanish,    The public API*s* ( starting with /service/public/* ) is the
ideal way to communicate with Ranger from outside world. Please use *those*
API. I have documented the parameters for creating a policy and given an
example of HD*FS

*also. I will work on* other API documentation and will make it available
on Ranger wiki soon.

















*Create PolicyAPI NameCreate PolicyRequest TypePOSTRequest
URLservice/public/api/policyRequest Paramsapplication/jsonHDFS Example{ -
"policyName":"HomePolicy", - "resourceName":"/home,/apps",-
"description":"Home",- "repositoryName":"hadoopdev",-
"repositoryType":"hdfs"- "isEnabled":true,- "isRecursive":false,-
"isAuditEnabled":true,     "permMapList": [         {           "userList":
[             "john",             "andrew"           ],
          "permList": [             "SELECT",             "UPDATE"
          ]         },         {           "userList": [             "hr"
          ],           "groupList": [             "admin"           ],
          "permList": [             "DROP",             "ALTER",
            "ADMIN"           ]         }       ],}Response200 -
application/json*

On Wed, Dec 31, 2014 at 3:52 PM, Hanish Bansal <
[email protected]> wrote:

> Hi All,
>
> There are two different rest apis to perform operation for policies.
>
> For example:
>
> To create a policy:
> POST http://192.168.145.54:6080/service/assets/resources
> POST http://192.168.145.54:6080/service/public/api/policy
>
>
> I would like to know if someone want to create policy using rest apis then
> which one is recommended to use and why ?
>
> --
> *Thanks & Regards*
> *Hanish Bansal*
>



-- 
Regards,
Gautam.

Reply via email to