logs

get/api/projects/{project_id}/logs/sampling_rules/{id}/

Request

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

Path parameters

idstring uuid required

A UUID string identifying this logs exclusion rule.

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/.

Response

idstring uuid required

Unique identifier for this sampling rule.

namestring required

User-visible label for this rule.

enabledboolean

When false, the rule is ignored by ingestion and listing UIs that show active rules only.

priorityinteger nullable

Lower numbers are evaluated first; the first matching rule wins. Omit to append after existing rules.

rule_type'severity_sampling' | 'path_drop' | 'rate_limit' required
  • severity_sampling - Severity-based reduction
  • path_drop - Path exclusion
  • rate_limit - Rate limit
scope_servicestring nullable

Optional legacy service-name scope; new rules use config.filter_group for matching instead.

scope_path_patternstring nullable

Optional regex matched against a path-like log attribute when present.

scope_attribute_filtersobject[]

Optional list of predicates over string attributes, e.g. [{"key":"http.route","op":"eq","value":"/api"}].

configunknown required
versioninteger required

Incremented on each update for worker cache coherency.

created_byinteger required
created_atstring date-time required
updated_atstring date-time nullable required

Changes

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