Pulse

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

Endpoints

GET
POST
GET
PATCH
DELETE
GET
GET
POST

List all pulse brief configs

Required API key scopes

project:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"focus_prompt": "string",
"anchors": {
"dashboards": [
0
],
"insights": [
"string"
]
},
"settings": {
"min_abs_change_pct": 1,
"min_baseline_value": 1000000,
"max_anchor_insights": 1,
"fallback_dashboard_count": 1,
"confidence_threshold": 1,
"max_opportunities": 1,
"max_annotations": 1
},
"enabled": true,
"deleted": true,
"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"
}
]
}

Create pulse brief configs

Required API key scopes

project:write

Request parameters

  • name
    string
  • focus_prompt
    string
  • anchors
  • settings
  • enabled
    boolean
  • deleted
    boolean

Response


Example request

POST /api/projects/:project_id/pulse/brief_configs
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/pulse/brief_configs/\
-d name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"focus_prompt": "string",
"anchors": {
"dashboards": [
0
],
"insights": [
"string"
]
},
"settings": {
"min_abs_change_pct": 1,
"min_baseline_value": 1000000,
"max_anchor_insights": 1,
"fallback_dashboard_count": 1,
"confidence_threshold": 1,
"max_opportunities": 1,
"max_annotations": 1
},
"enabled": true,
"deleted": true,
"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"
}

Retrieve pulse brief configs

Required API key scopes

project:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"focus_prompt": "string",
"anchors": {
"dashboards": [
0
],
"insights": [
"string"
]
},
"settings": {
"min_abs_change_pct": 1,
"min_baseline_value": 1000000,
"max_anchor_insights": 1,
"fallback_dashboard_count": 1,
"confidence_threshold": 1,
"max_opportunities": 1,
"max_annotations": 1
},
"enabled": true,
"deleted": true,
"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"
}

Update pulse brief configs

Required API key scopes

project:write

Path parameters

  • id
    string

Request parameters

  • name
    string
  • focus_prompt
    string
  • anchors
  • settings
  • enabled
    boolean
  • deleted
    boolean

Response


Example request

PATCH /api/projects/:project_id/pulse/brief_configs/:id
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/pulse/brief_configs/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"focus_prompt": "string",
"anchors": {
"dashboards": [
0
],
"insights": [
"string"
]
},
"settings": {
"min_abs_change_pct": 1,
"min_baseline_value": 1000000,
"max_anchor_insights": 1,
"fallback_dashboard_count": 1,
"confidence_threshold": 1,
"max_opportunities": 1,
"max_annotations": 1
},
"enabled": true,
"deleted": true,
"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"
}

Delete pulse brief configs

Required API key scopes

project:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/pulse/brief_configs/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/pulse/brief_configs/:id/

Example response

Status 204 No response body

List all pulse briefs

Required API key scopes

project:readannotation:readsubscription:readalert:readinsight:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"config": "4de5a1b6-f730-4513-9ebe-16895971a32d",
"status": "generating",
"trigger": "on_demand",
"period": {
"period_type": "last_n_days",
"days": 1
},
"sources_used": [
"string"
],
"error": "string",
"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"
}
]
}

Retrieve pulse briefs

Required API key scopes

project:readannotation:readsubscription:readalert:readinsight:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"config": "4de5a1b6-f730-4513-9ebe-16895971a32d",
"status": "generating",
"trigger": "on_demand",
"period": {
"period_type": "last_n_days",
"days": 1
},
"sections": [
{
"kind": "string",
"title": "string",
"markdown": "string",
"citations": [
{
"type": "string",
"ref": "string",
"label": "string",
"url": "string"
}
],
"confidence": 0.1
}
],
"sources_used": [
"string"
],
"error": "string",
"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"
}

Create pulse briefs generate

Required API key scopes

project:writeannotation:readsubscription:readalert:readinsight:read

Request parameters

  • config_id
    string | null
  • period

Response


Example request

POST /api/projects/:project_id/pulse/briefs/generate
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/pulse/briefs/generate/\
-d config_id="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"config": "4de5a1b6-f730-4513-9ebe-16895971a32d",
"status": "generating",
"trigger": "on_demand",
"period": {
"period_type": "last_n_days",
"days": 1
},
"sections": [
{
"kind": "string",
"title": "string",
"markdown": "string",
"citations": [
{
"type": "string",
"ref": "string",
"label": "string",
"url": "string"
}
],
"confidence": 0.1
}
],
"sources_used": [
"string"
],
"error": "string",
"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"
}
Status 409 A generation for this brief is already in progress
Status 500 Dispatch to the generation workflow failed; the brief is marked failed