---
title: "List host field values"
method: GET
path: "/api/v1/hosts/field-values/{field}"
tags: ["Hosts", "internal"]
---

# List host field values

`GET /api/v1/hosts/field-values/{field}`

## Request

- Base URL: `https://app.scanopy.net`
- URL: `https://app.scanopy.net/api/v1/hosts/field-values/{field}`
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `session_id`

Every distinct value of one Host field across the Hosts the caller can list, with how many hold each. Takes the list's filters; ignores pagination, search and ordering.

## Path parameters

- `field` 'created_at' | 'name' | 'hostname' | 'updated_at' | 'virtualized_by' | 'site_id' | 'interface_ip' | 'last_seen_at' | 'mac_address' | 'source' | 'manufacturer' | 'model' | 'sys_location' | 'os_family', required: Fields that hosts can be ordered/grouped by.

## Query parameters

- `site_ids` string[], nullable
- `ids` string[], nullable
- `virtualization_service_ids` string[], nullable
- `virtualization_service_names` string[], nullable
- `include_unvirtualized` boolean, nullable
- `service_names` string[], nullable
- `sources` EntitySourceDiscriminants[], nullable
- `manufacturers` string[], nullable
- `models` string[], nullable
- `sys_locations` string[], nullable
- `os_families` HostOsFamily[], nullable
- `credential_ids` string[], nullable
- `tag_ids` string[], nullable
- `tag_sets` string[], nullable
- `search` string, nullable
- `group_by` 'created_at' | 'name' | 'hostname' | 'updated_at' | 'virtualized_by' | 'site_id' | 'interface_ip' | 'last_seen_at' | 'mac_address' | 'source' | 'manufacturer' | 'model' | 'sys_location' | 'os_family': Fields that hosts can be ordered/grouped by.
- `order_by` 'created_at' | 'name' | 'hostname' | 'updated_at' | 'virtualized_by' | 'site_id' | 'interface_ip' | 'last_seen_at' | 'mac_address' | 'source' | 'manufacturer' | 'model' | 'sys_location' | 'os_family': Fields that hosts can be ordered/grouped by.
- `group_by_tag_group` string, uuid, nullable
- `order_by_tag_group` string, uuid, nullable
- `order_direction` 'asc' | 'desc': Direction for ORDER BY clauses.
- `limit` integer, nullable
- `offset` integer, nullable
- `at` string, date-time, nullable
- `stale` boolean, nullable
- `include_children` boolean, nullable

## Response `200`

Distinct values and their Host counts

- ApiResponseVecGroupCount: Envelope for a successful response. Failures are sent with a non-2xx status and an `ApiErrorResponse` body instead.
  - `data` object[]: The result payload. Omitted on failure.
    - `count` integer, required: How many rows fall in this group in total, not just on this page.
    - `value` string, nullable: The group's value, rendered as text. `null` for rows whose group key is NULL (the "ungrouped" bucket).
  - `error` string, nullable: Not sent on a successful response. Failure messages arrive in an `ApiErrorResponse`.
  - `meta` ApiMeta, required: API metadata included in all responses
    - `api_version` integer, required: API version (integer, increments on breaking changes)
    - `server_version` string, required: Server version (semver)
  - `success` boolean, required: Always `true` on a successful response.

## Other responses

- `400`: Unknown field

## Changes

- **2026-10-26** `c9d9d46d1ae8`: 1 info
  - api tag `internal` added
- **2026-10-25** `4937a397bee6`: 1 info
  - added the enum value `IpadOs` to the property `items/` of the `query` request parameter `os_families`
- **2026-10-23** `586bf8d22950`: 1 warning
  - deleted the `query` request parameter `guest_states`
- **2026-10-23** `b84d22dad539`: 1 info
  - added the new optional `query` request parameter `guest_states`
- **2026-10-11** `e5d9c243ed3c`: 3 breaking, 1 warning
  - removed the enum value `hidden` from the `path` request parameter `field`
  - removed the enum value `hidden` from the property `oneOf[#/components/schemas/HostOrderField]/` of the `query` request parameter `group_by`
  - removed the enum value `hidden` from the property `oneOf[#/components/schemas/HostOrderField]/` of the `query` request parameter `order_by`
  - deleted the `query` request parameter `hidden`

[Operation history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/hosts/field-values/:field/get.md)

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) - [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scanopy/apis/scanopy-api/revisions/966ba786bdb5?raw)
