---
title: "Get host by id"
method: GET
path: "/defender/hosts/{id}"
tags: ["defender"]
---

# Get host by id

`GET /defender/hosts/{id}`

Returns the host with the given id, if it exists

## Response `200`

successful operation

- DefenderEntry
  - `id` string
  - `ip` string
  - `score` integer — the score increases whenever a violation is detected, such as an attempt to log in using an incorrect password or invalid username. If the score exceeds the configured threshold, the IP is banned. Omitted for banned IPs
  - `ban_time` string, date-time — date time until the IP is banned. For already banned hosts, the ban time is increased each time a new violation is detected. Omitted if the IP is not banned

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `default` — Unexpected Error

---

[API](https://skmtc.net/kanton-bern/apis/sftpgo.md) · [All operations](https://skmtc.net/kanton-bern/apis/sftpgo/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kanton-bern/sftpgo/revisions/d8d616a479b0/schema)
