---
title: "PUT /v1beta/{tenantId}/host/hosts/{hostId}"
method: PUT
path: "/v1beta/{tenantId}/host/hosts/{hostId}"
tags: ["Host"]
---

# PUT /v1beta/{tenantId}/host/hosts/{hostId}

`PUT /v1beta/{tenantId}/host/hosts/{hostId}`

Modify host details

## Request body

- HostUpdateSpec — Host is a consumer of volume from storage.
  - `hostName` string — Only numbers, letters, '-', '.' in ASCII characters are allowed.
  - `ip` string — IP address of the host, mandatory
  - `port` integer — Host access port
  - `accessMode` 'agent' | 'agentless' — The way to access host, system will access host to get more information and install agent if accessMode is 'agent'. 'port', 'username'and 'password' are requried in 'agent' mode.
  - `username` string — username to access Host
  - `password` string — password to access Host
  - `availabilityZones` string[], nullable
  - `initiators` object[], nullable — Initiator of host
    - `portName` string — Host initiator. Set the wwn, iSCSI type of the host whose FC type is set to iqn of the host
    - `protocol` 'iscsi' | 'fibre_channel' | 'nvmeof' — Initiator type FC or iSCSI

## Response `200`

OK

- HostRespSpec — Host is a consumer of volume from storage.
  - `id` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `tenantId` string
  - `hostName` string
  - `osType` string
  - `accessMode` string
  - `ip` string
  - `port` string
  - `username` string
  - `availabilityZones` string[]
  - `initiators` object[]
    - `portName` string
    - `protocol` 'iscsi' | 'fibre_channel' | 'nvmeof'

## Other responses

- `400` — BadRequest
- `401` — NotAuthorized
- `403` — Forbidden
- `404` — The resource does not exist
- `500` — An unexpected error occured.

## Changes

- **2020-02-07** `fe6600fe7546` — 1 warning
  - changed the pattern of the request property `hostName` from `^(([a-zA-Z0-9_-]|[a-zA-Z0-9_-][a-zA-Z0-9_-]*[a-zA-Z0-9_-]))*([A-Za-z0-9_-]|[A-Za-z0-9_-][A-Za-z0-9_-]*[A-Za-z0-9_-])$` to `^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$`
- **2020-02-07** `3ee778b81b92` — 1 warning, 1 info
  - changed the pattern of the request property `hostName` from `^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$` to `^(([a-zA-Z0-9_-]|[a-zA-Z0-9_-][a-zA-Z0-9_-]*[a-zA-Z0-9_-]))*([A-Za-z0-9_-]|[A-Za-z0-9_-][A-Za-z0-9_-]*[A-Za-z0-9_-])$`
  - the request property `availabilityZones` became nullable
- **2019-12-18** `5fa53bf5acd6` — 1 info
  - the request property `initiators` became nullable
- **2019-12-05** `8450d2e17372` — 2 breaking
  - added the pattern `^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$` to the request property `ip`
  - added the pattern `^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$` to the request property `hostName`
- …earlier changes not shown

[Full history](https://skmtc.dev/sodafoundation/apis/soda-api/changes/v1beta/:tenantId/host/hosts/:hostId/put.md)

---

[API](https://skmtc.dev/sodafoundation/apis/soda-api.md) · [All operations](https://skmtc.dev/sodafoundation/apis/soda-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sodafoundation/apis/soda-api/revisions/62ce0f6c94b4?raw)
