Authorizations
Path Parameters
Body
Response
201 - application/vnd.api+json
Created
The response is of type file.
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.Servers.Reinstall(ctx, "sv_Z8rodmJGq1jLB", operations.CreateServerReinstallServersRequestBody{
Data: operations.CreateServerReinstallServersData{
Type: operations.CreateServerReinstallServersTypeReinstalls,
Attributes: &operations.CreateServerReinstallServersAttributes{
OperatingSystem: operations.CreateServerReinstallServersOperatingSystemIpxe.ToPointer(),
Hostname: latitudeshgosdk.Pointer("BRC1"),
Ipxe: latitudeshgosdk.Pointer("https://some-host.com/image.ipxe"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}{}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.Servers.Reinstall(ctx, "sv_Z8rodmJGq1jLB", operations.CreateServerReinstallServersRequestBody{
Data: operations.CreateServerReinstallServersData{
Type: operations.CreateServerReinstallServersTypeReinstalls,
Attributes: &operations.CreateServerReinstallServersAttributes{
OperatingSystem: operations.CreateServerReinstallServersOperatingSystemIpxe.ToPointer(),
Hostname: latitudeshgosdk.Pointer("BRC1"),
Ipxe: latitudeshgosdk.Pointer("https://some-host.com/image.ipxe"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}{}Show child attributes
Created
The response is of type file.
Was this page helpful?