What’s newRelease 10 · Oct 23, 2026Ask Ollive in natural languageRead the changelog

Monitoring

Get metrics

Count runs and findings over a period of time.

POSThttps://api.ollive.ai/api/metrics/query/v1
Safe to retryv1

How it works

Choose what to count with measure, and how to split it with group_by:

To countmeasuregroup_by
Runs, in totalrunsleave it out
Runs, per rule setrunsrule_set_id
Findings, in totalfindingsleave it out
Findings, per rule set, rule or agentfindingsrule_set_id, rule_id or agent_id
Rules not met, per severityfindingsseverity

The period runs from since until now. Set timeseries to true to get counts per hour or per day instead of one total.

Authorization

  • Authorizationheaderrequired

    Your API key, after the word Bearer, like this: Bearer ollive_sk_…. Create a key.

Request body

application/json

  • measurestringrequired

    What to count.

    runsfindings
  • group_bystring

    How to split the count. Leave it out for one total.

    rule_set_idrule_idagent_idseverity
  • agent_idstring

    Only this agent.

  • rule_set_idstring (uuid)

    Only this rule set.

  • rule_idstring

    Only this rule. With findings only.

  • severitiesstring[]

    Only these severities. With findings only.

    criticalhighmediumlow
  • sincestringdefault 30d

    How far back to look, such as 30m, 12h or 7d.

  • timeseriesboolean

    Return counts per time period instead of one total.

  • resolution_secondsintegerat least 60

    The length of each time period, in seconds. With timeseries only. Defaults to an hour for periods up to a day, and a day for longer ones.

  • limitintegerup to 200

    Keep only the top groups.

  • sourcestringdefault platform

    Which runs to include: platform for ones Ollive collected, api or mcp for ones you sent.

    platformapimcp

Response

The counts. No groups if nothing matched.

  • measurestringrequired

    What was counted.

  • group_bystringrequired

    How it was split.

  • startstring (date-time)required

    The start of the period.

  • endstring (date-time)required

    The end of the period.

  • resolution_secondsintegerrequired

    The length of each time period. 0 when timeseries is off.

  • groupsobject[]required

    One entry per group, or a single entry for the total.

    • keystringrequired

      The group’s ID. Empty for the total.

    • labelstringrequired

      A readable name for the group.

    • valuesobject

      The counts. Not included with timeseries.

      • run_countinteger

        Runs.

      • checked_run_countinteger

        Runs that finished checking.

      • finding_countinteger

        Findings.

      • flagged_run_countinteger

        Runs with at least one finding.

      • not_met_countinteger

        Rules not met. With group_by: severity only.

    • seriesobject[]required

      The counts per time period, oldest first. With timeseries only.

      • atstring (date-time)required

        The start of the time period.

      • valuesobjectrequired

        The counts for that period.

  • total_groupsintegerrequired

    How many groups there were before limit.

  • truncatedbooleanrequired

    Whether limit left some groups out.

← List resultsAPI overview →