---
title: "Update Host"
method: PATCH
path: "/admin/hosts/{host_id}"
---

# Update Host

`PATCH /admin/hosts/{host_id}`

## Request

- Base URL: `https://api.xhostd.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xhostd.com/admin/hosts/{host_id}`
- Auth: none declared

Repoint a host's git endpoint / set-or-clear its machine class (admin).

Only the fields present in the request body are patched, so a
``machine_class``-only PATCH leaves ``git_endpoint`` untouched and
vice versa. The git endpoint is NOT NULL: it can be repointed but
never cleared (400). A body that names any other field, such as the
retired ``db_endpoint``, is refused (422) and changes nothing. No
PATCH moves ``hosts.overlay_ip``.

## Path parameters

- `host_id` string, uuid, required

## Headers

- `authorization` string, nullable

## Request body

- UpdateHostRequest
  - `git_endpoint` string, nullable
  - `machine_class` string, nullable

## Response `200`

Successful Response

- HostInfo
  - `id` string, uuid, required
  - `name` string, required
  - `public_fqdn` string, required
  - `agent_endpoint` string, required
  - `enrollment_state` string, required
  - `last_seen_at` string, date-time, nullable, required
  - `overlay_ip` string, required
  - `git_endpoint` string, required
  - `machine_class` string, nullable, required
  - `mem_budget_mb` integer, nullable, required
  - `reserved_mem_mb` integer, required
  - `users_by_plan` object, required
  - `user_count` integer, required
  - `app_count` integer, required
  - `running_channels` integer, required
  - `total_channels` integer, required
  - `resident_databases` integer, required
  - `code_stamp` object, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xhostd/apis/xhostd-public.md) · [All operations](https://skmtc.dev/xhostd/apis/xhostd-public/llms.txt) · [OpenAPI document](https://skmtc.dev/xhostd/apis/xhostd-public/revisions/bf439c4d1789?raw)
