Hog

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

POST
POST
GET
GET
GET
GET
GET
PATCH

Create hog functions enable backfills

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • type
  • name
    string
  • description
    string
  • enabled
    boolean
  • deleted
    boolean
  • hog
    string
  • inputs_schema
    Click to open
    array
  • inputs
    object
  • filters
  • masking
  • mappings
    Click to open
    array
  • icon_url
    string
  • template_id
    string
  • execution_order
    integer
  • _create_in_folder
    string

Example request

POST /api/projects/:project_id/hog_functions/:id/enable_backfills
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/enable_backfills/\
-d type=undefined

Example response

Status 200 No response body

Create hog functions enable backfills

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • type
  • name
    string
  • description
    string
  • enabled
    boolean
  • deleted
    boolean
  • hog
    string
  • inputs_schema
    Click to open
    array
  • inputs
    object
  • filters
  • masking
  • mappings
    Click to open
    array
  • icon_url
    string
  • template_id
    string
  • execution_order
    integer
  • _create_in_folder
    string

Example request

POST /api/projects/:project_id/hog_functions/:id/enable_backfills
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/enable_backfills/\
-d type=undefined

Example response

Status 200 No response body

Create hog functions invocations

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • type
  • name
    string
  • description
    string
  • enabled
    boolean
  • deleted
    boolean
  • hog
    string
  • inputs_schema
    Click to open
    array
  • inputs
    object
  • filters
  • masking
  • mappings
    Click to open
    array
  • icon_url
    string
  • template_id
    string
  • execution_order
    integer
  • _create_in_folder
    string

Example request

POST /api/projects/:project_id/hog_functions/:id/invocations
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/invocations/\
-d type=undefined

Example response

Status 200 No response body

Create hog functions invocations

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • type
  • name
    string
  • description
    string
  • enabled
    boolean
  • deleted
    boolean
  • hog
    string
  • inputs_schema
    Click to open
    array
  • inputs
    object
  • filters
  • masking
  • mappings
    Click to open
    array
  • icon_url
    string
  • template_id
    string
  • execution_order
    integer
  • _create_in_folder
    string

Example request

POST /api/projects/:project_id/hog_functions/:id/invocations
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/invocations/\
-d type=undefined

Example response

Status 200 No response body

Retrieve hog functions logs

Path parameters

  • id
    string
  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/:id/logs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/logs/

Example response

Status 200 No response body

Retrieve hog functions logs

Path parameters

  • id
    string
  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/:id/logs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/logs/

Example response

Status 200 No response body

Retrieve hog functions metrics

Path parameters

  • id
    string
  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/:id/metrics
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/metrics/

Example response

Status 200 No response body

Retrieve hog functions metrics

Path parameters

  • id
    string
  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/:id/metrics
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/metrics/

Example response

Status 200 No response body

Retrieve hog functions metrics totals

Path parameters

  • id
    string
  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/:id/metrics/totals
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/metrics/totals/

Example response

Status 200 No response body

Retrieve hog functions metrics totals

Path parameters

  • id
    string
  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/:id/metrics/totals
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/:id/metrics/totals/

Example response

Status 200 No response body

Retrieve hog functions icon

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/icon
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/icon/

Example response

Status 200 No response body

Retrieve hog functions icon

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/icon
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/icon/

Example response

Status 200 No response body

Retrieve hog functions icons

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/icons
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/icons/

Example response

Status 200 No response body

Retrieve hog functions icons

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/hog_functions/icons
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/icons/

Example response

Status 200 No response body

Update hog functions rearrange

Update the execution order of multiple HogFunctions.

Path parameters

  • project_id
    string

Request parameters

  • type
  • name
    string
  • description
    string
  • enabled
    boolean
  • deleted
    boolean
  • hog
    string
  • inputs_schema
    Click to open
    array
  • inputs
    object
  • filters
  • masking
  • mappings
    Click to open
    array
  • icon_url
    string
  • template_id
    string
  • execution_order
    integer
  • _create_in_folder
    string

Example request

PATCH /api/projects/:project_id/hog_functions/rearrange
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/rearrange/\
-d type=undefined

Example response

Status 200 No response body

Update hog functions rearrange

Update the execution order of multiple HogFunctions.

Path parameters

  • project_id
    string

Request parameters

  • type
  • name
    string
  • description
    string
  • enabled
    boolean
  • deleted
    boolean
  • hog
    string
  • inputs_schema
    Click to open
    array
  • inputs
    object
  • filters
  • masking
  • mappings
    Click to open
    array
  • icon_url
    string
  • template_id
    string
  • execution_order
    integer
  • _create_in_folder
    string

Example request

PATCH /api/projects/:project_id/hog_functions/rearrange
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/hog_functions/rearrange/\
-d type=undefined

Example response

Status 200 No response body

Community questions

Questions about this page? or post a community question.