Authorizations
Body
Response
201 - application/vnd.api+json
Created
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Storage.CreateFilesystem(ctx, operations.PostStorageFilesystemsStorageRequestBody{
Data: operations.PostStorageFilesystemsStorageData{
Type: operations.PostStorageFilesystemsStorageTypeFilesystems,
Attributes: operations.PostStorageFilesystemsStorageAttributes{
Project: "proj_kjQwdE2bqYNVP",
Name: "my-data",
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"data": {
"id": "fs_AW6Q2D9lqKLpr",
"type": "filesystems",
"attributes": {
"name": "my-data",
"size_in_gb": 1500,
"created_at": "2025-07-16T18:37:09.000Z",
"project": {
"id": "proj_kjQwdE2bqYNVP",
"name": "Heavy Duty Leather Clock",
"slug": "heavy-duty-leather-clock",
"description": "Incredible Concrete Lamp",
"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": 1,
"virtual_machines": 0,
"vlans": 0
}
},
"team": {
"id": "team_7YZVxK842zilY8kll6lVTWbX8j5m",
"name": "552 Team",
"slug": "552-team",
"description": "552 Team",
"address": "524 Samuel Square, Port Abramfurt, UT 07649-3772",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}Allows you to add persistent storage to a project. These filesystems can be used to store data across your servers.
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Storage.CreateFilesystem(ctx, operations.PostStorageFilesystemsStorageRequestBody{
Data: operations.PostStorageFilesystemsStorageData{
Type: operations.PostStorageFilesystemsStorageTypeFilesystems,
Attributes: operations.PostStorageFilesystemsStorageAttributes{
Project: "proj_kjQwdE2bqYNVP",
Name: "my-data",
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"data": {
"id": "fs_AW6Q2D9lqKLpr",
"type": "filesystems",
"attributes": {
"name": "my-data",
"size_in_gb": 1500,
"created_at": "2025-07-16T18:37:09.000Z",
"project": {
"id": "proj_kjQwdE2bqYNVP",
"name": "Heavy Duty Leather Clock",
"slug": "heavy-duty-leather-clock",
"description": "Incredible Concrete Lamp",
"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": 1,
"virtual_machines": 0,
"vlans": 0
}
},
"team": {
"id": "team_7YZVxK842zilY8kll6lVTWbX8j5m",
"name": "552 Team",
"slug": "552-team",
"description": "552 Team",
"address": "524 Samuel Square, Port Abramfurt, UT 07649-3772",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}Show child attributes
Created
Show child attributes
Was this page helpful?