Список инстансов
curl --request GET \
--url https://api.qudata.ai/v0/instances \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.qudata.ai/v0/instances"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.qudata.ai/v0/instances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qudata.ai/v0/instances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qudata.ai/v0/instances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qudata.ai/v0/instances")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qudata.ai/v0/instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": [
{
"id": "<string>",
"user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"actual_offer": {
"id": "<string>",
"gpu_name": "<string>",
"configuration": {
"ram": {
"amount": 123
},
"disk": {
"amount": 123
},
"cpu_name": "<string>",
"vcpu": 123,
"cpu_cores": 123,
"cpu_freq": 123,
"memory_speed": 123,
"ethernet_in": 123,
"ethernet_out": 123,
"capacity": 123,
"max_cuda_version": 123
},
"in_stock": true,
"rentable": true,
"provider": {
"id": "<string>",
"name": "<string>",
"translit_name": "<string>",
"country": "<string>",
"logo": "<string>",
"meta_title": "<string>",
"meta_description": "<string>",
"use_vpn": true
},
"gpu_amount": 123,
"gpu_translit_name": "<string>",
"vram": 123,
"prices": [],
"location": {
"city": "<string>",
"country": "<string>",
"region": "<string>"
},
"extra": {},
"url": "<string>",
"is_third_party": false,
"offers_amount": 0,
"countries_amount": 0,
"disk_prices": [],
"available_until": "2023-11-07T05:31:56Z",
"real_price": 123,
"disk_real_price": 123
},
"actual_template": {
"id": "<string>",
"image": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"name": "<string>",
"description": "<string>",
"readme": "<string>",
"image_tag": "latest",
"docker_private": {
"registry": "<string>",
"login": "<string>",
"password": "<string>"
},
"env_variables": {},
"command": "<string>",
"ports": {},
"ssh_enabled": false,
"ssh_username": "root",
"ui_available": false,
"ui_path": "<string>",
"ui_port": 123,
"min_storage_gb": 123,
"gpus": [],
"url": "<string>",
"picture": "<string>",
"is_private": false,
"template_version": 0
},
"hoster_id": "<string>",
"host_id": "<string>",
"third_party_id": "<string>",
"cloud_id": "<string>",
"total_cost": 0,
"total_uptime": 0,
"storage_gb": 0,
"initialized_at": "2023-11-07T05:31:56Z",
"prepaid_until": "2023-11-07T05:31:56Z",
"is_prepaid": false,
"uptime_price": 0,
"pause_price": 0,
"gpu_util": 0,
"cpu_util": 0,
"ram_util": 0,
"mem_util": 0,
"inet_in": 0,
"inet_out": 0,
"status": "pending",
"message": "<string>",
"logs": "<string>",
"ports": {},
"address": "<string>",
"ssh_enabled": false,
"ssh_port": 123,
"ssh_host": "<string>",
"ssh_username": "<string>",
"ssh_password": "<string>",
"ssh_keys": [],
"ui_available": false,
"ui_url": "<string>",
"tunnel_host": "<string>",
"tunnel_token": "<string>",
"red_flagged": false,
"label": true,
"deployment_data": {
"base_url": "<string>"
},
"is_raw": true
}
],
"total_items": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Инстансы
Список инстансов
Возвращает список арендованных инстансов
GET
/
v0
/
instances
Список инстансов
curl --request GET \
--url https://api.qudata.ai/v0/instances \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.qudata.ai/v0/instances"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.qudata.ai/v0/instances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qudata.ai/v0/instances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qudata.ai/v0/instances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qudata.ai/v0/instances")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qudata.ai/v0/instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": [
{
"id": "<string>",
"user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"actual_offer": {
"id": "<string>",
"gpu_name": "<string>",
"configuration": {
"ram": {
"amount": 123
},
"disk": {
"amount": 123
},
"cpu_name": "<string>",
"vcpu": 123,
"cpu_cores": 123,
"cpu_freq": 123,
"memory_speed": 123,
"ethernet_in": 123,
"ethernet_out": 123,
"capacity": 123,
"max_cuda_version": 123
},
"in_stock": true,
"rentable": true,
"provider": {
"id": "<string>",
"name": "<string>",
"translit_name": "<string>",
"country": "<string>",
"logo": "<string>",
"meta_title": "<string>",
"meta_description": "<string>",
"use_vpn": true
},
"gpu_amount": 123,
"gpu_translit_name": "<string>",
"vram": 123,
"prices": [],
"location": {
"city": "<string>",
"country": "<string>",
"region": "<string>"
},
"extra": {},
"url": "<string>",
"is_third_party": false,
"offers_amount": 0,
"countries_amount": 0,
"disk_prices": [],
"available_until": "2023-11-07T05:31:56Z",
"real_price": 123,
"disk_real_price": 123
},
"actual_template": {
"id": "<string>",
"image": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"name": "<string>",
"description": "<string>",
"readme": "<string>",
"image_tag": "latest",
"docker_private": {
"registry": "<string>",
"login": "<string>",
"password": "<string>"
},
"env_variables": {},
"command": "<string>",
"ports": {},
"ssh_enabled": false,
"ssh_username": "root",
"ui_available": false,
"ui_path": "<string>",
"ui_port": 123,
"min_storage_gb": 123,
"gpus": [],
"url": "<string>",
"picture": "<string>",
"is_private": false,
"template_version": 0
},
"hoster_id": "<string>",
"host_id": "<string>",
"third_party_id": "<string>",
"cloud_id": "<string>",
"total_cost": 0,
"total_uptime": 0,
"storage_gb": 0,
"initialized_at": "2023-11-07T05:31:56Z",
"prepaid_until": "2023-11-07T05:31:56Z",
"is_prepaid": false,
"uptime_price": 0,
"pause_price": 0,
"gpu_util": 0,
"cpu_util": 0,
"ram_util": 0,
"mem_util": 0,
"inet_in": 0,
"inet_out": 0,
"status": "pending",
"message": "<string>",
"logs": "<string>",
"ports": {},
"address": "<string>",
"ssh_enabled": false,
"ssh_port": 123,
"ssh_host": "<string>",
"ssh_username": "<string>",
"ssh_password": "<string>",
"ssh_keys": [],
"ui_available": false,
"ui_url": "<string>",
"tunnel_host": "<string>",
"tunnel_token": "<string>",
"red_flagged": false,
"label": true,
"deployment_data": {
"base_url": "<string>"
},
"is_raw": true
}
],
"total_items": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Авторизации
Параметры запроса
Доступные опции:
USD, RUB, QOIN Доступные опции:
ru, en ⌘I