logs

post/api/projects/{project_id}/logs/patterns/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/logs/patterns/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

Response

source'stored_patterns' | 'body_mining'
  • stored_patterns - stored_patterns
  • body_mining - body_mining
pattern_versioninteger nullable

Stored pattern version used. Null for body mining.

pattern_coverage_pctnumber double nullable

Percentage of all matching rows with a nonempty pattern at the selected version. Null for body mining.

represented_countinteger nullable

Exact rows represented by the returned stored-pattern groups. Null for body mining.

remainder_countinteger nullable

Matching rows outside returned groups, including other versions, unstamped rows and the long tail. Null for body mining.

scanned_countinteger required

Rows scanned: the sample size for body mining, or the full matching count for stored-pattern aggregation.

total_countinteger required

Total log rows matching the filters in the window, before sampling. Use with scanned_count to scale per-pattern counts when sampled is true.

sampledboolean required

True when the window held more rows than the sample cap, so patterns were mined from a deterministic, evenly-distributed sample rather than every matching row.

sample_coverage_pctnumber double required

Share of the window's log rows that were eligible for sampling (0–100). Below 100, the scan was bounded to evenly-spaced time slices across the window to keep the query within its execution budget; rows outside the slices could not appear in the sample.

Changes

No recorded changes to this operation across all 1 revision of this API.