HomeDocumentationAPI Reference
Log In
API Reference

Get all hosts

Gets a list of the hosts in the system. Results are paginated with the page and size parameters, and the more_results property of the response indicates whether further pages are available. NOTE: almost all uses of this function should use the ?summary=true parameter; the raw call without a summary parameter or with ?summary=false exists only for backward compatability.

Query Params
boolean
Defaults to false

When summary is false (the default, although not recommended for most uses of this API) the "raw host JSON" is returned for each host. When summary is true (recommended), a flat set of fields containing the main host details, as well as data from SSH hunter such as key counts, zone violations, duplicate keys, etc. (not found in the summary=false response).

integer

Only supported when summary=true. If present, restricts the host list data to the specific SSH key IDs. Only hosts with the requested SSH keys will be returned, and the SSH-related counts will only count the requested keys. When present, the top-level response object will include a key_names map providing the friendly names for each key that exists. While not modeled in this OpenAPI spec schema, this parameter accepts a comma-delimited list of multiple key IDs.

integer

Number of results per page. When summary=true, the default page size is 10,000 and the maximum is 100,000. When summary=false, the default page size is 100,000 and the maximum is 1,000,000. A value outside of the supported range is replaced with the default page size.

integer
Defaults to 1

Page number of results to retrieve.

string
enum

Only supported when summary=true; any other value, or a sort without summary=true, is rejected with a 400. Selects the sort order of the host summary list. When absent, hosts are ordered fewest alerts first, then fewest errors, then hostname. severity puts the most severe hosts first: severity descending, then most alerts, then hostname, so the first page holds the worst hosts.

Allowed:
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json