Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.baselinesPreview.getBaseline({
baselineId: "bl_6059EqYkOQj8p",
});
console.log(result);
}
run();package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.BaselinesPreview.GetBaseline(ctx, "bl_6059EqYkOQj8p")
if err != nil {
log.Fatal(err)
}
if res.Baseline != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/baselines/{baseline_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/baselines/{baseline_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/baselines/{baseline_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.latitude.sh/baselines/{baseline_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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/baselines/{baseline_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/baselines/{baseline_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "bl_6059EqYkOQj8p",
"type": "baselines",
"attributes": {
"name": "baseline-9",
"description": "Standard build for the web tier",
"target_type": "all_servers",
"platforms": [],
"ssh_keys": [
{
"id": "ssh_lpbV0DgRq4AWz",
"name": "zulauf.example",
"fingerprint": "31:1a:ae:1b:af:00:30:08:50:d3:9c:4a:90:81:dd:65"
}
],
"user_data": null,
"disk_layout": [],
"bios": {},
"created_at": "2026-07-30T16:21:19.279Z"
}
}
}Baselines (Preview)
Retrieve baseline
Preview. Available to teams with the baselines_api feature flag.
Retrieve a single baseline.
GET
/
baselines
/
{baseline_id}
Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.baselinesPreview.getBaseline({
baselineId: "bl_6059EqYkOQj8p",
});
console.log(result);
}
run();package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.BaselinesPreview.GetBaseline(ctx, "bl_6059EqYkOQj8p")
if err != nil {
log.Fatal(err)
}
if res.Baseline != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/baselines/{baseline_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/baselines/{baseline_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/baselines/{baseline_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.latitude.sh/baselines/{baseline_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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/baselines/{baseline_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/baselines/{baseline_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "bl_6059EqYkOQj8p",
"type": "baselines",
"attributes": {
"name": "baseline-9",
"description": "Standard build for the web tier",
"target_type": "all_servers",
"platforms": [],
"ssh_keys": [
{
"id": "ssh_lpbV0DgRq4AWz",
"name": "zulauf.example",
"fingerprint": "31:1a:ae:1b:af:00:30:08:50:d3:9c:4a:90:81:dd:65"
}
],
"user_data": null,
"disk_layout": [],
"bios": {},
"created_at": "2026-07-30T16:21:19.279Z"
}
}
}Was this page helpful?
⌘I