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

# POST /v1beta/{tenantId}/host/hosts

`POST /v1beta/{tenantId}/host/hosts`

Creates host.

## Request body

- HostCreateSpec — Host is a consumer of volume from storage.
  - `osType` 'linux' | 'windows' | 'esxi', required
  - `hostName` string, required — Only numbers, letters, '-', '.' in ASCII characters are allowed.
  - `ip` string, required — IP address of the host, mandatory
  - `port` integer — Host access port
  - `accessMode` 'agent' | 'agentless', required — 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
- `500` — An unexpected error occured.

---

[API](https://skmtc.net/sodafoundation/apis/soda-api.md) · [All operations](https://skmtc.net/sodafoundation/apis/soda-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sodafoundation/soda-api/revisions/62ce0f6c94b4/schema)
