Product
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
GET | |
GET | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
GET | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
GET |
Create environments insights generate metadata
Generate an AI-suggested name and description for an insight based on its query configuration.
Required API key scopes
insight:writePath parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- namestring
- derived_namestring
- query
- orderinteger
- deletedboolean
- dashboardsarray
- descriptionstring
- tagsarray
- favoritedboolean
- _create_in_folderstring
Example request
POST /api /environments /:environment_id /insights /generate_metadataExample response
Status 200 No response body
Retrieve environments insights my last viewed
Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /insights /my_last_viewedExample response
Status 200 No response body
Retrieve environments insights trending
Returns trending insights based on view count in the last N days (default 7). Defaults to returning top 10 insights.
Path parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:environment_id /insights /trendingExample response
Status 200 No response body
Create environments insights viewed
Update insight view timestamps. Expects: {"insight_ids": [1, 2, 3, ...]}
Required API key scopes
insight:readPath parameters
- environment_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- namestring
- derived_namestring
- query
- orderinteger
- deletedboolean
- dashboardsarray
- descriptionstring
- tagsarray
- favoritedboolean
- _create_in_folderstring
Example request
POST /api /environments /:environment_id /insights /viewedExample response
Status 200 No response body
List all elements
Required API key scopes
element:readPath parameters
- project_idstring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /elementsExample response
Status 200
Create elements
Required API key scopes
element:writePath parameters
- project_idstring
Request parameters
- textstring
- tag_namestring
- attr_classarray
- hrefstring
- attr_idstring
- nth_childinteger
- nth_of_typeinteger
- attributes
- orderinteger
Response
Example request
POST /api /projects /:project_id /elementsExample response
Status 201
Retrieve elements
Required API key scopes
element:readPath parameters
- idinteger
- project_idstring
Response
Example request
GET /api /projects /:project_id /elements /:idExample response
Status 200
Update elements
Required API key scopes
element:writePath parameters
- idinteger
- project_idstring
Request parameters
- textstring
- tag_namestring
- attr_classarray
- hrefstring
- attr_idstring
- nth_childinteger
- nth_of_typeinteger
- attributes
- orderinteger
Response
Example request
PATCH /api /projects /:project_id /elements /:idExample response
Status 200
Delete elements
Required API key scopes
element:writePath parameters
- idinteger
- project_idstring
Example request
DELETE /api /projects /:project_id /elements /:idExample response
Status 204 No response body
Retrieve elements stats
The original version of this API always and only returned $autocapture elements If no include query parameter is sent this remains true. Now, you can pass a combination of include query parameters to get different types of elements Currently only $autocapture and $rageclick and $dead_click are supported
Required API key scopes
element:readPath parameters
- project_idstring
Example request
GET /api /projects /:project_id /elements /statsExample response
Status 200 No response body
Retrieve elements values
Required API key scopes
element:readPath parameters
- project_idstring
Example request
GET /api /projects /:project_id /elements /valuesExample response
Status 200 No response body
List all insights
DRF ViewSet mixin that gates coalesced responses behind permission checks.
The QueryCoalescingMiddleware attaches cached response data to request.META["_coalesced_response"] for followers. This mixin runs DRF's initial() (auth + permissions + throttling) before returning the cached response, ensuring the request is authorized.
Required API key scopes
insight:readPath parameters
- project_idstring
Query parameters
- basicboolean
- formatstringOne of:
"csv""json" - limitinteger
- offsetinteger
- refreshstringDefault:
force_cacheOne of:"async""async_except_on_cache_miss""blocking""force_async""force_blocking""force_cache""lazy_async" - short_idstring
Response
Example request
GET /api /projects /:project_id /insightsExample response
Status 200
Create insights
DRF ViewSet mixin that gates coalesced responses behind permission checks.
The QueryCoalescingMiddleware attaches cached response data to request.META["_coalesced_response"] for followers. This mixin runs DRF's initial() (auth + permissions + throttling) before returning the cached response, ensuring the request is authorized.
Required API key scopes
insight:writePath parameters
- project_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- namestring
- derived_namestring
- query
- orderinteger
- deletedboolean
- dashboardsarray
- descriptionstring
- tagsarray
- favoritedboolean
- _create_in_folderstring
Response
Example request
POST /api /projects /:project_id /insightsExample response
Status 201
Retrieve insights
DRF ViewSet mixin that gates coalesced responses behind permission checks.
The QueryCoalescingMiddleware attaches cached response data to request.META["_coalesced_response"] for followers. This mixin runs DRF's initial() (auth + permissions + throttling) before returning the cached response, ensuring the request is authorized.
Required API key scopes
insight:readPath parameters
- id
- project_idstring
Query parameters
- formatstringOne of:
"csv""json" - from_dashboardinteger
- refreshstringDefault:
force_cacheOne of:"async""async_except_on_cache_miss""blocking""force_async""force_blocking""force_cache""lazy_async"
Response
Example request
GET /api /projects /:project_id /insights /:idExample response
Status 200
Update insights
DRF ViewSet mixin that gates coalesced responses behind permission checks.
The QueryCoalescingMiddleware attaches cached response data to request.META["_coalesced_response"] for followers. This mixin runs DRF's initial() (auth + permissions + throttling) before returning the cached response, ensuring the request is authorized.
Required API key scopes
insight:writePath parameters
- id
- project_idstring
Query parameters
- formatstringOne of:
"csv""json"
Request parameters
- namestring
- derived_namestring
- query
- orderinteger
- deletedboolean
- dashboardsarray
- descriptionstring
- tagsarray
- favoritedboolean
- _create_in_folderstring
Response
Example request
PATCH /api /projects /:project_id /insights /:idExample response
Status 200
Delete insights
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Required API key scopes
insight:writePath parameters
- id
- project_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
DELETE /api /projects /:project_id /insights /:idExample response
Status 405 No response body
Retrieve insights activity retrieve
DRF ViewSet mixin that gates coalesced responses behind permission checks.
The QueryCoalescingMiddleware attaches cached response data to request.META["_coalesced_response"] for followers. This mixin runs DRF's initial() (auth + permissions + throttling) before returning the cached response, ensuring the request is authorized.
Required API key scopes
activity_log:readPath parameters
- idinteger
- project_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /projects /:project_id /insights /:id /activityExample response
Status 200 No response body
Retrieve insights analyze
DRF ViewSet mixin that gates coalesced responses behind permission checks.
The QueryCoalescingMiddleware attaches cached response data to request.META["_coalesced_response"] for followers. This mixin runs DRF's initial() (auth + permissions + throttling) before returning the cached response, ensuring the request is authorized.
Path parameters
- idinteger
- project_idstring
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /projects /:project_id /insights /:id /analyze