---
title: "Sets the state of a host"
method: POST
path: "/config/endpointhoststate"
---

# Sets the state of a host

`POST /config/endpointhoststate`

Sets the state of a host which can have multiple endpoints

## Request body

- EndPointHostState
  - `hostName` string — Host name in CIDR
  - `epPort` integer — The end-point port (0 if not applicable)
  - `epProto` string — The end-point prototype (tcp,udp,sctp,icmp,http(s), empty if not applicable)
  - `state` string — Host state string ("green", "yellow", "red" )

## Response `204`

OK

## Other responses

- `400` — Malformed arguments for API call
- `401` — Invalid authentication credentials
- `403` — Capacity insufficient
- `404` — Resource not found
- `409` — Resource Conflict.
- `500` — Internal service error
- `503` — Maintenance mode

---

[API](https://skmtc.net/loxilb-io/apis/loxilb-rest-api.md) · [All operations](https://skmtc.net/loxilb-io/apis/loxilb-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loxilb-io/loxilb-rest-api/revisions/45e9f0a95af0/schema)
