Query Builder
Execute a declarative query using the powerful PulseQuery builder
This endpoint provides a more structured and powerful alternative to text-based search,
allowing complex filtering, aggregation, and business logic queries.
Examples:
# Find all activities by specific agents in last 7 days
{
"agent_types": ["user"],
"last_days": 7,
"sort_by": "time"
}
# Customer journey analysis
{
"customer_id": "customer_123",
"last_days": 30,
"sort_by": "time",
"sort_direction": "asc"
}
# Revenue impact events with duration filters
{
"revenue_impact": true,
"min_duration_minutes": 5,
"tags": ["sales", "deal"],
"tag_mode": "all"
}
# Aggregated metrics by team
{
"last_days": 14,
"aggregate": true,
"group_by": ["agent_type"],
"team_name": "engineering"
}
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>
, where token is your auth token.
Request
This endpoint expects an object.
limit
Maximum results to return
offset
Offset for pagination
text_query
Text to search in descriptions
time_range_start
Start time for filtering
time_range_end
End time for filtering
last_hours
Filter to last N hours
last_days
Filter to last N days
agent_types
Filter by agent types
agent_ids
Filter by specific agent IDs
object_types
Filter by object types
object_ids
Filter by specific object IDs
action_types
Filter by action types
action_statuses
Filter by action statuses
specific_actions
Filter by specific action names
tag_mode
Whether to match any or all tags
Allowed values:
min_duration_minutes
Minimum duration in minutes
max_duration_minutes
Maximum duration in minutes
customer_id
Filter by customer ID
team_name
Filter by team
deal_stages
Filter by deal stages
revenue_impact
Filter for revenue impact events
churn_risk
Filter for churn risk events
escalation_level
Filter by escalation level
trace_id
Filter by trace ID
triggered_by
Filter by triggering event
sort_by
Sort field
Allowed values:
sort_direction
Sort direction
Allowed values:
count_only
Return only count, not full results
explain
Include query explanation
aggregate
Return aggregated results
group_by
Group by fields for aggregation
group_by_tag_prefix
Group by tag prefix (e.g., ‘customer:’)
Response
Successful Response