Member since
11-30-2020
1
Post
0
Kudos Received
0
Solutions
12-04-2020
07:46 AM
Policy type is missing. By default policyType is 0 which is Access type. Try with below API. curl -u admin -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST -d '
{"policyType":"2","name":"row_policy_1","isEnabled":true,"policyPriority":0,"policyLabels":[],"description":"","isAuditEnabled":true,"resources":{"database":{"values":["default"],"isRecursive":false,"isExcludes":false},"table":{"values":["test_table"],"isRecursive":false,"isExcludes":false}},"rowFilterPolicyItems":[{"users":["hr1"],"accesses":[{"type":"select","isAllowed":true}],"rowFilterInfo":{"filterExpr":"c1=true"}}],"service":"c116_hive"}' http://ranger-admin:6080/service/plugins/policies -v
... View more