> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pomerado.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Count your team's runs per login, tool or integration

> Counts the runs your team started in a time range, one row per saved login, per tool or per integration, most runs first, one numbered page at a time.

> [accordion] Details
>
> * Each row counts its runs, how they ended, the runs that asked a question and the runs that asked for a repair, with how many of those succeeded, and the 50th and 95th percentile time of its finished runs.
>
> * Counts and times match runs.list's summary for the same runs.
>
> * Filter by saved login, tool, integration, environment and time range, up to the last 90 days.
>
> * A key limited to environments, or an environment's MCP URL, counts only the runs in them, and naming another is refused.
>
> * A tool's row names its integration.
>
> * With interval, the range also comes as a series of UTC hours or days, each counting its runs and how they ended.
>
> * Rows name a login by its ID: logins.get names it.
>
> * **Callers:** an API key, an MCP OAuth token or a Dashboard session.
>
> * **Permission:** `jobs:read`.
>
> * **Effect:** Changes nothing.
>
> * **Errors:** [`business_account_required`](https://docs.pomerado.ai/errors#business_account_required), and the [errors any request can get](https://docs.pomerado.ai/errors.md).


## OpenAPI

````yaml /api-reference/openapi.json get /v1/runs/stats
openapi: 3.1.0
info:
  title: Pomerado API
  version: '1'
  description: >-
    Run and build website tools, follow their jobs, and manage logins, API keys
    and webhooks. Authenticate with a Pomerado API key (pom_…), an MCP OAuth
    token or a Dashboard session as a Bearer token.
servers:
  - url: https://api.pomerado.ai
security: []
tags:
  - name: account
    x-group: Account
  - name: api_keys
    x-group: API keys
  - name: environments
    x-group: Environments
  - name: connected_apps
    x-group: Connected apps
  - name: usage
    x-group: Usage
  - name: quota
    x-group: Quota
  - name: spend_controls
    x-group: Spend controls
  - name: usage_alerts
    x-group: Usage alerts
  - name: usage_summary
    x-group: Usage summary
  - name: billing
    x-group: Billing
  - name: integrations
    x-group: Integrations
  - name: connect
    x-group: Connect
  - name: code
    x-group: Code
  - name: logins
    x-group: Saved logins
  - name: two_factor
    x-group: 2FA
  - name: login_access
    x-group: Login access
  - name: tools
    x-group: Tools
  - name: shapes
    x-group: Shapes
  - name: webhooks
    x-group: Webhooks
  - name: payer_profiles
    x-group: Payer profiles
  - name: payer_addresses
    x-group: Payer addresses
  - name: payment_methods
    x-group: Payment methods
  - name: runs
    x-group: Runs
  - name: builds
    x-group: Builds
  - name: jobs
    x-group: Jobs
  - name: suggestions
    x-group: Suggestions
  - name: audit
    x-group: Audit
  - name: files
    x-group: Files
  - name: team
    x-group: Team
  - name: sso
    x-group: Single sign-on
  - name: issue_reports
    x-group: Problem reports
paths:
  /v1/runs/stats:
    get:
      tags:
        - runs
      summary: Count your team's runs per login, tool or integration
      description: >-
        Counts the runs your team started in a time range, one row per saved
        login, per tool or per integration, most runs first, one numbered page
        at a time.
      operationId: runs.stats
      parameters:
        - name: group_by
          in: query
          required: false
          description: >-
            login: one row per saved login, leaving out runs that used none
            (default). tool: one row per tool. integration: one row per
            integration
          schema:
            type: string
            enum:
              - login
              - tool
              - integration
        - name: integration_id
          in: query
          required: false
          description: Only this integration's runs
          schema:
            type: string
            examples:
              - int_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
        - name: login_id
          in: query
          required: false
          description: Only this saved login's runs
          schema:
            type: string
            examples:
              - login_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
        - name: tool_id
          in: query
          required: false
          description: Only this tool's runs
          schema:
            type: string
            examples:
              - tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
        - name: environment
          in: query
          required: false
          description: Only runs in these environments, by key, comma-separated
          schema:
            type: string
        - name: from
          in: query
          required: false
          description: >-
            Accepted at or after, inclusive (default: 7 days before `to`;
            earliest: 90 days ago)
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: 'Accepted before (default: now)'
          schema:
            type: string
        - name: interval
          in: query
          required: false
          description: >-
            Also return the range as a series of UTC hours or days, at most 1000
            buckets, counting every run the filters match
          schema:
            type: string
            enum:
              - hour
              - day
        - name: page
          in: query
          required: false
          description: The page to read, from 1 (default 1)
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Rows per page, 1 to 1000 (default 100)
          schema:
            type: string
      responses:
        '200':
          description: One page of the team's run counts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunStats'
        '400':
          description: invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized, reauthentication_required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: business_account_required, environment_not_allowed, forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: server_busy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: internal_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: temporarily_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    RunStats:
      type: object
      required:
        - data
        - page
        - limit
        - total
      properties:
        data:
          type: array
          items:
            type: object
            required:
              - login_id
              - tool_id
              - tool_name
              - integration_id
              - integration_name
              - runs
              - succeeded
              - failed
              - cancelled
              - in_progress
              - needed_input
              - needed_repair
              - p50_duration_ms
              - p95_duration_ms
            properties:
              login_id:
                anyOf:
                  - type: string
                  - type: 'null'
                description: The row's saved login with group_by=login; otherwise null
              tool_id:
                anyOf:
                  - type: string
                  - type: 'null'
                description: The row's tool with group_by=tool; otherwise null
              tool_name:
                anyOf:
                  - type: string
                  - type: 'null'
                description: >-
                  The tool's name, or its last name once deleted; null with
                  group_by=login
              integration_id:
                anyOf:
                  - type: string
                  - type: 'null'
                description: >-
                  The row's integration with group_by=integration, or the tool's
                  with group_by=tool; null once it is deleted, and with
                  group_by=login
              integration_name:
                anyOf:
                  - type: string
                  - type: 'null'
                description: >-
                  The integration's name, or its last name once deleted; null
                  with group_by=login
              runs:
                type: integer
                description: a non-negative number
                minimum: 0
              succeeded:
                type: integer
                description: a non-negative number
                minimum: 0
              failed:
                type: integer
                description: a non-negative number
                minimum: 0
              cancelled:
                type: integer
                description: a non-negative number
                minimum: 0
              in_progress:
                type: integer
                description: Queued, running or waiting for an answer
                minimum: 0
              needed_input:
                type: object
                required:
                  - runs
                  - succeeded
                properties:
                  runs:
                    type: integer
                    description: a non-negative number
                    minimum: 0
                  succeeded:
                    type: integer
                    description: a non-negative number
                    minimum: 0
                additionalProperties: false
                description: >-
                  Runs that asked at least one question, and how many of them
                  succeeded
              needed_repair:
                type: object
                required:
                  - runs
                  - succeeded
                properties:
                  runs:
                    type: integer
                    description: a non-negative number
                    minimum: 0
                  succeeded:
                    type: integer
                    description: a non-negative number
                    minimum: 0
                additionalProperties: false
                description: >-
                  Runs that asked for a repair of their tool, and how many of
                  them succeeded
              p50_duration_ms:
                anyOf:
                  - type: integer
                    description: a non-negative number
                    minimum: 0
                  - type: 'null'
                description: >-
                  The median time of the finished runs, from acceptance to end;
                  null with none
              p95_duration_ms:
                anyOf:
                  - type: integer
                    description: a non-negative number
                    minimum: 0
                  - type: 'null'
                description: The 95th percentile time of the finished runs; null with none
            additionalProperties: false
        page:
          type: integer
          description: a non-negative number
          minimum: 0
        limit:
          type: integer
          description: a non-negative number
          minimum: 0
        total:
          type: integer
          description: Rows matching the filters, on every page
          minimum: 0
        series:
          type: array
          items:
            type: object
            required:
              - start
              - runs
              - succeeded
              - failed
              - cancelled
              - in_progress
            properties:
              start:
                type: string
                description: The bucket's start, a UTC hour or day
              runs:
                type: integer
                description: Runs accepted in the bucket
                minimum: 0
              succeeded:
                type: integer
                description: a non-negative number
                minimum: 0
              failed:
                type: integer
                description: a non-negative number
                minimum: 0
              cancelled:
                type: integer
                description: a non-negative number
                minimum: 0
              in_progress:
                type: integer
                description: Queued, running or waiting for an answer
                minimum: 0
            additionalProperties: false
          description: >-
            With interval: every run matching the filters, per bucket of the
            range, whatever group_by; the same on every page
      additionalProperties: false
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - retryable
            - docs_url
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            docs_url:
              type: string
            details:
              type: object
              required: []
              properties: {}
              additionalProperties:
                $id: /schemas/unknown
          additionalProperties: false
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.