Skip to main content
GET
Count matching hosts

Authorizations

X-API-Key
string
header
required

Infrawatch API key. Supply the complete key directly as the header value.

Query Parameters

q
string

InfraQL expression, limited to 8192 UTF-8 bytes after URL decoding. Omit for the dataset default query. String operators pair positive with negative: : contains and :~ does NOT contain; = is exact and != is not exact. =~ is a regular expression, which must be anchored with ^ and $ and begin with a literal prefix of at least three characters.

Maximum string length: 8192

Response

Host count. Exact unless the result set is large enough that it is estimated; read total_relation.

count
integer<int64>
required
Required range: 0 <= x <= 9007199254740991
query
string
required
Maximum string length: 8192
total_relation
enum<string>
required

eq when the count is exact. approx when the query filters on service content and matches more hosts than the exact cross-index count can enumerate, in which case the count is a distinct-host cardinality estimate that may fall on either side of the truth by a few percent. Only host counts can be estimated; service and DNS counts are always exact.

Available options:
eq,
approx