Skip to main content
PATCH
/
servers
/
{server_id}
Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";

const latitudesh = new Latitudesh({
  bearer: process.env["LATITUDESH_BEARER"] ?? "",
});

async function run() {
  const result = await latitudesh.servers.update({
    serverId: "sv_yQrJdNAGO30gv",
    requestBody: {
      data: {
        id: "sv_yQrJdNAGO30gv",
        type: "servers",
        attributes: {
          project: "proj_yQrJdNMGO30gv",
        },
      },
    },
  });

  console.log(result);
}

run();
{
  "data": {
    "id": "sv_yQrJdNAGO30gv",
    "type": "servers",
    "attributes": {
      "tags": [],
      "hostname": "Lightweight Wooden Knife",
      "label": "136877NODEKM",
      "price": 599,
      "role": "Bare Metal",
      "primary_ipv4": "214.249.69.62",
      "primary_ipv6": "b0c8:139:6f83:7f0c:6e2:33a3:78e4:e03f",
      "status": "unknown",
      "ipmi_status": "Normal",
      "created_at": null,
      "scheduled_deletion_at": null,
      "locked": false,
      "rescue_allowed": false,
      "region": {
        "city": "Frankfurt 115",
        "country": "Germany 107",
        "site": {
          "id": "loc_aNmodjGyqbE8W",
          "name": "Frankfurt 115",
          "slug": "FRA96",
          "facility": "Frankfurt 115",
          "rack_id": "rack_byQrJdNJd30gv"
        }
      },
      "team": {
        "id": "team_YQZmYB34Nxso86ZgyKj2UEPEnyA",
        "name": "348 Team",
        "slug": "348-team",
        "description": "348 Team",
        "address": "51588 Goodwin Mission, Port Oswaldo, KS 14871-0638",
        "currency": {
          "id": "cur_GnzRD5xAqM5yw",
          "code": "agd",
          "name": "daznioxpdspfbdbvvikg",
          "currency_id": null
        },
        "status": "verified",
        "feature_flags": [],
        "limits": {
          "bare_metal": null,
          "bare_metal_gpu": 1,
          "virtual_machine": null,
          "virtual_machine_gpu": 3,
          "database": null,
          "filesystem": null,
          "block_storage": null
        }
      },
      "project": {
        "id": "proj_yQrJdNMGO30gv",
        "name": "Awesome Wool Computer",
        "slug": "awesome-wool-computer",
        "description": "Practical Rubber Shirt",
        "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_3YjJOLLyOvZ87",
        "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