provider hog_functionshog_functions GET
/api/environments/{environment_id}/hog_functions/{id}/metrics/ @utdk/posthog
/api/environments/{environment_id}/hog_functions/{id}/metrics/ environments_hog_functions_metrics_retrieve
- after query
- Start of the time range. Accepts relative formats like '-7d', '-24h' or ISO 8601 timestamps. Defaults to '-7d'.
- string
- before query
- End of the time range. Same format as 'after'. Defaults to now.
- string
- breakdown_by query
- Group the series by metric 'name' or 'kind'. Defaults to 'kind'. * `name` - name * `kind` - kind
- enum: name, kind
- environment_id path required
- Deprecated. Use /api/projects/{project_id}/ instead.
- string
- id path required
- A UUID string identifying this hog function.
- string
- instance_id query
- Filter metrics to a specific execution instance.
- string
- interval query
- Time bucket size for the series. One of: hour, day, week. Defaults to 'day'. * `hour` - hour * `day` - day * `week` - week
- enum: hour, day, week
- kind query
- Comma-separated metric kinds to filter by, e.g. 'success,failure'.
- string
- name query
- Comma-separated metric names to filter by.
- string
Try it
Authentication
Configure credentials for PostHog API
Code snippet
Updates live as you fill in the form above.
TypeScript
import posthog from '@utdk/posthog';
await posthog.environmentsHogFunctionsMetricsRetrieve({
"after": "-7d",
"breakdown_by": "kind",
"interval": "day"
})