Dataset

You can organize, share and easily access your data through notebooks, training code using datasets.

List of Dataset

To get the list of dataset, send a GET request to the Dataset Endpoint

https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/?apikey={{tapi_key}}&page_no=1&per_page=5
import requests

url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/?apikey={{tapi_key}}&page_no=1&per_page=5"

payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

Create EOS DataSet

To create an EOS dataset, send a GET request to the Dataset Endpoint

https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/?apikey={{tapi_key}}&page_no=1&per_page=5
import requests

url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/?apikey={{tapi_key}}&page_no=1&per_page=5"

payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
{
"name": "aashish-dataset-0",
"type": "managed"
}

Create Disk DataSet

To create a Disk dataset, send a POST request to the Dataset Endpoint

https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/?apikey={{tapi_key}}
import requests
import json

url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/?apikey={{tapi_key}}"

payload = json.dumps({
"name": "aashishdatasetdisk",
"type": "pvc",
"pvc": {
    "disk_size": 45,
    "pvc_type": "custom_pvc"
}
})
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
{
"name": "aashishdatasetdisk",
"type": "pvc",
"pvc": {
      "disk_size": 45,
      "pvc_type": "custom_pvc"
}
}

Increase Disk Size

To increase the Disk Size, send a PUT request to the Dataset Endpoint

https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/{{dataset_id}}/?apikey={{tapi_key}}
import requests
import json

url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/{{dataset_id}}/?apikey={{tapi_key}}"

payload = json.dumps({
"type": "pvc",
"pvc": {
    "disk_size": 300
}
})
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
{
"type": "pvc",
"pvc": {
      "disk_size": 300
}
}

List Of EOS Data Objects

To get the list of EOS Data Object, send a GET request to the Dataset Endpoint

https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/{{dataset_id}}/objects/?apikey={{tapi_key}}&prefix=
import requests

url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/{{dataset_id}}/objects/?apikey={{tapi_key}}&prefix="

payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

EOS Bucket Listing

To get the list of EOS Buckets, send a GET request to the Dataset Endpoint

https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/eos-bucket-selection-list/?apikey={{tapi_key}}
import requests

url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/eos-bucket-selection-list/?apikey={{tapi_key}}"

payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

Delete Dataset

To delete the dataset, send a DELETE request to the Dataset Endpoint

https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/{{dataset_id}}/?apikey={{tapi_key}}
import requests

url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/{{dataset_id}}/?apikey={{tapi_key}}"

payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...