Hog functions
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
DELETE | |
POST | |
POST | |
GET | |
GET | |
GET | |
POST | |
GET | |
GET | |
PATCH |
Delete hog functions
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Path parameters
- idstring
Example request
DELETE /api /projects /:project_id /hog_functions /:idExample response
Status 405 No response body
Delete hog functions
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Path parameters
- idstring
Example request
DELETE /api /projects /:project_id /hog_functions /:idExample response
Status 405 No response body
Create hog functions enable backfills
Path parameters
- idstring
Request parameters
- type
- namestringnull
- descriptionstring
- enabledboolean
- deletedboolean
- hogstring
- inputs_schemaarray
- inputsobject
- filters
- masking
- mappingsarraynull
- icon_urlstringnull
- template_idstringnull
- execution_orderintegernull
- _create_in_folderstring
Example request
POST /api /projects /:project_id /hog_functions /:id /enable_backfillsExample response
Status 200 No response body
Create hog functions enable backfills
Path parameters
- idstring
Request parameters
- type
- namestringnull
- descriptionstring
- enabledboolean
- deletedboolean
- hogstring
- inputs_schemaarray
- inputsobject
- filters
- masking
- mappingsarraynull
- icon_urlstringnull
- template_idstringnull
- execution_orderintegernull
- _create_in_folderstring
Example request
POST /api /projects /:project_id /hog_functions /:id /enable_backfillsExample response
Status 200 No response body
Create hog functions invocations
Required API key scopes
hog_function:writePath parameters
- idstring
Request parameters
- configuration
- globalsobject
- clickhouse_eventobject
- mock_async_functionsbooleanDefault:
true - invocation_idstringnull
Response
Example request
POST /api /projects /:project_id /hog_functions /:id /invocationsExample response
Status 200
Create hog functions invocations
Required API key scopes
hog_function:writePath parameters
- idstring
Request parameters
- configuration
- globalsobject
- clickhouse_eventobject
- mock_async_functionsbooleanDefault:
true - invocation_idstringnull
Response
Example request
POST /api /projects /:project_id /hog_functions /:id /invocationsExample response
Status 200
Retrieve hog functions logs
Required API key scopes
hog_function:readPath parameters
- idstring
Query parameters
- afterstring
- beforestring
- instance_idstring
- levelstring
- limitintegerDefault:
50 - searchstring
Example request
GET /api /projects /:project_id /hog_functions /:id /logsExample response
Status 200 No response body
Retrieve hog functions logs
Required API key scopes
hog_function:readPath parameters
- idstring
Query parameters
- afterstring
- beforestring
- instance_idstring
- levelstring
- limitintegerDefault:
50 - searchstring
Example request
GET /api /projects /:project_id /hog_functions /:id /logsExample response
Status 200 No response body
Retrieve hog functions metrics
Required API key scopes
hog_function:readPath parameters
- idstring
Query parameters
- afterstringDefault:
-7d - beforestring
- breakdown_bystringDefault:
kindOne of:"name""kind" - instance_idstring
- intervalstringDefault:
dayOne of:"hour""day""week" - kindstring
- namestring
Response
Example request
GET /api /projects /:project_id /hog_functions /:id /metricsExample response
Status 200
Retrieve hog functions metrics
Required API key scopes
hog_function:readPath parameters
- idstring
Query parameters
- afterstringDefault:
-7d - beforestring
- breakdown_bystringDefault:
kindOne of:"name""kind" - instance_idstring
- intervalstringDefault:
dayOne of:"hour""day""week" - kindstring
- namestring
Response
Example request
GET /api /projects /:project_id /hog_functions /:id /metricsExample response
Status 200
Retrieve hog functions metrics totals
Required API key scopes
hog_function:readPath parameters
- idstring
Query parameters
- afterstringDefault:
-7d - beforestring
- breakdown_bystringDefault:
kindOne of:"name""kind" - instance_idstring
- intervalstringDefault:
dayOne of:"hour""day""week" - kindstring
- namestring
Response
Example request
GET /api /projects /:project_id /hog_functions /:id /metrics /totalsExample response
Status 200
Retrieve hog functions metrics totals
Required API key scopes
hog_function:readPath parameters
- idstring
Query parameters
- afterstringDefault:
-7d - beforestring
- breakdown_bystringDefault:
kindOne of:"name""kind" - instance_idstring
- intervalstringDefault:
dayOne of:"hour""day""week" - kindstring
- namestring
Response
Example request
GET /api /projects /:project_id /hog_functions /:id /metrics /totalsExample response
Status 200
Create hog functions rerun
Rerun past invocations of this hog function from their stored payloads.
The CDP worker reads matching rows from the hog_invocation_results
ClickHouse table, rehydrates the invocation from the stored
invocation_globals, and re-enqueues onto cyclotron. Each rerun
run reuses the original invocation_id with is_retry=1 set on the
new lifecycle row so the UI can surface that it was a rerun.
For source-webhook functions the worker strips request.headers from
the rehydrated globals before re-enqueuing (see the rerun paginator):
those headers carry the inbound sender's credentials, and replaying
them through a reconfigured function would let a write-access user
exfiltrate stored secrets.
Because rerun replays historical event/person/group data, it requires
person:read and group:read on top of hog_function:write.
Required API key scopes
hog_function:writeperson:readgroup:readPath parameters
- idstring
Request parameters
- filter
Response
Example request
POST /api /projects /:project_id /hog_functions /:id /rerunExample response
Status 200
Status 400
Create hog functions rerun
Rerun past invocations of this hog function from their stored payloads.
The CDP worker reads matching rows from the hog_invocation_results
ClickHouse table, rehydrates the invocation from the stored
invocation_globals, and re-enqueues onto cyclotron. Each rerun
run reuses the original invocation_id with is_retry=1 set on the
new lifecycle row so the UI can surface that it was a rerun.
For source-webhook functions the worker strips request.headers from
the rehydrated globals before re-enqueuing (see the rerun paginator):
those headers carry the inbound sender's credentials, and replaying
them through a reconfigured function would let a write-access user
exfiltrate stored secrets.
Because rerun replays historical event/person/group data, it requires
person:read and group:read on top of hog_function:write.
Required API key scopes
hog_function:writeperson:readgroup:readPath parameters
- idstring
Request parameters
- filter
Response
Example request
POST /api /projects /:project_id /hog_functions /:id /rerunExample response
Status 200
Status 400
Retrieve hog functions icon
Example request
GET /api /projects /:project_id /hog_functions /iconExample response
Status 200 No response body
Retrieve hog functions icon
Example request
GET /api /projects /:project_id /hog_functions /iconExample response
Status 200 No response body
Retrieve hog functions icons
Example request
GET /api /projects /:project_id /hog_functions /iconsExample response
Status 200 No response body
Retrieve hog functions icons
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.
Required API key scopes
hog_function:writeRequest parameters
- ordersobject
Example request
PATCH /api /projects /:project_id /hog_functions /rearrangeExample response
Status 200
Update hog functions rearrange
Update the execution order of multiple HogFunctions.
Required API key scopes
hog_function:writeRequest parameters
- ordersobject
Example request
PATCH /api /projects /:project_id /hog_functions /rearrange