---
title: "Find log patterns"
method: POST
path: "/v3/logs/patterns"
tags: ["Logs"]
---

# Find log patterns

`POST /v3/logs/patterns`

Find stable templates in a bounded sample of matching log bodies. The response reports sampling and truncation metadata and never returns an unbounded list of raw bodies.

## Request body

- FindLogPatternsRequest
  - `from` string, date-time, required
  - `to` string, date-time, required
  - `query` string
  - `filter_operator` string
  - `filters` TraceFilter[]
    - `field` string
    - `op` string
    - `values` string[]
  - `limit` integer — Maximum patterns to return. Defaults to 50.

## Response `200`

OK

- FindLogPatternsResponse
  - `object` string, required — Object discriminator; always "list".
  - `data` LogPattern[], required
    - `id` string, required — Stable hash of the normalized template.
    - `template` string, required
    - `count` string, required — Number of sampled records assigned to this pattern. This is exact when meta.truncated is false.
    - `percentage` number, double, required — Percentage of sampled records assigned to this pattern, from 0 to 100.
    - `first_seen` string, date-time, required
    - `last_seen` string, date-time, required
    - `sample_log_ids` string[], required — A bounded set of example record identifiers; raw bodies are not repeated.
    - `severity_summary` FacetValue[], required — Top severity and service values observed inside this pattern.
      - `value` string
      - `count` string
    - `service_summary` FacetValue[], required
      - `value` string
      - `count` string
    - `suggested_query` string — Bounded literal fragment that can be sent through SearchLogs to find representative raw records for this normalized pattern.
  - `meta` FindLogPatternsMeta, required
    - `request_id` string, required
    - `from` string, date-time, required
    - `to` string, date-time, required
    - `total_count` string, required — Exact number of records matching the request before bounded sampling.
    - `sampled_count` string, required
    - `truncated` boolean, required
    - `warnings` string[], required

---

[API](https://skmtc.net/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.net/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/versions/6a22c53a2580/schema)
