curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/mounted-datasets/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "dataset_id_dict": { "dataset_ids_to_mount": [ 301 ], "dataset_ids_to_unmount": [] }}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/mounted-datasets/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "dataset_id_dict": { "dataset_ids_to_mount": [ 301, ], "dataset_ids_to_unmount": [], }, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/mounted-datasets/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "dataset_id_dict": { "dataset_ids_to_mount": [ 301 ], "dataset_ids_to_unmount": [] } }),});console.log(await response.json());Mounts datasets on the Virtual Machine, unmounts them, or both. A dataset mounts under /datasets/<name> in the VM. Send at least one ID in either list. A disk dataset that is already mounted on any VM is refused; an object-storage dataset already mounted here is skipped.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Instance ID
Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
IDs of datasets to mount.
Example
[ 301]IDs of datasets to unmount.
Example
[]Responses
Section titled “Responses”The datasets mounted and unmounted
object
object
object
Example
{ "code": 200, "message": "Success", "data": { "mounted_datasets": [ "train-data" ], "unmounted_datasets": [] }, "errors": {}}A list is missing or both are empty, a dataset ID is unknown, deleted, not ready or in another project, or a disk dataset is already mounted (“Disk based dataset
object
object
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "Some of the datasets are either invalid or not ready"}No VM with that ID in the project and region.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Invalid Request! Notebook not found"}The cluster could not change the mounts.
object
object
Example
{ "code": 412, "message": "Precondition Failed", "data": {}, "errors": "Error while mounting/unmounting datasets on notebook"}