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

# Get aggregated metric scores over time for an agent



## OpenAPI

````yaml get /api/v1/testing-lab/analytics
openapi: 3.0.0
info:
  version: 1.0.0
  title: Feather AI API
servers:
  - url: https://prod.featherhq.com
    description: Production environment
security: []
paths:
  /api/v1/testing-lab/analytics:
    get:
      tags:
        - Testing Lab
      summary: Get aggregated metric scores over time for an agent
      parameters:
        - schema:
            type: string
          required: true
          name: agentId
          in: query
        - schema:
            type: string
          required: true
          name: start_time
          in: query
        - schema:
            type: string
          required: false
          name: end_time
          in: query
        - schema:
            type: string
            enum:
              - hour
              - day
              - week
          required: false
          name: aggregation_period
          in: query
      responses:
        '200':
          description: Analytics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CekuraAnalyticsResponse'
        '400':
          description: Bad request - agentId and start_time are required
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 400
                  message:
                    type: string
                    default: Bad request
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    default: BAD_REQUEST
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '404':
          description: Agent not found or not connected to Cekura
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 404
                  message:
                    type: string
                    default: Not found
                  code:
                    type: string
                    enum:
                      - NOT_FOUND
                    default: NOT_FOUND
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 500
                  message:
                    type: string
                    default: Internal server error
                  code:
                    type: string
                    enum:
                      - INTERNAL_SERVER_ERROR
                    default: INTERNAL_SERVER_ERROR
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
      security:
        - ApiKey: []
components:
  schemas:
    CekuraAnalyticsResponse:
      type: object
      properties:
        total_calls:
          type: number
        success_rate:
          type: number
          nullable: true
        avg_duration:
          type: number
          nullable: true
        success_over_time:
          type: array
          items:
            type: object
            properties:
              time_interval:
                type: string
              succeeded:
                type: number
              failed:
                type: number
              total:
                type: number
            required:
              - time_interval
              - succeeded
              - failed
              - total
        call_outcomes:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              value:
                type: number
              percentage:
                type: number
            required:
              - label
              - value
              - percentage
        metric_pass_rates:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              name:
                type: string
              type:
                type: string
              pass_rate:
                type: number
                nullable: true
              eval_count:
                type: number
              avg_score:
                type: number
                nullable: true
            required:
              - id
              - name
              - pass_rate
              - eval_count
              - avg_score
      required:
        - total_calls
        - success_rate
        - avg_duration
        - success_over_time
        - call_outcomes
        - metric_pass_rates
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````