Apache Ranger PUBLIC REST APIs
Table of Contents
Repository APIs
Get Repository:
API Name | Get Repository | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | GET | ||||||||||||||
Request URL | service/public/api/repository/{id} | ||||||||||||||
Request Params | |||||||||||||||
Response | •Example Response:
| ||||||||||||||
Create repository:
API Name | Create Repository | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | Post | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request URL | service/public/api/repository | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request Params | application/json •HDFS Example:
•HIVE Example:
• HBASE Example:
• KNOX Example:
• STORM Example:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response | 200-Application/Json |
Update Repository:
API Name | Update Repository | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | PUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request URL | service/public/api/repository/{id} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request Params | Application/json • HDFS Example:
• HIVE Example:
• HBASE Example:
• KNOX Example:
• STORM Example:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response | 200-Application/json |
Delete Repository:
API Name | Delete Repository |
---|---|
Request Type | Delete |
Request URL | service/public/api/repository/{id} |
Request Param | |
Response | 204-No Content |
Search Repository:
API Name | Search Repositories | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | GET | |||||||||||||
Request URL | service/public/api/repository | |||||||||||||
Request Params | Query Params | pagesize pageSize int The page size required startindex startIndex int The start record index Name name string The repository name Type type string The repository types("hdfs","hive","hbase","knox","storm") Status status boolean The status Enable,disable (status= true/false) Example : Pagesize=25&startindex=0 | ||||||||||||
Response | 200-Application/json •Example:
|
Policy Policy API's
Get Policy:
API Name | Get Policy | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | Get | |||||||||||||
Request URL | service/public/api/policy/{id} | |||||||||||||
Request Params | ||||||||||||||
Response | 200 - Application/json
Possible perm list Types :- For HDFS :- READ,WRITE,EXECUTE,ADMIN For HIVE :- SELECT,UPDATE,CREATE,DROP,ALTER,INDEX,LOCK,ALL,ADMIN For HBASE :- READ,WRITE CREAT ADMIN |
...
Create Policy:
API name | Create Policy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | POST | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request URL | service/public/api/public/policy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Application/json •HDFS Example:
•HBASE Example:
•HIVE Example:
•KNOX Example:
•STORM Example:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response | 200 - Application/json |
Update Policy:
API Name | update policy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | PUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request URL | service/public/api/policy/{id} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request Params | Application /json•HDFS Example:
•HBASE •HDFS Example:
•HIVE •HBASE Example:
•HIVE •KNOX Example:
•KNOX Example: •STORM Example:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response | 200 - Application/json |
Delete policy:
API Name | Delete Policy |
---|---|
Request Type | DELETE |
Request URL | service/public/api/policy/{id} |
Request Params | |
Response | 204 - No Content |
Search Policy:
API Name | Search Policy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request Type | GET | ||||||||||||||
Request URL | service/public/api/policy | ||||||||||||||
Request Params | Querry Params: PageSize pageSize int The page size required startindex startIndex int The start record index policyname policyName string The Name of the policy columns strings The columns columnsFamilies columnFamilies string The column Families tables string The tables udfs string The udfs databases string The databases group name groupName string The group repository type repositoryType string The repository type ("hbase","hdfs" etc) isRecursive boolean TheisRecursives property ("true" or "false") repository name repositoryName string The repository name userName string The user name isEnabled boolean The enable/disabled property ("true" or "false") Example = pagesize25=25&startIndex=0
| ||||||||||||||
Response | 200 - Application/jason Example:
|