Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.virtual_machines.get(virtual_machine_id="vm_7vYAZqGBdMQ94", extra_fields_virtual_machines="credentials")
# Handle response
print(res)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.VirtualMachines.Get(ctx, "vm_7vYAZqGBdMQ94", latitudeshgosdk.Pointer("credentials"))
if err != nil {
log.Fatal(err)
}
if res.VirtualMachine != 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.virtualMachines.get({
virtualMachineId: "vm_7vYAZqGBdMQ94",
extraFieldsVirtualMachines: "credentials",
});
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/virtual_machines/{virtual_machine_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/virtual_machines/{virtual_machine_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/virtual_machines/{virtual_machine_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/virtual_machines/{virtual_machine_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/virtual_machines/{virtual_machine_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": "vm_7vYAZqGBdMQ94",
"type": "virtual_machines",
"attributes": {
"name": "my-new-vm",
"status": "Starting",
"created_at": "2026-01-14T15:57:15+00:00",
"primary_ipv4": "10.0.0.25",
"operating_system": null,
"site": "london-2193",
"billing": "hourly",
"plan": {
"id": "plan_VE1Wd3VQOXnZJ",
"name": "c3.small.x86-143"
},
"specs": {
"vcpu": 16,
"ram": "128 GB",
"storage": "100 GB",
"nic": "1 x 1 Gbps",
"gpu": "1 x NVIDIA H100 Tensor Core GPU"
},
"team": {
"id": "team_GpZboxNev1U2pxpmKwWAc8e01vpp",
"name": "702 Team",
"slug": "702-team",
"description": "702 Team",
"address": "Suite 729 8171 Albina Forges, Eldridgeberg, CA 26345-3293",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
},
"project": {
"id": "proj_W6Q2D9ZQOKLpr",
"name": "Aerodynamic Wool Watch",
"slug": "aerodynamic-wool-watch",
"description": "Intelligent Paper Shirt",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 0,
"virtual_machines": 1,
"vlans": 0
}
}
}
}
}Virtual machines
Retrieve VM
Show a Virtual Machine.
GET
/
virtual_machines
/
{virtual_machine_id}
Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.virtual_machines.get(virtual_machine_id="vm_7vYAZqGBdMQ94", extra_fields_virtual_machines="credentials")
# Handle response
print(res)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.VirtualMachines.Get(ctx, "vm_7vYAZqGBdMQ94", latitudeshgosdk.Pointer("credentials"))
if err != nil {
log.Fatal(err)
}
if res.VirtualMachine != 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.virtualMachines.get({
virtualMachineId: "vm_7vYAZqGBdMQ94",
extraFieldsVirtualMachines: "credentials",
});
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/virtual_machines/{virtual_machine_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/virtual_machines/{virtual_machine_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/virtual_machines/{virtual_machine_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/virtual_machines/{virtual_machine_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/virtual_machines/{virtual_machine_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": "vm_7vYAZqGBdMQ94",
"type": "virtual_machines",
"attributes": {
"name": "my-new-vm",
"status": "Starting",
"created_at": "2026-01-14T15:57:15+00:00",
"primary_ipv4": "10.0.0.25",
"operating_system": null,
"site": "london-2193",
"billing": "hourly",
"plan": {
"id": "plan_VE1Wd3VQOXnZJ",
"name": "c3.small.x86-143"
},
"specs": {
"vcpu": 16,
"ram": "128 GB",
"storage": "100 GB",
"nic": "1 x 1 Gbps",
"gpu": "1 x NVIDIA H100 Tensor Core GPU"
},
"team": {
"id": "team_GpZboxNev1U2pxpmKwWAc8e01vpp",
"name": "702 Team",
"slug": "702-team",
"description": "702 Team",
"address": "Suite 729 8171 Albina Forges, Eldridgeberg, CA 26345-3293",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
},
"project": {
"id": "proj_W6Q2D9ZQOKLpr",
"name": "Aerodynamic Wool Watch",
"slug": "aerodynamic-wool-watch",
"description": "Intelligent Paper Shirt",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 0,
"virtual_machines": 1,
"vlans": 0
}
}
}
}
}Authorizations
Path Parameters
Query Parameters
Comma-separated extra attributes that are lazy-loaded. Supported values: credentials, pending_restart. Example: extra_fields[virtual_machines]=credentials,pending_restart.
Was this page helpful?
⌘I