Список хостов
curl --request GET \
--url https://api.qudata.ai/v0/hosts \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.qudata.ai/v0/hosts"
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/hosts', 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/hosts",
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/hosts"
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/hosts")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qudata.ai/v0/hosts")
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>",
"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
},
"address": "<string>",
"agent_port": 123,
"fingerprint": "<string>",
"agent_id": "<string>",
"status": "inactive",
"status_reason": "<string>"
}
],
"total_items": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Хосты [ALPHA]
Список хостов
GET
/
v0
/
hosts
Список хостов
curl --request GET \
--url https://api.qudata.ai/v0/hosts \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.qudata.ai/v0/hosts"
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/hosts', 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/hosts",
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/hosts"
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/hosts")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qudata.ai/v0/hosts")
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>",
"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
},
"address": "<string>",
"agent_port": 123,
"fingerprint": "<string>",
"agent_id": "<string>",
"status": "inactive",
"status_reason": "<string>"
}
],
"total_items": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Авторизации
Параметры запроса
Доступные опции:
USD, RUB, QOIN Доступные опции:
ru, en ⌘I