Skip to main content
POST
/
servers
/
{server_id}
/
reinstall
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    latitudesh.servers.reinstall(server_id="sv_WeGoqAWNOP7nz", data={
        "type": latitudesh_python_sdk.CreateServerReinstallServersType.REINSTALLS,
        "attributes": {
            "operating_system": latitudesh_python_sdk.CreateServerReinstallServersOperatingSystem.UBUNTU_22_04_X64_LTS,
            "hostname": "BRC1",
            "partitions": [
                {
                    "size_in_gb": 300,
                    "path": "/",
                    "filesystem_type": "ext4",
                },
            ],
            "ssh_keys": [
                "35",
            ],
            "user_data": 10,
            "raid": latitudesh_python_sdk.CreateServerReinstallServersRaid.RAID_1,
            "ipxe": "https://some-host.com/image.ipxe",
        },
    })

    # Use the SDK ...
{}

Authorizations

Authorization
string
header
required

Path Parameters

server_id
string
required

Body

data
object
required

Response

201 - application/vnd.api+json

Created

The response is of type file.

I