Skip to main content
Version: Beta

Generate Context

Return the set of events for the specified session formatted for input into a Generative AI. The format and contents of the response are controlled by the Context specified to optimize the information included for the intended use case.

Path Parameters
    session_id string required

    The UTF-8 encoded ID of the session for which to generate context data. To retrieve the Session ID you may use the appropriate Get Session Details API for Web, iOS, or Android. As Session IDs include : separators the ID must be URL encoded using the %3A substitution.

Request Body required
    exclude_selectors boolean optional
    exclude_org_context boolean optional
    exclude_user_context boolean optional
    exclude_location boolean optional
    exclude_device boolean optional
    exclude_defined_events boolean optional
    exclude_event_timestamps boolean optional
    trim_to_last_n_selectors int32 optional
    exclude_event_types string[] optional

    List of event types to exclude from the generated session context, based on the event types in the Events model.

    include_event_types string[] optional

    List of event types to exclusively include from the generated session context, based on the event types in the Events model.

    exclude_display_elements boolean optional
    exclude_api_events boolean optional
    include_screenshots boolean optional
    screenshot_event_types string[] optional
    crop_screenshots_to_selector boolean optional
    include_tree_snapshots boolean optional
    exclude_descriptions boolean optional
    full_page_screenshots boolean optional
    enable_event_cache boolean optional
Responses
200

Context response containing the session information and events as JSON.


{
"context_data": {
"context": {
"org_context": {},
"user_context": {
"properties": {}
},
"location_context": {},
"device_context": {
"screen_size": {},
"viewport_size": {}
}
},
"pages": [
{
"events": [
{
"properties": {}
}
]
}
]
}
}
Loading...