List instance SKUs
curl --request GET \
--url https://api.sfcompute.com/preview/v2/instance_skus \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sfcompute.com/preview/v2/instance_skus"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sfcompute.com/preview/v2/instance_skus', 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.sfcompute.com/preview/v2/instance_skus",
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://api.sfcompute.com/preview/v2/instance_skus"
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://api.sfcompute.com/preview/v2/instance_skus")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sfcompute.com/preview/v2/instance_skus")
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{
"object": "list",
"has_more": true,
"data": [
{
"object": "instance_sku",
"id": "isku_k3R-nX9vLm7Qp2Yw5Jd8F",
"alias": "<string>",
"region": {
"value": "<string>",
"display_value": "<string>"
},
"availability_zone": {
"value": "<string>",
"display_value": "<string>"
},
"accelerator": {
"value": "<string>",
"display_value": "<string>"
},
"form_factor": {
"value": "<string>",
"display_value": "<string>"
},
"rdma_type": {
"display_value": "<string>"
},
"num_accelerators": {
"value": 1,
"display_value": "<string>"
},
"num_vcpus": {
"value": 1,
"display_value": "<string>"
},
"memory": {
"value": 1,
"display_value": "<string>"
},
"local_storage": {
"value": 1,
"display_value": "<string>"
},
"supports_public_ipv4": {
"value": true,
"display_value": "<string>"
}
}
],
"cursor": "iskuc_gqXR7s0Kj5mHvE2wNpLc4Q"
}{
"error": {
"type": "authentication_error",
"message": "<string>"
}
}{
"error": {
"type": "unprocessable_entity",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"message": "<string>"
}
}Instance SKUs
List instance SKUs
⚠️ This endpoint is in public preview.
List the instance SKUs available on the market with their properties.
GET
/
preview
/
v2
/
instance_skus
List instance SKUs
curl --request GET \
--url https://api.sfcompute.com/preview/v2/instance_skus \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sfcompute.com/preview/v2/instance_skus"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sfcompute.com/preview/v2/instance_skus', 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.sfcompute.com/preview/v2/instance_skus",
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://api.sfcompute.com/preview/v2/instance_skus"
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://api.sfcompute.com/preview/v2/instance_skus")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sfcompute.com/preview/v2/instance_skus")
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{
"object": "list",
"has_more": true,
"data": [
{
"object": "instance_sku",
"id": "isku_k3R-nX9vLm7Qp2Yw5Jd8F",
"alias": "<string>",
"region": {
"value": "<string>",
"display_value": "<string>"
},
"availability_zone": {
"value": "<string>",
"display_value": "<string>"
},
"accelerator": {
"value": "<string>",
"display_value": "<string>"
},
"form_factor": {
"value": "<string>",
"display_value": "<string>"
},
"rdma_type": {
"display_value": "<string>"
},
"num_accelerators": {
"value": 1,
"display_value": "<string>"
},
"num_vcpus": {
"value": 1,
"display_value": "<string>"
},
"memory": {
"value": 1,
"display_value": "<string>"
},
"local_storage": {
"value": 1,
"display_value": "<string>"
},
"supports_public_ipv4": {
"value": true,
"display_value": "<string>"
}
}
],
"cursor": "iskuc_gqXR7s0Kj5mHvE2wNpLc4Q"
}{
"error": {
"type": "authentication_error",
"message": "<string>"
}
}{
"error": {
"type": "unprocessable_entity",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"message": "<string>"
}
}Authorizations
Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
Query Parameters
Maximum number of results to return (1-200, default 50).
Required range:
1 <= x <= 200Cursor for forward pagination (from a previous response's cursor field).
Pattern:
^iskuc_[A-Za-z0-9_-]+$Example:
"iskuc_gqXR7s0Kj5mHvE2wNpLc4Q"
Cursor for backward pagination.
Pattern:
^iskuc_[A-Za-z0-9_-]+$Example:
"iskuc_gqXR7s0Kj5mHvE2wNpLc4Q"
Response
Paginated list of instance SKUs.
Paginated list of instance SKUs returned by GET /v2/instance_skus.
⌘I