Bind a Notebook to a Cluster

PUT /api/v1.2/notebooks/<notebook ID>

Use this API to assign a cluster to a notebook. To know how to bind a notebook using the Notebooks UI, see Viewing a Notebook Information or Configuring a Notebook.

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
cluster_id The cluster ID of the cluster that you want to get it assigned to a specific notebook.

Request API Syntax

curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"cluster_id":"<Cluster ID"}' \
 "https://gcp.qubole.com/api/v1.2/notebooks/<notebook ID>"

Sample API Request

Here is a sample request to assign a notebook with its ID as 2002 to a cluster with its ID as 4002

curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"cluster_id":"4002"}' \
 "https://gcp.qubole.com/api/v1.2/notebooks/2002"