---
title: "List hosts with IP, groups, and optional stats"
method: GET
path: "/api/hosts"
tags: ["Scoped API - Hosts"]
---

# List hosts with IP, groups, and optional stats

`GET /api/hosts`

Retrieve a list of all hosts with their IP addresses and associated host groups. Use include=stats to add package update counts (updates_count, security_updates_count, total_packages) to each host. Requires Basic Auth with scoped credentials (host:get permission).

## Query parameters

- `hostgroup` string
- `include` string

## Response `200`

OK

- object

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.dev/patchmon/apis/patchmon-integration-api.md) · [All operations](https://skmtc.dev/patchmon/apis/patchmon-integration-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/patchmon/patchmon-integration-api/revisions/279031113463/schema)
