Hog functions
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
GET | |
GET | |
GET | |
GET | |
GET | |
PATCH |
List all hog functions
Required API key scopes
hog_function:readPath parameters
- project_idstring
Query parameters
- created_atstring
- created_byinteger
- enabledboolean
- idstring
- limitinteger
- offsetinteger
- searchstring
- typearray
- updated_atstring
Response
Example request
GET /api /projects /:project_id /hog_functionsExample response
Status 200
RESPONSE
Create hog functions
Required API key scopes
hog_function:writePath parameters
- project_idstring
Request parameters
- type
- namestring
- descriptionstring
- enabledboolean
- deletedboolean
- hogstring
- inputs_schemaarray
- inputsobject
- filters
- masking
- mappingsarray
- icon_urlstring
- template_idstring
- execution_orderinteger
- _create_in_folderstring
Response
Example request
POST /api /projects /:project_id /hog_functionsExample response
Status 201
RESPONSE
Retrieve hog functions
Required API key scopes
hog_function:readPath parameters
- idstring
- project_idstring
Response
Example request
GET /api /projects /:project_id /hog_functions /:idExample response
Status 200
RESPONSE
Update hog functions
Required API key scopes
hog_function:writePath parameters
- idstring
- project_idstring
Request parameters
- type
- namestring
- descriptionstring
- enabledboolean
- deletedboolean
- hogstring
- inputs_schemaarray
- inputsobject
- filters
- masking
- mappingsarray
- icon_urlstring
- template_idstring
- execution_orderinteger
- _create_in_folderstring
Response
Example request
PATCH /api /projects /:project_id /hog_functions /:idExample response
Status 200
RESPONSE
Delete hog functions
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Required API key scopes
hog_function:writePath parameters
- idstring
- project_idstring
Example request
DELETE /api /projects /:project_id /hog_functions /:idExample response
Status 405 No response body
Create hog functions broadcast
Path parameters
- idstring
- project_idstring
Request parameters
- type
- namestring
- descriptionstring
- enabledboolean
- deletedboolean
- hogstring
- inputs_schemaarray
- inputsobject
- filters
- masking
- mappingsarray
- icon_urlstring
- template_idstring
- execution_orderinteger
- _create_in_folderstring
Example request
POST /api /projects /:project_id /hog_functions /:id /broadcastExample response
Status 200 No response body
Create hog functions invocations
Path parameters
- idstring
- project_idstring
Request parameters
- type
- namestring
- descriptionstring
- enabledboolean
- deletedboolean
- hogstring
- inputs_schemaarray
- inputsobject
- filters
- masking
- mappingsarray
- icon_urlstring
- template_idstring
- execution_orderinteger
- _create_in_folderstring
Example request
POST /api /projects /:project_id /hog_functions /:id /invocationsExample response
Status 200 No response body
Retrieve hog functions logs
Path parameters
- idstring
- project_idstring
Example request
GET /api /projects /:project_id /hog_functions /:id /logsExample response
Status 200 No response body
Retrieve hog functions metrics
Path parameters
- idstring
- project_idstring
Example request
GET /api /projects /:project_id /hog_functions /:id /metricsExample response
Status 200 No response body
Retrieve hog functions metrics totals
Path parameters
- idstring
- project_idstring
Example request
GET /api /projects /:project_id /hog_functions /:id /metrics /totalsExample response
Status 200 No response body
Retrieve hog functions icon
Path parameters
- project_idstring
Example request
GET /api /projects /:project_id /hog_functions /iconExample response
Status 200 No response body
Retrieve hog functions icons
Path parameters
- project_idstring
Example request
GET /api /projects /:project_id /hog_functions /iconsExample response
Status 200 No response body
Update hog functions rearrange
Update the execution order of multiple HogFunctions.
Path parameters
- project_idstring
Request parameters
- type
- namestring
- descriptionstring
- enabledboolean
- deletedboolean
- hogstring
- inputs_schemaarray
- inputsobject
- filters
- masking
- mappingsarray
- icon_urlstring
- template_idstring
- execution_orderinteger
- _create_in_folderstring
Example request
PATCH /api /projects /:project_id /hog_functions /rearrangeExample response
Status 200 No response body
PostHog is an all-in-one developer platform for building successful products. We provide product analytics, web analytics, session replay, error tracking,feature flags, experiments, surveys, LLM analytics, data warehouse, CDP, and anAI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.