Move and Delete a Folder

You can move and delete a Notebook/Dashboard folder.

Move a Folder

POST /api/v1.2/folders/move

Use this API to move the folder to a different location.

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 below are mandatory. Others are optional and have default values.

Parameter Description
destination_location It is the folder location to which you want to move this folder to which write/manage permission is granted.
location It is the current location of the 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 -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"destination_location":"<Destined Folder>", "location":"<Current Folder Location>", "type":"<notes/notebook_dashboards>"}' \
"https://gcp.qubole.com/api/v1.2/folders/move"

Sample API Request

Here is a sample API call to move the Notebook folder to a new destination.

curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"destination_location":"Users/[email protected]/Spark1", "location":"Users/[email protected]/Spark1", "type":"notes"}' \
"https://gcp.qubole.com/api/v1.2/folders/move"

Delete a Folder

POST api/api/v1.2/folders/delete

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 below are mandatory. Others are optional and have default values.

Parameter Description
folder_id It is the ID of the folder that you want to delete.
location It is the current location of the 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 -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"folder_id":"<folder_id>","location":"<Folder Location>","type":"<notes/notebook_dashboards>"}' \
"https://gcp.qubole.com/api/v1.2/folders/delete"

Sample API Request

Here is a sample API call to delete the Notebook folder that has 12 as its ID.

curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"folder_id":"12","location":"Users/[email protected]/Spark1","type":"notes"}' \
"https://gcp.qubole.com/api/v1.2/folders/delete"