Get behavior summary
Returns how often each behavior fired in a time range, with totals and a rollup by polarity. Counts come from an hourly rollup refreshed every 10 minutes, so the range is widened to whole hours.
Authentication
AuthorizationBearer
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.
Request
This endpoint expects an object.
start_time
Start of the range, ISO 8601. A time without an offset is read as UTC. Defaults to 7 days ago, which is also used if the value can't be parsed.
end_time
End of the range, ISO 8601. A time without an offset is read as UTC. Defaults to now, which is also used if the value can't be parsed.
environment
Only count spans from this environment, such as prod or test. Omit it to include every environment.
Response
Behavior counts for the range.
behaviors
One row per behavior scored in the range, most fired first. Turned-off behaviors are left out.
total_behaviors_tracked
Behaviors in behaviors that fired at least once.
total_classified_spans
Distinct spans scored in the range. A span scored for several behaviors counts once.
total_fired_spans
Distinct spans where at least one behavior fired.
polarity_totals
Fired verdicts per polarity. A span that fires several behaviors counts once per behavior.
net_sentiment
polarity_totals.positive minus polarity_totals.negative.
Errors
403
Forbidden Error
429
Too Many Requests Error