Heatmap

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

Endpoints

GET
GET

Retrieve environments heatmap screenshots content

Fetch the rendered screenshot image (JPEG bytes) for a saved heatmap at a given viewport width. Returns 202 with the saved-heatmap metadata while the screenshot is still being generated.

Required API key scopes

heatmap:read

Path parameters

  • id
    string

Query parameters

  • width
    integer

Example request

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

Example response

Status 200
Status 202
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"short_id": "string",
"name": "string",
"url": "http://example.com",
"data_url": "http://example.com",
"target_widths": null,
"type": "screenshot",
"status": "processing",
"has_content": true,
"snapshots": [
{
"width": 0,
"has_content": true
}
],
"deleted": true,
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"exception": "string"
}

Retrieve heatmap screenshots content

Fetch the rendered screenshot image (JPEG bytes) for a saved heatmap at a given viewport width. Returns 202 with the saved-heatmap metadata while the screenshot is still being generated.

Required API key scopes

heatmap:read

Path parameters

  • id
    string

Query parameters

  • width
    integer

Example request

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

Example response

Status 200
Status 202
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"short_id": "string",
"name": "string",
"url": "http://example.com",
"data_url": "http://example.com",
"target_widths": null,
"type": "screenshot",
"status": "processing",
"has_content": true,
"snapshots": [
{
"width": 0,
"has_content": true
}
],
"deleted": true,
"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"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"exception": "string"
}

Community questions

Questions about this page? or post a community question.