Skip to content

Mount Or Unmount VM Datasets

PUT
/notebooks/{Instance_id}/mounted-datasets/
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": []
}
}'

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.

Instance_id
required
integer

Instance ID

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
dataset_id_dict
required
object
dataset_ids_to_mount

IDs of datasets to mount.

Array<integer>

Example

[
301
]
dataset_ids_to_unmount

IDs of datasets to unmount.

Array<integer>

Example

[]

The datasets mounted and unmounted

Media typeapplication/json
object
code
integer
message
string
data
object
mounted_datasets
Array<string>
unmounted_datasets
Array<string>
errors
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 , is already mounted to other notebook”).

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

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.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 404,
"message": "Bad Request",
"data": {},
"errors": "Invalid Request! Notebook not found"
}

The cluster could not change the mounts.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {},
"errors": "Error while mounting/unmounting datasets on notebook"
}