List flavors
curl --request GET \
--url https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors \
--header 'Authorization: Bearer <token>'import requests
url = "https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors', 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://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors",
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://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors"
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://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors")
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[
{
"metadata": {
"id": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"name": "g.4.highmem.a100.1g.10gb",
"creationTime": "1970-01-01T00:00:00Z"
},
"spec": {
"architecture": "x86_64",
"cpus": 4,
"cpuFamily": "Intel Xeon Platinum 8160T (Skylake)",
"disk": 20,
"memory": 32,
"gpu": {
"vendor": "AMD",
"model": "Instinct MI250",
"memory": 64,
"physicalCount": 1,
"logicalCount": 2
}
}
}
]{
"error": "invalid_request",
"error_description": "request body invalid"
}{
"error": "access_denied",
"error_description": "authentication failed"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges"
}{
"error": "not_found",
"error_description": "the requested resource does not exist"
}{
"error": "server_error",
"error_description": "failed to token claim"
}Flavors
List flavors
Lists all compute compatible flavors that the user has access to.
GET
/
api
/
v1
/
organizations
/
{organizationID}
/
regions
/
{regionID}
/
flavors
List flavors
curl --request GET \
--url https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors \
--header 'Authorization: Bearer <token>'import requests
url = "https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors', 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://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors",
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://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors"
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://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.nks.europe-west4.nscale.com/api/v1/organizations/{organizationID}/regions/{regionID}/flavors")
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[
{
"metadata": {
"id": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"name": "g.4.highmem.a100.1g.10gb",
"creationTime": "1970-01-01T00:00:00Z"
},
"spec": {
"architecture": "x86_64",
"cpus": 4,
"cpuFamily": "Intel Xeon Platinum 8160T (Skylake)",
"disk": 20,
"memory": 32,
"gpu": {
"vendor": "AMD",
"model": "Instinct MI250",
"memory": 64,
"physicalCount": 1,
"logicalCount": 2
}
}
}
]{
"error": "invalid_request",
"error_description": "request body invalid"
}{
"error": "access_denied",
"error_description": "authentication failed"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges"
}{
"error": "not_found",
"error_description": "the requested resource does not exist"
}{
"error": "server_error",
"error_description": "failed to token claim"
}Authorizations
Operation requires OAuth 2.0 bearer token authentication.
Path Parameters
The organization ID. A Kubernetes name. Must be a valid DNS containing only lower case characters, numbers or hyphens, start and end with a character or number, and be at most 63 characters in length.
Required string length:
1 - 63The region ID. A Kubernetes name. Must be a valid DNS containing only lower case characters, numbers or hyphens, start and end with a character or number, and be at most 63 characters in length.
Required string length:
1 - 63Was this page helpful?
⌘I