Workflows

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

Endpoints

GET
POST
GET
PATCH
DELETE
GET
POST
GET
POST
GET
GET
GET
POST
POST
GET
POST
PATCH
DELETE
POST

List all environments hog flows

Required API key scopes

hog_flow:read

Query parameters

  • created_at
    string
  • created_by
    integer
  • id
    string
  • limit
    integer
  • offset
    integer
  • updated_at
    string

Response


Example request

GET /api/environments/:environment_id/hog_flows
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": null,
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": null,
"abort_action": "string",
"variables": null,
"billable_action_types": null
}
]
}

Create environments hog flows

Required API key scopes

hog_flow:write

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

POST /api/environments/:environment_id/hog_flows
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/environments/:environment_id/hog_flows/\
-d actions="array"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Retrieve environments hog flows

Required API key scopes

hog_flow:read

Path parameters

  • id
    string

Response


Example request

GET /api/environments/:environment_id/hog_flows/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Update environments hog flows

Required API key scopes

hog_flow:write

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

PATCH /api/environments/:environment_id/hog_flows/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Delete environments hog flows

Required API key scopes

hog_flow:write

Path parameters

  • id
    string

Example request

DELETE /api/environments/:environment_id/hog_flows/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/

Example response

Status 204 No response body

Retrieve environments hog flows batch jobs

Path parameters

  • id
    string

Response


Example request

GET /api/environments/:environment_id/hog_flows/:id/batch_jobs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/batch_jobs/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Create environments hog flows batch jobs

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

POST /api/environments/:environment_id/hog_flows/:id/batch_jobs
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/environments/:environment_id/hog_flows/:id/batch_jobs/\
-d actions="array"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Retrieve environments hog flows blocked runs

List workflow runs that were blocked by the dedup bug.

Path parameters

  • id
    string

Response


Example request

GET /api/environments/:environment_id/hog_flows/:id/blocked_runs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/blocked_runs/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Create environments hog flows invocations

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

POST /api/environments/:environment_id/hog_flows/: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/environments/:environment_id/hog_flows/:id/invocations/\
-d actions="array"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Retrieve environments hog flows logs

Required API key scopes

hog_flow:read

Path parameters

  • id
    string

Query parameters

  • after
    string
  • before
    string
  • instance_id
    string
  • level
    string
  • limit
    integer
    Default: 50
  • search
    string

Example request

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

Example response

Status 200 No response body

Retrieve environments hog flows metrics

Required API key scopes

hog_flow:read

Path parameters

  • id
    string

Query parameters

  • after
    string
    Default: -7d
  • before
    string
  • breakdown_by
    string
    Default: kind
    One of: "name""kind"
  • instance_id
    string
  • interval
    string
    Default: day
    One of: "hour""day""week"
  • kind
    string
  • name
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"labels": [
"string"
],
"series": [
{
"name": "string",
"values": [
0
]
}
]
}

Retrieve environments hog flows metrics totals

Required API key scopes

hog_flow:read

Path parameters

  • id
    string

Query parameters

  • after
    string
    Default: -7d
  • before
    string
  • breakdown_by
    string
    Default: kind
    One of: "name""kind"
  • instance_id
    string
  • interval
    string
    Default: day
    One of: "hour""day""week"
  • kind
    string
  • name
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"totals": {
"property1": 0,
"property2": 0
}
}

Create environments hog flows replay all blocked runs

Replay all blocked runs in a single bulk call to Node.

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

POST /api/environments/:environment_id/hog_flows/:id/replay_all_blocked_runs
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/environments/:environment_id/hog_flows/:id/replay_all_blocked_runs/\
-d actions="array"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Create environments hog flows replay blocked run

Replay a single blocked run. Django fetches the event, Node creates the invocation and writes the log.

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

POST /api/environments/:environment_id/hog_flows/:id/replay_blocked_run
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/environments/:environment_id/hog_flows/:id/replay_blocked_run/\
-d actions="array"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

List all environments hog flows schedules

Path parameters

  • id
    string

Query parameters

  • created_at
    string
  • created_by
    integer
  • id
    string
  • limit
    integer
  • offset
    integer
  • updated_at
    string

Response


Example request

GET /api/environments/:environment_id/hog_flows/:id/schedules
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/schedules/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rrule": "string",
"starts_at": "2019-08-24T14:15:22Z",
"timezone": "string",
"variables": null,
"status": "active",
"next_run_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Create environments hog flows schedules

Path parameters

  • id
    string

Query parameters

  • created_at
    string
  • created_by
    integer
  • id
    string
  • limit
    integer
  • offset
    integer
  • updated_at
    string

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

POST /api/environments/:environment_id/hog_flows/:id/schedules
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/environments/:environment_id/hog_flows/:id/schedules/\
-d actions="array"

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rrule": "string",
"starts_at": "2019-08-24T14:15:22Z",
"timezone": "string",
"variables": null,
"status": "active",
"next_run_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Update environments hog flows schedules

Path parameters

  • id
    string
  • schedule_id
    string

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

PATCH /api/environments/:environment_id/hog_flows/:id/schedules/:schedule_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/schedules/:schedule_id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Delete environments hog flows schedules

Path parameters

  • id
    string
  • schedule_id
    string

Example request

DELETE /api/environments/:environment_id/hog_flows/:id/schedules/:schedule_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/hog_flows/:id/schedules/:schedule_id/

Example response

Status 204 No response body

Create environments hog flows bulk delete

Request parameters

  • name
    string
  • description
    string
  • status
  • trigger
  • trigger_masking
  • conversion
  • exit_condition
  • edges
  • actions
    Click to open
    array
  • variables
    array

Response


Example request

POST /api/environments/:environment_id/hog_flows/bulk_delete
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/environments/:environment_id/hog_flows/bulk_delete/\
-d actions="array"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"version": 0,
"status": "draft",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"updated_at": "2019-08-24T14:15:22Z",
"trigger": null,
"trigger_masking": {
"ttl": 60,
"threshold": 0,
"hash": "string",
"bytecode": null
},
"conversion": null,
"exit_condition": "exit_on_conversion",
"edges": null,
"actions": [
{
"id": "string",
"name": "string",
"description": "",
"on_error": "continue",
"created_at": 0,
"updated_at": 0,
"filters": {
"source": "events",
"actions": [
{}
],
"events": [
{}
],
"data_warehouse": [
{}
],
"properties": [
{}
],
"bytecode": null,
"transpiled": null,
"filter_test_accounts": true,
"bytecode_error": "string"
},
"type": "string",
"config": null,
"output_variable": null
}
],
"abort_action": "string",
"variables": [
{
"property1": "string",
"property2": "string"
}
],
"billable_action_types": null
}

Community questions

Questions about this page? or post a community question.