import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.servers.create({
data: {
type: "servers",
attributes: {
project: "proj_lxWpD699qm6rk",
plan: "c2-small-x86",
site: "ASH",
operatingSystem: "ubuntu_22_04_x64_lts",
hostname: "BRC1",
},
},
});
console.log(result);
}
run();{
"data": {
"type": "servers",
"id": "sv_W6Q2D9xGqKLpr",
"attributes": {
"hostname": "BRC1",
"label": "846419NODEME",
"role": "Bare Metal",
"status": "off",
"primary_ipv4": "171.189.35.253",
"primary_ipv6": "7d69:748d:26cc:796a:1248:b6be:a658:96a4",
"specs": {
"cpu": "Xeon E-2186G CPU @ 3.80GHz (6 cores)",
"disk": "500 GB SSD",
"ram": "32 GB",
"nic": ""
},
"plan": {
"id": "plan_8NkvdyMKdeLpx",
"name": "c2.small.x86",
"slug": "c2-small-x86",
"billing": "hourly"
},
"interfaces": [
{
"role": "ipmi",
"name": "IPMI",
"mac_address": "00:11:22:33:44:55",
"description": "IPMI Interface"
},
{
"role": "internal",
"name": "PXE",
"mac_address": "66:77:88:99:aa:bb",
"description": "PXE Interface"
}
]
}
},
"meta": {}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.servers.create({
data: {
type: "servers",
attributes: {
project: "proj_lxWpD699qm6rk",
plan: "c2-small-x86",
site: "ASH",
operatingSystem: "ubuntu_22_04_x64_lts",
hostname: "BRC1",
},
},
});
console.log(result);
}
run();{
"data": {
"type": "servers",
"id": "sv_W6Q2D9xGqKLpr",
"attributes": {
"hostname": "BRC1",
"label": "846419NODEME",
"role": "Bare Metal",
"status": "off",
"primary_ipv4": "171.189.35.253",
"primary_ipv6": "7d69:748d:26cc:796a:1248:b6be:a658:96a4",
"specs": {
"cpu": "Xeon E-2186G CPU @ 3.80GHz (6 cores)",
"disk": "500 GB SSD",
"ram": "32 GB",
"nic": ""
},
"plan": {
"id": "plan_8NkvdyMKdeLpx",
"name": "c2.small.x86",
"slug": "c2-small-x86",
"billing": "hourly"
},
"interfaces": [
{
"role": "ipmi",
"name": "IPMI",
"mac_address": "00:11:22:33:44:55",
"description": "IPMI Interface"
},
{
"role": "internal",
"name": "PXE",
"mac_address": "66:77:88:99:aa:bb",
"description": "PXE Interface"
}
]
}
},
"meta": {}
}Was this page helpful?