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

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 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/user1@qubole.com/Spark1", "location":"Users/user2@qubole.com/Spark1", "type":"notes"}' \
"https://api.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-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 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://api.qubole.com/api/v1.2/folders/delete"

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 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/user1@qubole.com/Spark1","type":"notes"}' \
"https://api.qubole.com/api/v1.2/folders/delete"