Skip to main content
GET
/
v2
/
tools
/
logs
/
stats
Tool Execution Stats
curl --request GET \
  --url https://api.bland.ai/v2/tools/logs/stats \
  --header 'authorization: <authorization>'
GET /v2/tools/logs/stats?group_by=integration,status&metrics=count,execution_time_ms:avg&period=week

Headers

authorization
string
required
Your API key for authentication.

Query Parameters

Grouping
group_by
string
Comma-separated list of fields to group results by. Supported values: integration, action, status, tool_id, resource_id, error_type, date.Example: group_by=integration,status
Metrics
metrics
string
Comma-separated list of metrics to compute. Use "count" for total execution count, or "field:avg" for averages.Supported aggregate fields: execution_time_ms, input_size_kb, output_size_kb.Defaults to "count".Example: metrics=count,execution_time_ms:avg
Date Range
period
string
Preset time period. Allowed values: "today", "week", "month". Overridden by start_date/end_date if both are provided.
start_date
string
Start of the date range (ISO 8601). Maximum range is 90 days from end_date.
end_date
string
End of the date range (ISO 8601). Maximum range is 90 days from start_date.
Filters
tool_id
string
Filter stats to a specific tool ID.
resource_id
string
Filter stats to a specific resource ID.
integration
string
Filter by integration key.
action
string
Filter by action name.
status
string
Filter by execution status. Allowed values: "success", "error".
error_type
string
Filter by error type.
call_id
string
Filter to a specific call ID.
limit
number
Maximum number of groups to return. Minimum 1, maximum 1000. Defaults to 50.

Response

results
array
Array of aggregated result objects. Each entry contains the grouped dimensions and the requested metric values.
meta
object
Metadata about the query that was executed.
GET /v2/tools/logs/stats?group_by=integration,status&metrics=count,execution_time_ms:avg&period=week