Skip to main content
POST
/
v1
/
logs
/
aggregate
cURL
curl --request POST \
  --url https://api.qyl.dev/v1/logs/aggregate \
  --header 'Content-Type: application/json' \
  --data '
{
  "aggregation": {
    "group_by": [
      "<string>"
    ],
    "function": "count",
    "field": "<string>",
    "time_bucket": "1s",
    "top_n": 123
  },
  "query": {
    "query": "<string>",
    "severity_min": 0,
    "service_name": "<string>",
    "trace_id": "0af7651916cd43dd8448eb211c80319c",
    "span_id": "b7ad6b7169203331",
    "time_start": "2023-11-07T05:31:56Z",
    "time_end": "2023-11-07T05:31:56Z",
    "attribute_filters": [
      {
        "key": "<string>",
        "operator": "eq",
        "value": "<string>"
      }
    ],
    "limit": 5000,
    "order_by": "timestamp_asc"
  }
}
'
{
  "results": [
    {
      "key": "<string>",
      "value": 123,
      "count": 1,
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ],
  "total_count": 1
}

Body

application/json

Log aggregation request

aggregation
object
required

Aggregation specification

query
object

Query filters

Response

The request has succeeded.

Log aggregation response

results
object[]
required

Aggregation results

total_count
integer<int64>
required

Total matching logs

Required range: x >= 0