import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.userData.retrieve({
userDataId: "ud_MLGXPdWgdnNWk",
});
console.log(result);
}
run();{
"data": {
"id": "ud_MLGXPdWgdnNWk",
"type": "user_data",
"attributes": {
"description": "Three egg whites with spinach, mushrooms, caramelized onions, tomatoes and low-fat feta cheese. With herbed quinoa, and your choice of rye or whole-grain toast.",
"content": "VHdvIGJ1dHRlcm1pbGsgd2FmZmxlcywgdG9wcGVkIHdpdGggd2hpcHBlZCBjcmVhbSBhbmQgbWFwbGUgc3lydXAsIGEgc2lkZSBvZiB0d28gZWdncyBzZXJ2ZWQgYW55IHN0eWxlLCBhbmQgeW91ciBjaG9pY2Ugb2Ygc21va2VkIGJhY29uIG9yIHNtb2tlZCBoYW0u",
"created_at": "2026-01-14T15:57:11+00:00",
"updated_at": "2026-01-14T15:57:11+00:00",
"decoded_content": "Two buttermilk waffles, topped with whipped cream and maple syrup, a side of two eggs served any style, and your choice of smoked bacon or smoked ham.",
"project": {
"id": "proj_pbV0DgkzD4AWz",
"name": "Sleek Iron Wallet",
"slug": "sleek-iron-wallet",
"description": "Small Silk Shoes",
"provisioning_type": "on_demand",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 0,
"virtual_machines": 0,
"vlans": 0
}
}
}
},
"meta": {}
}Get User Data in the project. These scripts can be used to configure servers with user data.
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.userData.retrieve({
userDataId: "ud_MLGXPdWgdnNWk",
});
console.log(result);
}
run();{
"data": {
"id": "ud_MLGXPdWgdnNWk",
"type": "user_data",
"attributes": {
"description": "Three egg whites with spinach, mushrooms, caramelized onions, tomatoes and low-fat feta cheese. With herbed quinoa, and your choice of rye or whole-grain toast.",
"content": "VHdvIGJ1dHRlcm1pbGsgd2FmZmxlcywgdG9wcGVkIHdpdGggd2hpcHBlZCBjcmVhbSBhbmQgbWFwbGUgc3lydXAsIGEgc2lkZSBvZiB0d28gZWdncyBzZXJ2ZWQgYW55IHN0eWxlLCBhbmQgeW91ciBjaG9pY2Ugb2Ygc21va2VkIGJhY29uIG9yIHNtb2tlZCBoYW0u",
"created_at": "2026-01-14T15:57:11+00:00",
"updated_at": "2026-01-14T15:57:11+00:00",
"decoded_content": "Two buttermilk waffles, topped with whipped cream and maple syrup, a side of two eggs served any style, and your choice of smoked bacon or smoked ham.",
"project": {
"id": "proj_pbV0DgkzD4AWz",
"name": "Sleek Iron Wallet",
"slug": "sleek-iron-wallet",
"description": "Small Silk Shoes",
"provisioning_type": "on_demand",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 0,
"virtual_machines": 0,
"vlans": 0
}
}
}
},
"meta": {}
}The decoded_content is provided as an extra attribute that shows content in decoded form.
Was this page helpful?