.._get-folder-policy:

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-admin or system-user 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 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://gcp.qubole.com/api/v1.2/folders/policy"

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://gcp.qubole.com/api/v1.2/folders/policy"

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

curl -i -X PUT -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://gcp.qubole.com/api/v1.2/folders/policy