Skip to main content
PATCH
/
servers
/
{server_id}
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.update(server_id="sv_3YjJOLLNOvZ87", id="sv_81EVOtR1N4J2Z", data={
        "id": "sv_3YjJOLLNOvZ87",
        "type": latitudesh_python_sdk.UpdateServerServersRequestApplicationJSONType.SERVERS,
        "attributes": {},
    })

    # Use the SDK ...
{
  "data": {
    "id": "sv_aNmodjGyqbE8W",
    "type": "servers",
    "attributes": {
      "tags": [],
      "hostname": "Enormous Copper Hat",
      "label": "318187NODEHH",
      "price": 599,
      "role": "Bare Metal",
      "primary_ipv4": "130.50.220.233",
      "primary_ipv6": "cb26:be3e:ec79:5115:c6d5:d41b:b4f4:9593",
      "status": "unknown",
      "ipmi_status": "Normal",
      "created_at": null,
      "scheduled_deletion_at": null,
      "locked": false,
      "rescue_allowed": false,
      "region": {
        "city": "Frankfurt",
        "country": "Germany",
        "site": {
          "id": "loc_w49QDBa5qagKb",
          "name": "Frankfurt",
          "slug": "FRA",
          "facility": "Frankfurt",
          "rack_id": "rack_byQrJdNJd30gv"
        }
      },
      "team": {
        "id": "team_8yZmmmBZ5kuKeepJEE5JFaykBrr",
        "name": "310 Team",
        "slug": "310-team",
        "description": "310 Team",
        "address": "Apt. 492 6356 Hyatt Mountains, Skilesville, TN 12908-1951",
        "currency": {
          "id": "cur_e8pKq015DWAob",
          "code": "ziy",
          "name": "zqqoluypkfiezetqkngf",
          "currency_id": null
        },
        "status": "verified",
        "feature_flags": []
      },
      "project": {
        "id": "proj_aNmodjoyqbE8W",
        "name": "Practical Plastic Lamp",
        "slug": "practical-plastic-lamp",
        "description": "Ergonomic Leather Hat",
        "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": 1,
          "storages": 0,
          "virtual_machines": 0,
          "vlans": 0
        }
      },
      "plan": {
        "id": "plan_k0Ryqvz1qW36X",
        "name": "c2.large.arm",
        "slug": "c2-large-arm",
        "billing": "hourly"
      },
      "interfaces": [],
      "operating_system": {},
      "specs": {
        "cpu": "",
        "disk": "",
        "ram": "",
        "nic": "",
        "gpu": null
      }
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

server_id
string
required

Body

data
object
Example:
{
"data": {
"id": "sv_81EVOtR1N4J2Z",
"type": "servers",
"attributes": { "hostname": "new-hostname", "tags": [] }
}
}

Response

200 - application/vnd.api+json

Success

data
object
meta
object
I