Skip to main content
GET
/
preview
/
v2
/
pools
/
{id}
Get pool
curl --request GET \
  --url https://api.sfcompute.com/preview/v2/pools/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.sfcompute.com/preview/v2/pools/{id}"

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/pools/{id}', 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/pools/{id}",
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/pools/{id}"

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/pools/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sfcompute.com/preview/v2/pools/{id}")

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
{
  "id": "<string>",
  "resource_path": "<string>",
  "owner": "<string>",
  "workspace": "<string>",
  "workspace_id": "<string>",
  "name": "<string>",
  "object": "pool",
  "allocation_schedule": {
    "total": [
      {
        "start_at": 1738972800,
        "node_count": 123,
        "end_at": 1738972800
      }
    ],
    "by_instance_sku": {}
  },
  "created_at": 1738972800,
  "procurements": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "deployments": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "tags": {
    "env": "prod",
    "team": "infra"
  }
}
{
"error": {
"type": "authentication_error",
"message": "<string>"
}
}
{
"error": {
"type": "forbidden",
"message": "<string>"
}
}
{
"error": {
"type": "not_found",
"message": "<string>"
}
}
{
"error": {
"type": "api_error",
"message": "<string>"
}
}

Authorizations

Authorization
string
header
required

Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.

Path Parameters

id
string
required

A resource path like 'sfc:pool:acme:prod:my-pool' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

Pattern: (pool_[0-9a-zA-Z_-]{1,21})|(sfc:pool:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})
Example:

"pool_k3R-nX9vLm7Qp2Yw5Jd8F"

Query Parameters

schedule_history_minutes
integer<u-int64>
default:0

How many minutes of past schedule to include.

Required range: 0 <= x <= 1440

Response

Pool details.

A pool — a container of owned compute allocation over time.

id
string
required
Pattern: pool_[0-9a-zA-Z_-]{1,21}
Example:

"pool_k3R-nX9vLm7Qp2Yw5Jd8F"

resource_path
string
required

A resource path for a pool resource. Format: sfc:pool:::.

Pattern: sfc:pool:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+
Example:

"sfc:pool:<account_id>:<workspace>:<name>"

owner
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace_id
string
required
Pattern: wksp_[0-9a-zA-Z_-]{1,21}
Example:

"wksp_k3R-nX9vLm7Qp2Yw5Jd8F"

name
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

kind
enum<string>
required

Pool kind determines what operations are allowed on a pool.

  • Market: User-created pools. - Originating: Provider pools for selling compute. Cannot add compute (buy orders/procurements). - ReadOnly: System-managed pools used for legacy compute, bare metal contracts, and other. Cannot be modified through the API.
Available options:
market,
originating,
read_only
object
string
default:pool
required
read-only

Discriminator for /pools responses.

Allowed value: "pool"
allocation_schedule
object
required

Allocation schedule of this pool. Add to the schedule by placing buy orders into this pool.

created_at
integer<int64>
required

Unix timestamp.

Example:

1738972800

procurements
object[]

Active procurements targeting this pool.

deployments
object[]

Active deployments targeting this pool.

tags
null | object

Metadata tags attached to this pool.

Example:
{ "env": "prod", "team": "infra" }