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

# Weekly decision throughput for a project, split by actor class

> Returns how many findings were CLOSED per week for one project, split into machine-closed (agent / CI) and human-closed. Powers the Dashboard's Decision throughput card. Reverted resolutions are excluded: a decision that was undone did not close anything. `pending_review` rows ARE counted; the finding is closed from the reviewer's point of view the moment the resolution is written, and excluding them would make an org that reviews its own decisions look idle. Actor classing follows the acting principal, not the permission: a resolution is MACHINE when `autonomous_run` is set or the resolving actor kind is api_key / worker / agent, and HUMAN otherwise. The two are disjoint and sum to the week's total. Weeks are ISO weeks in UTC, newest last, and every week in the window is present — a week with no decisions returns explicit zeros rather than being omitted, so the client never has to distinguish a gap in the array from a quiet week. This is a SEPARATE endpoint from ProjectSummary on purpose: when the findings store is unreachable this request fails alone and the card reads "Unavailable" while every other card on the dashboard still renders. Folding it into the summary would take the whole page down with it.



## OpenAPI

````yaml /api-reference/earnie/triage-openapi.json get /v1/resolutions/throughput
openapi: 3.0.3
info:
  title: Earnie Findings API
  description: List and read findings, triage them, and review resolutions.
  version: 1.0.0
servers:
  - url: https://{tenant}.earnie.dev
    description: Your Earnie deployment
    variables:
      tenant:
        default: your-company
        description: >-
          Your organization's Earnie address, as shown in your browser when you
          sign in.
security:
  - bearerAuth: []
paths:
  /v1/resolutions/throughput:
    get:
      tags:
        - resolutions
      summary: Weekly decision throughput for a project, split by actor class
      description: >-
        Returns how many findings were CLOSED per week for one project, split
        into machine-closed (agent / CI) and human-closed. Powers the
        Dashboard's Decision throughput card. Reverted resolutions are excluded:
        a decision that was undone did not close anything. `pending_review` rows
        ARE counted; the finding is closed from the reviewer's point of view the
        moment the resolution is written, and excluding them would make an org
        that reviews its own decisions look idle. Actor classing follows the
        acting principal, not the permission: a resolution is MACHINE when
        `autonomous_run` is set or the resolving actor kind is api_key / worker
        / agent, and HUMAN otherwise. The two are disjoint and sum to the week's
        total. Weeks are ISO weeks in UTC, newest last, and every week in the
        window is present — a week with no decisions returns explicit zeros
        rather than being omitted, so the client never has to distinguish a gap
        in the array from a quiet week. This is a SEPARATE endpoint from
        ProjectSummary on purpose: when the findings store is unreachable this
        request fails alone and the card reads "Unavailable" while every other
        card on the dashboard still renders. Folding it into the summary would
        take the whole page down with it.
      operationId: GetV1ResolutionsThroughput
      parameters:
        - name: project_id
          in: query
          required: true
          description: Project to report throughput for.
          schema:
            type: string
            format: uuid
        - name: weeks
          in: query
          required: false
          description: >-
            Size of the trailing window in whole weeks, ending with the current
            (partial) week. Out-of-range values clamp to the nearest bound
            rather than erroring — a dashboard must not 400 over a period
            picker.
          schema:
            type: integer
            default: 6
            minimum: 1
            maximum: 26
      responses:
        '200':
          description: Weekly throughput for the requested window.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionThroughput'
        '400':
          description: Missing or malformed project_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient permissions (findings:read required)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DecisionThroughput:
      type: object
      description: >-
        Closed-decision volume over a trailing window, split by actor class.
        Every count here is a real measurement. The card's "Unavailable" state
        is expressed by this response NOT ARRIVING (a failed request), never by
        zeros: `total_closed: 0` means the window genuinely contains no
        decisions — the honest state for a project whose first scan just landed.
      required:
        - weeks
        - total_closed
        - machine_closed
        - human_closed
        - window_weeks
      properties:
        window_weeks:
          type: integer
          description: >-
            The window actually applied, after clamping. Echoed so the client
            can label the period truthfully when its request was clamped.
        weeks:
          type: array
          items:
            $ref: '#/components/schemas/DecisionThroughputWeek'
          description: >-
            One entry per week in the window, oldest first, with no gaps. The
            final entry is the current, still-accumulating week.
        total_closed:
          type: integer
          description: Sum over the window. Equals machine_closed + human_closed.
        machine_closed:
          type: integer
        human_closed:
          type: integer
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
    DecisionThroughputWeek:
      type: object
      description: One ISO week's closed-decision counts. `machine + human == total`.
      required:
        - week_start
        - machine
        - human
        - total
      properties:
        week_start:
          type: string
          format: date
          description: Monday of the ISO week, UTC.
        machine:
          type: integer
          description: Decisions closed by an agent, CI key, or worker.
        human:
          type: integer
          description: Decisions closed by a person.
        total:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An Earnie API key, sent as `Authorization: Bearer sk_earnie_...`. Create
        one under Settings > API keys. The key's scopes decide which operations
        it may call.

````

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