curl --request GET \
--url https://api.sfcompute.com/preview/v2/infiniband_partitions/{id}/instances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sfcompute.com/preview/v2/infiniband_partitions/{id}/instances"
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/infiniband_partitions/{id}/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.sfcompute.com/preview/v2/infiniband_partitions/{id}/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 => [
"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/infiniband_partitions/{id}/instances"
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/infiniband_partitions/{id}/instances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sfcompute.com/preview/v2/infiniband_partitions/{id}/instances")
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": [
{
"id": "inst_k3R-nX9vLm7Qp2Yw5Jd8F",
"resource_path": "sfc:instance:<account_id>:<workspace>:<name>",
"owner": "my-resource-name",
"workspace": "my-resource-name",
"workspace_id": "wksp_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name",
"object": "instance",
"status": "awaiting_allocation",
"instance_sku": {
"object": "instance_sku",
"id": "isku_k3R-nX9vLm7Qp2Yw5Jd8F",
"alias": "my-resource-name"
},
"capacity": {
"id": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name"
},
"pool": {
"id": "pool_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name"
},
"created_at": 1738972800,
"updated_at": 1738972800,
"image": {
"id": "image_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name"
},
"cloud_init_user_data_used": true,
"managed_by": {
"id": "depl_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name",
"object": "deployment"
},
"cloud_init_user_data": "IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo=",
"subnet": "snet_k3R-nX9vLm7Qp2Yw5Jd8F",
"private_ip": "<string>",
"enable_public_ipv4": true,
"public_ip": "<string>",
"firewall": "frwl_k3R-nX9vLm7Qp2Yw5Jd8F",
"infiniband_partition": "ibpart_k3R-nX9vLm7Qp2Yw5Jd8F",
"tags": {
"env": "prod",
"team": "infra"
},
"expected_shutdown_at": 1738972800,
"priority_level": "yield"
}
],
"cursor": "nodec_gqXR7s0Kj5mHvE2wNpLc4Q"
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"type": "authentication_error",
"message": "<string>"
}
}{
"error": {
"type": "forbidden",
"message": "<string>"
}
}{
"error": {
"type": "not_found",
"message": "<string>"
}
}{
"error": {
"type": "unprocessable_entity",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"type": "rate_limited",
"message": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>"
}
}List instances in an InfiniBand partition
⚠️ This endpoint is in public preview.
List the instances you can see that are attached to an InfiniBand partition.
curl --request GET \
--url https://api.sfcompute.com/preview/v2/infiniband_partitions/{id}/instances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sfcompute.com/preview/v2/infiniband_partitions/{id}/instances"
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/infiniband_partitions/{id}/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.sfcompute.com/preview/v2/infiniband_partitions/{id}/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 => [
"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/infiniband_partitions/{id}/instances"
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/infiniband_partitions/{id}/instances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sfcompute.com/preview/v2/infiniband_partitions/{id}/instances")
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": [
{
"id": "inst_k3R-nX9vLm7Qp2Yw5Jd8F",
"resource_path": "sfc:instance:<account_id>:<workspace>:<name>",
"owner": "my-resource-name",
"workspace": "my-resource-name",
"workspace_id": "wksp_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name",
"object": "instance",
"status": "awaiting_allocation",
"instance_sku": {
"object": "instance_sku",
"id": "isku_k3R-nX9vLm7Qp2Yw5Jd8F",
"alias": "my-resource-name"
},
"capacity": {
"id": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name"
},
"pool": {
"id": "pool_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name"
},
"created_at": 1738972800,
"updated_at": 1738972800,
"image": {
"id": "image_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name"
},
"cloud_init_user_data_used": true,
"managed_by": {
"id": "depl_k3R-nX9vLm7Qp2Yw5Jd8F",
"name": "my-resource-name",
"object": "deployment"
},
"cloud_init_user_data": "IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo=",
"subnet": "snet_k3R-nX9vLm7Qp2Yw5Jd8F",
"private_ip": "<string>",
"enable_public_ipv4": true,
"public_ip": "<string>",
"firewall": "frwl_k3R-nX9vLm7Qp2Yw5Jd8F",
"infiniband_partition": "ibpart_k3R-nX9vLm7Qp2Yw5Jd8F",
"tags": {
"env": "prod",
"team": "infra"
},
"expected_shutdown_at": 1738972800,
"priority_level": "yield"
}
],
"cursor": "nodec_gqXR7s0Kj5mHvE2wNpLc4Q"
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"type": "authentication_error",
"message": "<string>"
}
}{
"error": {
"type": "forbidden",
"message": "<string>"
}
}{
"error": {
"type": "not_found",
"message": "<string>"
}
}{
"error": {
"type": "unprocessable_entity",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"type": "rate_limited",
"message": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>"
}
}Authorizations
Create an API token using sf tokens create or at https://sfcompute.com/dashboard/tokens.
Path Parameters
InfiniBand partition ID or resource path A resource path like 'sfc:infiniband_partition:acme:prod:my-infiniband_partition' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
(ibpart_[0-9a-zA-Z_-]{1,21})|(sfc:infiniband_partition:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"ibpart_k3R-nX9vLm7Qp2Yw5Jd8F"
Query Parameters
Maximum number of results to return (1-200, default 50).
1 <= x <= 200Cursor for forward pagination (from a previous response's cursor field).
^nodec_[A-Za-z0-9_-]+$"nodec_gqXR7s0Kj5mHvE2wNpLc4Q"
Cursor for backward pagination.
^nodec_[A-Za-z0-9_-]+$"nodec_gqXR7s0Kj5mHvE2wNpLc4Q"
Response
Paginated list of instances in the partition.