ScanopyScanopy
Hosts

List the values of a Host field

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.

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

Authorization

Authorization<token>

User API key (Bearer scp_u_...). Create in Platform > API Keys.

In: header

Path Parameters

field*string

The field whose values to count

Query Parameters

site_ids?array<>|

Filter by site ID. Repeat the parameter to pass several.

ids?array<>|

Filter by specific entity IDs (for selective loading)

virtualization_service_ids?array<>|

Filter by the service virtualizing the host. Repeat for several.

virtualization_service_names?array<string>|

Filter by the name of the service virtualizing the host, the value "Virtualized By" groups on. Repeat for several.

include_unvirtualized?|

true also returns hosts nothing virtualizes. Set on its own it returns only those — the "Not Virtualized" choice in the UI's filter.

service_names?array<string>|

Filter to hosts running a service with one of these names.

sources?array<>|

Filter by how the host came to exist (source.type). Repeat for several; Inferred alone lists the hosts only a neighbour advertised.

manufacturers?array<string>|

Filter by hardware manufacturer. Repeat for several.

models?array<string>|

Filter by hardware model. Repeat for several.

sys_locations?array<string>|

Filter by SNMP sysLocation. Repeat for several.

os_families?array<>|

Filter by operating system family. Repeat for several.

credential_ids?array<>|

Filter to hosts assigned one of these credentials. Repeat for several.

tag_ids?array<>|

Filter by tag IDs (returns hosts that have ANY of the specified tags)

tag_sets?array<string>|

Tag sets the host must hold one tag from each of. Each entry is a comma-separated list of tag ids; a host matches when it holds at least one tag of every entry. One entry per tag group the list is filtered by.

search?|

Free-text search. Case-insensitive substring match against the host's name, hostname, sysName, chassis id, serial number, asset tag and description, and against its IP addresses and the names of services running on it.

sysName and chassis id are in there because they are rungs of the title ladder: a host with no name of its own is shown under one of them, and a title you can read but cannot search for is a dead end.

group_by?|

Primary ordering field (used for grouping). Always sorts ASC to keep groups together.

order_by?|

Secondary ordering field (sorting within groups or standalone sort).

group_by_tag_group?|

Group by the tag each row holds from this tag group, in the group's tag order. Takes the place of group_by.

order_by_tag_group?|

Sort by the position of the tag each row holds from this tag group. Takes the place of order_by.

order_direction?|

Direction for order_by field (group_by always uses ASC).

limit?|

Maximum number of results to return (1-1000, default: 50). Use 0 for no limit.

offset?|

Number of results to skip. Default: 0.

at?|

As-of timestamp (ISO 8601). When set, returns SCD2 state as of this instant (snapshot view) instead of live state.

stale?|

true returns only hosts discovery hasn't observed within their site's staleness window; false returns only those it has. Omit for both. Evaluated per row against the host's own site's window.

include_children?|

false returns hosts with empty ports/services/interfaces. ip_addresses is always populated: the host's title can come from its address. The children dominate the payload, so callers that only need host identity — name pickers, id→name lookups, counts — should pass false. Defaults to true, so existing callers are unaffected.

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/hosts/field-values/created_at"
{
  "meta": {
    "api_version": 1,
    "server_version": "0.18.1"
  },
  "success": true,
  "data": [
    {
      "count": 0,
      "value": "string"
    }
  ],
  "error": "string"
}
{
  "meta": {
    "api_version": 1,
    "server_version": "0.18.1"
  },
  "success": true,
  "code": "string",
  "error": "string",
  "params": {
    "property1": null,
    "property2": null
  }
}