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.UserData.List(ctx, nil, nil, latitudeshgosdk.Pointer("decoded_content"))
if err != nil {
log.Fatal(err)
}
if res.UserData != nil {
// handle response
}
}{
"data": [
{
"id": "ud_1Qkm7dXzD8nZV",
"type": "user_data",
"attributes": {
"description": "Thick slices of French toast bread, brown sugar, half-and-half and vanilla, topped with powdered sugar. With two eggs served any style, and your choice of smoked bacon or smoked ham.",
"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_1ZJrdxoyOg4LV",
"name": "Heavy Duty Aluminum Coat",
"slug": "heavy-duty-aluminum-coat",
"description": "Enormous Bronze Bag",
"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": {}
}List all Users Data in the project. These scripts can be used to configure servers with user data.
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.UserData.List(ctx, nil, nil, latitudeshgosdk.Pointer("decoded_content"))
if err != nil {
log.Fatal(err)
}
if res.UserData != nil {
// handle response
}
}{
"data": [
{
"id": "ud_1Qkm7dXzD8nZV",
"type": "user_data",
"attributes": {
"description": "Thick slices of French toast bread, brown sugar, half-and-half and vanilla, topped with powdered sugar. With two eggs served any style, and your choice of smoked bacon or smoked ham.",
"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_1ZJrdxoyOg4LV",
"name": "Heavy Duty Aluminum Coat",
"slug": "heavy-duty-aluminum-coat",
"description": "Enormous Bronze Bag",
"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": {}
}Project ID or slug
Filter by scope: project (has project), team (no project), or empty (all)
The decoded_content is provided as an extra attribute that shows content in decoded form.
Was this page helpful?