Node
TIR Notebooks are fully collaborative environments that make AI development possible. They combine power of containers, jupyter labs and AI/ML frameworks to create a readily usable workspace for you and your entire team.
List of OS Images
To get the list of os, send a GET request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/gpu_service/image/?category=notebook&is_jupyterlab_enabled=true&apikey={{tapi_key}}
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/gpu_service/image/?category=notebook&is_jupyterlab_enabled=true&apikey={{api_key}}"
payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gpu_service/image/?category=notebook&is_jupyterlab_enabled=true&apikey={{api_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
List of Plan
To get the list of plan, send a GET request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/gpu_service/sku/?apikey={{tapi_key}}&image_version_id={{Image_version_id}}&service=notebook
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/gpu_service/sku/?apikey={{tapi_key}}&image_version_id={{Image_version_id}}&service=notebook"
payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gpu_service/sku/?apikey={{tapi_key}}&image_version_id={{Image_version_id}}&service=notebook' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
List of Nodes
To get the list of Nodes, send a GET request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/?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}}/notebooks/?apikey={{tapi_key}}&page_no=1&per_page=5"
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/?apikey={{tapi_key}}&page_no=1&per_page=5'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
Create Node
To create a Node, send a POST request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/?apikey={{tapi_key}}
import requests
import json
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/?apikey={{tapi_key}}"
payload = "{\n \"name\": \"container-aashish\",\n \"image_type\": \"pre-built\",\n \"notebook_type\": \"new\",\n \"notebook_url\": \"\",\n \"disk_size_in_gb\": 30,\n \"dataset_id_list\": [],\n \"enable_ssh\": false,\n \"is_jupyterlab_enabled\": true,\n \"image_version_id\": {{Image_version_id}},\n \"sku_item_price_id\": {{CPUSkuItemPriceId}},\n \"instance_type\": \"paid_usage\",\n \"e2e_registry_image_url\": \"\",\n \"next_sku_item_price_id\": null,\n \"committed_instance_policy\": \"\"\n\n\n}\n\n"
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
--data '{
"name": "container-aashish",
"image_type": "pre-built",
"notebook_type": "new",
"notebook_url": "",
"disk_size_in_gb": 30,
"dataset_id_list": [],
"enable_ssh": false,
"is_jupyterlab_enabled": true,
"image_version_id": {{Image_version_id}},
"sku_item_price_id": {{CPUSkuItemPriceId}},
"instance_type": "paid_usage",
"e2e_registry_image_url": "",
"next_sku_item_price_id": null,
"committed_instance_policy": ""
}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
{
"name": "container-aashish",
"image_type": "pre-built",
"notebook_type": "new",
"notebook_url": "",
"disk_size_in_gb": 30,
"dataset_id_list": [],
"enable_ssh": false,
"is_jupyterlab_enabled": true,
"image_version_id": {{Image_version_id}},
"sku_item_price_id": {{CPUSkuItemPriceId}},
"instance_type": "paid_usage",
"e2e_registry_image_url": "",
"next_sku_item_price_id": null,
"committed_instance_policy": ""
}
Increase Disk Size
To increase the disk size of node, send a PUT request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/pvc/upgrade/?apikey={{tapi_key}}
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/pvc/upgrade/?apikey={{tapi_key}}"
payload = "{\n \"size\": 76\n}"
headers = {}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
curl --location -g --request PUT 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/pvc/upgrade/?apikey={{tapi_key}}' \
--data '{
"size": 76
}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
{
"size": 76
}
Add SSH Key
To add SSH Key to the node, send a PUT request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/ssh-keys/?apikey={{tapi_key}}
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/ssh-keys/?apikey={{tapi_key}}"
payload = "{\n \"ssh_keys_to_add\": [\n \"ssh-rsa AAAAB3NzbzRl.................\"\n ]\n}"
headers = {}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
curl --location -g --request PUT 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/ssh-keys/?apikey={{tapi_key}}' \
--data '{
"ssh_keys_to_add": [
"ssh-rsa AAAAB3NzbzRl................."
]
}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
{
"ssh_keys_to_add": [
"ssh-rsa AAAAB3NzaC1yc2..........................Enjr.local"
]
}
Stop Node
To stop the node, send a PUT request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/actions/?action=stop&apikey={{tapi_key}}
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/actions/?action=stop&apikey={{tapi_key}}"
payload={}
headers = {}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
curl --location -g --request PUT 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/actions/?action=stop&apikey={{tapi_key}}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
Start Node
To start the node, send a PUT request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/actions/?action=start&apikey={{tapi_key}}
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/actions/?action=start&apikey={{tapi_key}}"
payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
curl --location -g --request PUT 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/actions/?action=start&apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
Update Node
To update the node, send a PUT request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/?apikey={{tapi_key}}
import requests
import json
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/?apikey={{tapi_key}}"
payload = json.dumps({
"sku_id": 4,
"sku_item_price_id": 4,
"committed_instance_policy": "",
"next_sku_item_price_id": None,
"name": "tir-container-012315481616",
"image_id": 9,
"auto_shutdown_timeout": None,
"disk_size_in_gb": 56
})
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
curl --location -g --request PUT 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
--data '{
"sku_id": 4,
"sku_item_price_id": 4,
"committed_instance_policy": "",
"next_sku_item_price_id": null,
"name": "tir-container-012315481616",
"image_id": 9,
"auto_shutdown_timeout": null,
"disk_size_in_gb": 56
}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
{
"sku_id": 4,
"sku_item_price_id": 4,
"committed_instance_policy": "",
"next_sku_item_price_id": null,
"name": "tir-container-012315481616",
"image_id": 9,
"auto_shutdown_timeout": null,
"disk_size_in_gb": 56
}
Delete Node
To delete the node, send a DELETE request to the node Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/?apikey={{tapi_key}}
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_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)
curl --location -g --request DELETE 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/notebooks/{{container_id}}/?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218