---
title: "PUT /api/host/{hostname}"
method: PUT
path: "/api/host/{hostname}"
tags: ["Host"]
---

# PUT /api/host/{hostname}

`PUT /api/host/{hostname}`

Update the specified host.
        Note, this is only supported when Ceph Orchestrator is enabled.
        :param hostname: The name of the host to be processed.
        :param update_labels: To update the labels.
        :param labels: List of labels.
        :param maintenance: Enter/Exit maintenance mode.
        :param force: Force enter maintenance mode.
        :param drain: Drain host

## Path parameters

- `hostname` string, required

## Request body

- object
  - `drain` boolean — Drain Host
  - `force` boolean — Force Enter Maintenance
  - `labels` string[] — Host Labels
  - `maintenance` boolean — Enter/Exit Maintenance
  - `update_labels` boolean — Update Labels

## Response `200`

Resource updated.

- object

## Other responses

- `202` — Operation is still executing. Please check the task queue.
- `400` — Operation exception. Please check the response body for details.
- `401` — Unauthenticated access. Please login first.
- `403` — Unauthorized access. Please check your permissions.
- `500` — Unexpected error. Please check the response body for the stack trace.

---

[API](https://skmtc.net/ceph/apis/ceph-rest-api.md) · [All operations](https://skmtc.net/ceph/apis/ceph-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ceph/ceph-rest-api/versions/b03ae23c3806/schema)
