Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.compute_catalog.list_compute_offers(limit=50)
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeCatalog.listComputeOffers({});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
ListComputeOffersRequest req = new ListComputeOffersRequest() {};
var res = await sdk.ComputeCatalog.ListComputeOffersAsync(req);
// handle responsecurl --request GET \
--url https://apigw.mka1.com/api/v1/compute/catalog/offers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/compute/catalog/offers', 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://apigw.mka1.com/api/v1/compute/catalog/offers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://apigw.mka1.com/api/v1/compute/catalog/offers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/compute/catalog/offers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/compute/catalog/offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next_cursor": "<string>",
"total": 1,
"data": [
{
"available": true,
"capabilities": {
"custom_image": true,
"http_ports": true,
"managed_service": true,
"multi_node": true,
"persistent_volume": true,
"scale_to_zero": true,
"shared_volume": true,
"ssh": true,
"standalone_volume": true,
"tcp_ports": true
},
"compute": {
"accelerator": "<string>",
"ephemeral_disk_gb": 123,
"gpu_count": 123,
"gpu_memory_gb": 123,
"instance_count": 2,
"memory_gb": 123,
"vcpus": 123,
"interconnect": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"observed_at": "2023-11-07T05:31:56Z",
"price_usd_hr": 123,
"provider": "<string>",
"provider_sku": "<string>",
"region": {
"name": "<string>",
"country": "<string>"
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}Compute Catalog
Lista de ofertas de proveedores
Los administradores del clúster siempre pueden leer esta ruta. Los administradores de la organización solo pueden leerla cuando la anonimidad del proveedor está deshabilitada.
GET
/
api
/
v1
/
compute
/
catalog
/
offers
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.compute_catalog.list_compute_offers(limit=50)
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeCatalog.listComputeOffers({});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
ListComputeOffersRequest req = new ListComputeOffersRequest() {};
var res = await sdk.ComputeCatalog.ListComputeOffersAsync(req);
// handle responsecurl --request GET \
--url https://apigw.mka1.com/api/v1/compute/catalog/offers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/compute/catalog/offers', 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://apigw.mka1.com/api/v1/compute/catalog/offers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://apigw.mka1.com/api/v1/compute/catalog/offers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/compute/catalog/offers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/compute/catalog/offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next_cursor": "<string>",
"total": 1,
"data": [
{
"available": true,
"capabilities": {
"custom_image": true,
"http_ports": true,
"managed_service": true,
"multi_node": true,
"persistent_volume": true,
"scale_to_zero": true,
"shared_volume": true,
"ssh": true,
"standalone_volume": true,
"tcp_ports": true
},
"compute": {
"accelerator": "<string>",
"ephemeral_disk_gb": 123,
"gpu_count": 123,
"gpu_memory_gb": 123,
"instance_count": 2,
"memory_gb": 123,
"vcpus": 123,
"interconnect": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"observed_at": "2023-11-07T05:31:56Z",
"price_usd_hr": 123,
"provider": "<string>",
"provider_sku": "<string>",
"region": {
"name": "<string>",
"country": "<string>"
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}Autorizaciones
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Encabezados
Optional external end-user identifier forwarded by the API gateway.
Parámetros de consulta
Rango requerido:
0 <= x <= 8Opciones disponibles:
pcie, nvlink, infinity_fabric Identificador opaco del proveedor de cómputo. Los valores admitidos dependen de la implementación.
Minimum string length:
1Rango requerido:
1 <= x <= 200¿Esta página le ayudó?
⌘I