Skip to main content

Privileges

Use the Catalog API to retrieve information about available privileges on the different types of catalog objects.

note

Dremio does not support retrieving privilege information for Arctic catalogs and sources.

Privileges Object
{
"availablePrivileges": [
{
"grantType": "SPACE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "MUTABLE_SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"CREATE_TABLE",
"DELETE",
"DROP",
"INSERT",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"TRUNCATE",
"UPDATE",
"VIEW_REFLECTION"
]
},
{
"grantType": "ARP_SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"EXTERNAL_QUERY",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "FOLDER_IN_MUTABLE_SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"CREATE_TABLE",
"DELETE",
"DROP",
"INSERT",
"MANAGE_GRANTS",
"SELECT",
"TRUNCATE",
"UPDATE",
"VIEW_REFLECTION"
]
},
{
"grantType": "FOLDER",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"MANAGE_GRANTS",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "PDS",
"privileges": [
"ALTER",
"DELETE",
"INSERT",
"MANAGE_GRANTS",
"SELECT",
"TRUNCATE",
"UPDATE"
]
},
{
"grantType": "VDS",
"privileges": [
"ALTER",
"MANAGE_GRANTS",
"SELECT"
]
},
{
"grantType": "FUNCTION",
"privileges": [
"ALTER",
"EXECUTE",
"MANAGE_GRANTS",
"MODIFY"
]
}
]
}

Privileges Attributes

availablePrivileges Array of Object

Information about the privileges that are available to assign to users and roles for each type of object in the catalog. Each availablePrivileges object contains two attributes: grantType and privileges.

Example: [{"grantType": "SPACE","privileges": ["ALTER","ALTER_REFLECTION","MANAGE_GRANTS","MODIFY","SELECT","VIEW_REFLECTION"]},{"grantType": "SOURCE","privileges": ["ALTER","ALTER_REFLECTION","MANAGE_GRANTS","MODIFY","SELECT","VIEW_REFLECTION"]},{"grantType": "MUTABLE_SOURCE","privileges": ["ALTER","ALTER_REFLECTION","CREATE_TABLE","DELETE","DROP","INSERT","MANAGE_GRANTS","MODIFY","SELECT","TRUNCATE","UPDATE","VIEW_REFLECTION"]},{"grantType": "ARP_SOURCE","privileges": ["ALTER","ALTER_REFLECTION","EXTERNAL_QUERY","MANAGE_GRANTS","MODIFY","SELECT","VIEW_REFLECTION"]},{"grantType": "FOLDER_IN_MUTABLE_SOURCE","privileges": ["ALTER","ALTER_REFLECTION","CREATE_TABLE","DELETE","DROP","INSERT","MANAGE_GRANTS","SELECT","TRUNCATE","UPDATE","VIEW_REFLECTION"]},{"grantType": "FOLDER","privileges": ["ALTER","ALTER_REFLECTION","MANAGE_GRANTS","SELECT","VIEW_REFLECTION"]},{"grantType": "PDS","privileges": ["ALTER","DELETE","INSERT","MANAGE_GRANTS","SELECT","TRUNCATE","UPDATE"]},{"grantType": "VDS","privileges": ["ALTER","MANAGE_GRANTS","SELECT"]},{"grantType": "FUNCTION","privileges": ["ALTER","EXECUTE","MANAGE_GRANTS","MODIFY"]}]

Attributes of the availablePrivileges Object

grantType String

Type of the catalog object on which the listed privileges are available. The SOURCE type does not include Arctic catalog sources. ARP_SOURCE refers to relational-database sources.

Enum: SPACE, SOURCE, MUTABLE_SOURCE, ARP_SOURCE, FOLDER_IN_MUTABLE_SOURCE, FOLDER, PDS, VDS, FUNCTION

Example: SOURCE


privileges Array of String

List of available privileges on the type of the catalog object specified in grantType. Read Privileges for more information.

Example: ["ALTER","ALTER_REFLECTION","MANAGE_GRANTS","MODIFY","SELECT","VIEW_REFLECTION"]

Retrieving All Catalog Privileges

Retrieve information about the available privileges on each type of object in the catalog.

note

Dremio does not support retrieving privilege information for Arctic catalogs and sources.

Method and URL
GET /v0/projects/{project-id}/catalog/privileges

Parameters

project-id Path   String (UUID)

Unique identifier of the project that contains the catalog object whose privileges you want to retrieve.


type Query   String   Optional

Type of the catalog object whose available privileges you want to retrieve. Read type Query Parameter for more information. The SOURCE type does not include Arctic catalog sources.

Enum: SPACE, SOURCE, MUTABLE_SOURCE, ARP_SOURCE, FOLDER_IN_MUTABLE_SOURCE, FOLDER, PDS, VDS, FUNCTION

Example Request
curl -X GET 'https://api.dremio.cloud/v0/projects/{project-id}/catalog/privileges' \
--header 'Authorization: Bearer <PersonalAccessToken>' \
--header 'Content-Type: application/json'
Example Response
{
"availablePrivileges": [
{
"grantType": "SPACE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "MUTABLE_SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"CREATE_TABLE",
"DELETE",
"DROP",
"INSERT",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"TRUNCATE",
"UPDATE",
"VIEW_REFLECTION"
]
},
{
"grantType": "ARP_SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"EXTERNAL_QUERY",
"MANAGE_GRANTS",
"MODIFY",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "FOLDER_IN_MUTABLE_SOURCE",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"CREATE_TABLE",
"DELETE",
"DROP",
"INSERT",
"MANAGE_GRANTS",
"SELECT",
"TRUNCATE",
"UPDATE",
"VIEW_REFLECTION"
]
},
{
"grantType": "FOLDER",
"privileges": [
"ALTER",
"ALTER_REFLECTION",
"MANAGE_GRANTS",
"SELECT",
"VIEW_REFLECTION"
]
},
{
"grantType": "PDS",
"privileges": [
"ALTER",
"DELETE",
"INSERT",
"MANAGE_GRANTS",
"SELECT",
"TRUNCATE",
"UPDATE"
]
},
{
"grantType": "VDS",
"privileges": [
"ALTER",
"MANAGE_GRANTS",
"SELECT"
]
},
{
"grantType": "FUNCTION",
"privileges": [
"ALTER",
"EXECUTE",
"MANAGE_GRANTS",
"MODIFY"
]
}
]
}

Response Status Codes

200   OK

401   Unauthorized

404   Not Found