Go (SDK)
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/components"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Clusters.UpdateProjectClusterRequirements(ctx, "proj_lxWpD699qm6rk", components.ChangeClusterRequirements{
Data: components.ChangeClusterRequirementsData{
Type: components.ChangeClusterRequirementsTypeClusterRequirements,
Attributes: components.ChangeClusterRequirementsAttributes{
Add: latitudeshgosdk.Pointer("storage_fs"),
Expected: latitudeshgosdk.Pointer("xfs"),
Note: latitudeshgosdk.Pointer("Scratch"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.ClusterRequirements != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.clusters.updateProjectClusterRequirements({
projectId: "proj_lxWpD699qm6rk",
changeClusterRequirements: {
data: {
type: "cluster_requirements",
attributes: {
add: "storage_fs",
expected: "xfs",
note: "Scratch",
},
},
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://api.latitude.sh/projects/{project_id}/cluster/requirements \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "cluster_requirements",
"attributes": {
"add": "storage_fs",
"expected": "xfs",
"note": "Scratch"
}
}
}
'import requests
url = "https://api.latitude.sh/projects/{project_id}/cluster/requirements"
payload = { "data": {
"type": "cluster_requirements",
"attributes": {
"add": "storage_fs",
"expected": "xfs",
"note": "Scratch"
}
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'cluster_requirements',
attributes: {add: 'storage_fs', expected: 'xfs', note: 'Scratch'}
}
})
};
fetch('https://api.latitude.sh/projects/{project_id}/cluster/requirements', 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.latitude.sh/projects/{project_id}/cluster/requirements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'cluster_requirements',
'attributes' => [
'add' => 'storage_fs',
'expected' => 'xfs',
'note' => 'Scratch'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.latitude.sh/projects/{project_id}/cluster/requirements")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"cluster_requirements\",\n \"attributes\": {\n \"add\": \"storage_fs\",\n \"expected\": \"xfs\",\n \"note\": \"Scratch\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/projects/{project_id}/cluster/requirements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"cluster_requirements\",\n \"attributes\": {\n \"add\": \"storage_fs\",\n \"expected\": \"xfs\",\n \"note\": \"Scratch\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "proj_lxWpD699qm6rk",
"type": "cluster_requirements",
"attributes": {
"requirements_state": "awaiting_signature",
"requirements_due_date": "2026-11-20",
"requirements": {
"items": [
{
"id": "bios_smt",
"label": "BIOS: multithreading",
"category": "bios",
"check": "bios_smt"
}
],
"values": {
"bios_smt": {
"expected": "Disabled",
"note": "HPC jobs"
},
"storage_fs": {
"expected": "xfs",
"note": "Scratch"
}
}
},
"node_groups": [
{
"id": "7",
"name": "gpu-b300",
"kind": "gpu",
"plan": "g4-b300-large",
"server_count": 16,
"os": "ubuntu_24_04_x64_lts",
"plan_name": "g4.b300.large",
"os_options": [
{
"slug": "ubuntu_24_04_x64_lts",
"name": "Ubuntu 24.04"
},
{
"slug": "rocky_9_x64",
"name": "Rocky Linux 9"
}
]
}
],
"node_group_options": {
"kinds": [
"gpu",
"cpu",
"storage",
"management",
"other"
],
"max_server_count": 1024,
"plans": [
{
"slug": "g4-b300-large",
"name": "g4.b300.large",
"os_options": [
{
"slug": "ubuntu_24_04_x64_lts",
"name": "Ubuntu 24.04"
},
{
"slug": "rocky_9_x64",
"name": "Rocky Linux 9"
}
]
}
]
},
"requirements_version": "3f1c9b2e7a4d8c06b5e9f2a1d7c3e8b04a6f9d2c1b7e5a3f8d0c4b6e2a9f7d1c",
"signoff": null
}
}
}{
"errors": [
{
"code": "PROJECT_NOT_A_CLUSTER",
"title": "Project Not A Cluster",
"detail": "This project is not a cluster",
"status": "404",
"meta": {}
}
]
}{
"errors": [
{
"code": "REQUIREMENTS_NOT_EDITABLE",
"title": "Requirements Not Editable",
"detail": "These requirements are not ready for your review yet",
"status": "409",
"meta": {}
}
]
}Clusters
Change cluster requirements
Applies one change to your requirements: add or remove a requirement or the checks of a block, or set what a requirement expects. Signed requirements need to be signed again. Only available for projects that have a GPU cluster; any other project answers 404 PROJECT_NOT_A_CLUSTER. Needs an owner, administrator or collaborator.
PATCH
/
projects
/
{project_id}
/
cluster
/
requirements
Go (SDK)
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/components"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Clusters.UpdateProjectClusterRequirements(ctx, "proj_lxWpD699qm6rk", components.ChangeClusterRequirements{
Data: components.ChangeClusterRequirementsData{
Type: components.ChangeClusterRequirementsTypeClusterRequirements,
Attributes: components.ChangeClusterRequirementsAttributes{
Add: latitudeshgosdk.Pointer("storage_fs"),
Expected: latitudeshgosdk.Pointer("xfs"),
Note: latitudeshgosdk.Pointer("Scratch"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.ClusterRequirements != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.clusters.updateProjectClusterRequirements({
projectId: "proj_lxWpD699qm6rk",
changeClusterRequirements: {
data: {
type: "cluster_requirements",
attributes: {
add: "storage_fs",
expected: "xfs",
note: "Scratch",
},
},
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://api.latitude.sh/projects/{project_id}/cluster/requirements \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "cluster_requirements",
"attributes": {
"add": "storage_fs",
"expected": "xfs",
"note": "Scratch"
}
}
}
'import requests
url = "https://api.latitude.sh/projects/{project_id}/cluster/requirements"
payload = { "data": {
"type": "cluster_requirements",
"attributes": {
"add": "storage_fs",
"expected": "xfs",
"note": "Scratch"
}
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'cluster_requirements',
attributes: {add: 'storage_fs', expected: 'xfs', note: 'Scratch'}
}
})
};
fetch('https://api.latitude.sh/projects/{project_id}/cluster/requirements', 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.latitude.sh/projects/{project_id}/cluster/requirements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'cluster_requirements',
'attributes' => [
'add' => 'storage_fs',
'expected' => 'xfs',
'note' => 'Scratch'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.latitude.sh/projects/{project_id}/cluster/requirements")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"cluster_requirements\",\n \"attributes\": {\n \"add\": \"storage_fs\",\n \"expected\": \"xfs\",\n \"note\": \"Scratch\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/projects/{project_id}/cluster/requirements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"cluster_requirements\",\n \"attributes\": {\n \"add\": \"storage_fs\",\n \"expected\": \"xfs\",\n \"note\": \"Scratch\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "proj_lxWpD699qm6rk",
"type": "cluster_requirements",
"attributes": {
"requirements_state": "awaiting_signature",
"requirements_due_date": "2026-11-20",
"requirements": {
"items": [
{
"id": "bios_smt",
"label": "BIOS: multithreading",
"category": "bios",
"check": "bios_smt"
}
],
"values": {
"bios_smt": {
"expected": "Disabled",
"note": "HPC jobs"
},
"storage_fs": {
"expected": "xfs",
"note": "Scratch"
}
}
},
"node_groups": [
{
"id": "7",
"name": "gpu-b300",
"kind": "gpu",
"plan": "g4-b300-large",
"server_count": 16,
"os": "ubuntu_24_04_x64_lts",
"plan_name": "g4.b300.large",
"os_options": [
{
"slug": "ubuntu_24_04_x64_lts",
"name": "Ubuntu 24.04"
},
{
"slug": "rocky_9_x64",
"name": "Rocky Linux 9"
}
]
}
],
"node_group_options": {
"kinds": [
"gpu",
"cpu",
"storage",
"management",
"other"
],
"max_server_count": 1024,
"plans": [
{
"slug": "g4-b300-large",
"name": "g4.b300.large",
"os_options": [
{
"slug": "ubuntu_24_04_x64_lts",
"name": "Ubuntu 24.04"
},
{
"slug": "rocky_9_x64",
"name": "Rocky Linux 9"
}
]
}
]
},
"requirements_version": "3f1c9b2e7a4d8c06b5e9f2a1d7c3e8b04a6f9d2c1b7e5a3f8d0c4b6e2a9f7d1c",
"signoff": null
}
}
}{
"errors": [
{
"code": "PROJECT_NOT_A_CLUSTER",
"title": "Project Not A Cluster",
"detail": "This project is not a cluster",
"status": "404",
"meta": {}
}
]
}{
"errors": [
{
"code": "REQUIREMENTS_NOT_EDITABLE",
"title": "Requirements Not Editable",
"detail": "These requirements are not ready for your review yet",
"status": "409",
"meta": {}
}
]
}Was this page helpful?