View a Folder Policy

GET /api/v1.2/folders/policy

Use this API to see the permissions of a Notebook/Dashboard folder.

Required Role

The following users can make this API call:

  • Users who belong to the system-user or system-admin group.
  • Users who belong to a group associated with a role that allows submitting a command. See Managing Groups and Managing Roles for more information.

Parameters

Note

Parameters marked in bold are mandatory. Others are optional and have default values.

Parameter Description
location It is the current location of the folder.
source_type For a folder, the source type is Folder.
type It denotes if the type is Notebooks or Dashboards. Its value must be notes for a Notebook folder, jupyter_notebooks for a Jupyter notebook folder, and notebook_dashboards for a Dashboard folder.

Request API Syntax

curl -X GET -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"location":"<FolderLocation>", "type": "<notes/notebook_dashboards>", "source_type":"Folder"}' \
"https://api.qubole.com/api/v1.2/folders/policy"

Note

The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.

Sample API Requests

Here is a sample API call to view permissions of the SparkNotes Notebook folder.

curl -i -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"name":"SparkNotes", "type":"notes", "location":"Users/[email protected]/SparkNotes", "source_type":"Folder"}' \
"https://api.qubole.com/api/v1.2/folders/policy"

Here is a sample API call to view permissions of the SparkStatus Dashboard folder.

curl -i -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"name":"SparkStatus", "type":"notebook_dashboards", "location":"Users/[email protected]/SparkStatus",
     "source_type":"Folder"}' \
"https://api.qubole.com/api/v1.2/folders/policy

Here is a sample API call to view permissions of the Jupyternotebook1 folder.

curl -i -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"name":"Jupyternotebook1", "type":"jupyter_notebooks", "location":"Users/[email protected]/Jupyternotebook1", "source_type":"Folder"}' \
"https://api.qubole.com/api/v1.2/folders/policy