Skip to main content
POST
/
api
/
v1
/
detector
/
aggregation
aggregate detectors
curl --request POST \
  --url https://api.example.com/api/v1/detector/aggregation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "agg": [
    {
      "func": [
        "count",
        "1"
      ]
    }
  ],
  "where": "field1='value' and field2<>'value2'",
  "groupBy": [
    "<string>"
  ],
  "sort": [
    {
      "field": "timestamp",
      "order": "Asc"
    }
  ],
  "from": 0,
  "size": 10
}
EOF
[
  "<unknown>"
]

Documentation Index

Fetch the complete documentation index at: https://docs.extractor.live/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Authentication

Body

application/json
agg
object[]
required

Aggregation functions with fields to aggregate. Represent SQL 'select' in 'group by' query. !!!IMPORTANT!!! Use with caution, because usage with JOIN can require aggregate with 'distinct'

Minimum array length: 1
Example:
[{ "func": ["count", "1"] }]
where
string

Query string to search for data. Represent SQL 'where'

Example:

"field1='value' and field2<>'value2'"

groupBy
string[]

Group by parameter for aggregation query

sort
object[]

Sorting for the search

from
integer<int32>

Starting document offset

Required range: x >= 0
Example:

0

size
integer<int32>

The number of hits to return

Required range: 0 <= x <= 10000
Example:

10

Response

200 - application/json

OK