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

# Get evaluation metrics

> Grade counts for one evaluation over a trailing window (default 30 days, 1–365).



## OpenAPI

````yaml get /evaluations/{evaluation_id}/metrics
openapi: 3.0.0
info:
  title: Public API
  version: 1.0.0
servers:
  - url: https://api.gumloop.com/api/v1
security: []
paths:
  /evaluations/{evaluation_id}/metrics:
    get:
      tags:
        - Organization Evaluations
      summary: Get evaluation metrics
      description: >-
        Grade counts for one evaluation over a trailing window (default 30 days,
        1–365).
      operationId: getOrganizationEvaluationMetrics
      parameters:
        - in: path
          name: evaluation_id
          required: true
          schema:
            type: string
          description: ID of the organization evaluation.
        - in: query
          name: days
          required: false
          schema:
            type: integer
            default: 30
            minimum: 1
            maximum: 365
          description: Window length in days.
      responses:
        '200':
          description: Grade counts in the window.
          content:
            application/json:
              schema:
                type: object
                properties:
                  days:
                    type: integer
                  grades:
                    type: object
                    additionalProperties:
                      type: integer
                    description: >-
                      Count of completed results per grade. Grades with no
                      results are omitted.
              example:
                days: 7
                grades:
                  pass: 41
                  needs_review: 6
                  needs_attention: 2
        '400':
          description: '`days` outside 1–365.'
        '401':
          description: Unauthorized — missing or invalid credentials.
        '403':
          description: >-
            Forbidden — not an organization admin, or the organization is not on
            the Enterprise plan.
        '404':
          description: Evaluation not found.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl
            'https://api.gumloop.com/api/v1/evaluations/EVALUATION_ID/metrics?days=7'
            \
              -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
        - lang: python
          label: Python
          source: |
            from gumloop import Gumloop

            client = Gumloop(access_token="YOUR_ACCESS_TOKEN")

            metrics = client.evaluations.metrics("EVALUATION_ID", days=7)
            print(metrics.grades)
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A personal API key or an [OAuth 2.0](/api-reference/oauth) access token.
        Personal API keys also require the `x-auth-key` header with your user
        ID.

````