Page tree
Skip to end of metadata
Go to start of metadata

 Apache Ranger PUBLIC REST APIs


Repository APIs

Get Repository:

API NameGet Repository
Request TypeGET
Request URLservice/public/api/repository/{id}
Request Params 
Response

•Example Response:

Example Response  Expand source

Create repository:

API NameCreate Repository
Request TypePost
Request URLservice/public/api/repository
Request Params

application/json

•HDFS Example:

HDFS Example  Expand source

•HIVE Example:

HIVE Example  Expand source

• HBASE Example:

 

HBASE Example  Expand source

• KNOX Example:

KNOX Exaple  Expand source

 • STORM Example:

STORM Example  Expand source
Response200-Application/Json

 

Update Repository:

API NameUpdate Repository
Request TypePUT
Request URLservice/public/api/repository/{id}
Request Params

Application/json

• HDFS Example:

HDFS Example  Expand source

 • HIVE Example:

HIVE Example  Expand source

• HBASE Example:

HBASE Exapmple  Expand source

• KNOX Example:

KNOX Example  Expand source

• STORM Example:

STORM Example  Expand source
Response200-Application/json

Delete Repository:

API NameDelete Repository
Request TypeDelete
Request URLservice/public/api/repository/{id}
Request Param 
Response204-No Content

 

Search Repository:

API NameSearch Repositories
Request TypeGET
Request URLservice/public/api/repository
Request Params

Query Params

pageSize int The page size required

startIndex int The start record index

name string The repository name

type string The repository types("hdfs","hive","hbase","knox","storm")

status boolean The status Enable,disable (status= true/false)

Example :

  Pagesize=25&startindex=0

Response

200-Application/json

•Example:

Example  Expand source

 Policy API's 

 

Get Policy:

API NameGet Policy
Request TypeGet
Request URLservice/public/api/policy/{id}
Request Params 
Response

200 - Application/json


HDFS Example:

HDFS Example  Expand source

 

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 nameCreate Policy
Request TypePOST
Request URLservice/public/api/policy
 

Application/json

•HDFS Example:

HDFS Example  Expand source

•HBASE Example:

HBASE Example  Expand source

•HIVE Example:

HIVE Example  Expand source

 •KNOX Example:

KNOX Example  Expand source

•STORM Example:

STORM Example  Expand source
 Response 200 - Application/json


Update Policy:

API Nameupdate policy
Request TypePUT
Request URLservice/public/api/policy/{id}
Request Params

Application /json

KNOX Example  Expand source

•HDFS Example: 

HDFS Example  Expand source

•HBASE Example:

HBASE Example  Expand source

•HIVE Example:

HIVE Example  Expand source

•KNOX Example:

•STORM Example:

STORM Example  Expand source
 Response 200 - Application/json

 

Delete policy:

API NameDelete Policy
Request TypeDELETE
Request URLservice/public/api/policy/{id}
Request Params 
Response204 - No Content


Search Policy:

API NameSearch Policy
Request TypeGET
Request URLservice/public/api/policy
Request Params

Querry Params:

pageSize int The page size required

startIndex int The start record index

 policyName string The Name of the policy

 columns strings The columns

 columnFamilies string The column Families

tables string The tables

udfs string The udfs

databases string The databases

groupName string The group

repositoryType string The repository type ("hbase","hdfs" etc)

isRecursive boolean The isRecursives property ("true" or "false")

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:

Example  Expand source


 

 

 

 

 

 

 

 

 

 

  • No labels

2 Comments

  1. What's the port of the API?  the same of the Ranger web?

    1. Yes, it is the same. Also, in the future, please send your queries to user@ranger.incubator.apache.org. There are more people who are monitoring and can help you.