On this page

    Get All Privileges

    Note:

    This functionality is for Dremio v16.0+ Enterprise Edition only.

    This API lists all permissions that may be assigned to a user/group for an object type, or grantType. No user or role information is provided in the API response.

    Endpoint Syntax

    GET /api/v3/catalog/privileges?type={grantType}
    

    Required Privileges

    No specific privileges or account type is required to execute this API. It is available to all users.

    Request Parameters

    The following objects must be used in place of grantType:

    • SPACE
    • SOURCE
    • FOLDER or SCHEMA
    • VDS or VIEW
    • PDS or TABLE

    Response Output

    {
     "availablePrivileges": [
       {
         "grantType": "SPACE",
         "privileges": [
           "ALTER",
           "ALTER_REFLECTIONS",
           "MANAGE_GRANTS",
           "MODIFY",
           "SELECT",
           "VIEW_REFLECTIONS"
         ]
       },
       {
         "grantType": "SOURCE",
         "privileges": [
           "ALTER",
           "ALTER_REFLECTIONS",
           "CREATE_TABLE",
           "MANAGE_GRANTS",
           "MODIFY",
           "SELECT",
           "VIEW_REFLECTIONS"
         ]
       },
       {
         "grantType": "FOLDER",
         "privileges": [
           "ALTER",
           "ALTER_REFLECTIONS",
           "CREATE_TABLE",
           "SELECT",
           "VIEW_REFLECTIONS"
         ]
       },
       {
         "grantType": "PDS",
         "privileges": [
           "ALTER",
           "SELECT"
         ]
       },
       {
         "grantType": "VDS",
         "privileges": [
           "ALTER",
           "SELECT"
         ]
       }
     ]
    }
    

    Example: grantType is Space

    The following example shows a response when the grantType is specified as SPACE.

    {
      "availablePrivileges": [
        {
          "grantType": "SPACE",
          "privileges": [
            "ALTER",
            "ALTER_REFLECTIONS",
            "MANAGE_GRANTS",
            "MODIFY",
            "SELECT",
            "VIEW_REFLECTIONS"
          ]
        }
      ]
    }
    

    Response Codes

    • 200 - Success.
    • 404 - An object with the entityId is not found.

    Example Requests

    Curl Request: Privileges for All Objects

    curl -X GET --location "http://localhost:9047/api/v3/grant?grantType=PROJECT" \
        -H "Authorization: _dremiohrr395nv31g8k610616tucp91g" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"
    

    Curl Request: Privileges for the Space Object

    curl -X GET --location "http://localhost:9047/api/v3/grant?grantType=PROJECT" \
        -H "Authorization: _dremiohrr395nv31g8k610616tucp91g" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"