facetQuery
POST {{app_url}}/api/facetQuery
Gets the most frequent values of a field in events matching your query. For example, the most frequent URLs accessed on your site, or the most frequent HTTP response codes.
Request Body
{"token"=>"{{log-read-token}}", "queryType"=>"facet", "filter"=>"serverHost = *", "field"=>"serverHost", "maxCount"=>1, "startTime"=>"4h", "endTime"=>"0h"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"executionTime":0,"cpuUsage":26,"values":[{"count":50248,"value":"scalyr-metalog"}],"matchCount":156516,"status":"success"}