provider hog_functionshog_functions GET /api/projects/{project_id}/hog_functions/{id}/metrics/
@utdk/posthog /api/projects/{project_id}/hog_functions/{id}/metrics/
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
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
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
hogFunctionsMetricsRetrieve
GET/api/projects/{project_id}/hog_functions/{id}/metrics/

Parameters

required

A UUID string identifying this hog function.

required

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

Start of the time range. Accepts relative formats like '-7d', '-24h' or ISO 8601 timestamps. Defaults to '-7d'.

End of the time range. Same format as 'after'. Defaults to now.

Group the series by metric 'name' or 'kind'. Defaults to 'kind'. * `name` - name * `kind` - kind

Filter metrics to a specific execution instance.

Time bucket size for the series. One of: hour, day, week. Defaults to 'day'. * `hour` - hour * `day` - day * `week` - week

Comma-separated metric kinds to filter by, e.g. 'success,failure'.

Comma-separated metric names to filter by.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.hogFunctionsMetricsRetrieve({
  "after": "-7d",
  "breakdown_by": "kind",
  "interval": "day"
})