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

# Get task coverage statistics

> Returns the percentage of active tasks that have at least one test run within the specified date range.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml get /v0/tasks/task-coverage
openapi: 3.1.1
info:
  title: Avido API
  description: >-
    Avido's API for LLM usage events, tool calls, trace management, webhook
    validation, and more. See each endpoint's request/response schema for
    details.
  version: 0.1.0
  contact:
    name: Avido Support
    email: support@avidoai.com
    url: https://avidoai.com/support
servers:
  - url: https://api.avidoai.com
    description: Production API
security:
  - ApiKey: []
    ApplicationId: []
paths:
  /v0/tasks/task-coverage:
    get:
      tags:
        - Tasks
      summary: Get task coverage statistics
      description: >-
        Returns the percentage of active tasks that have at least one test run
        within the specified date range.
      operationId: getTaskCoverage
      parameters:
        - in: query
          name: createdAtGte
          schema:
            description: Filter tasks with tests created on or after this date
            example: '2024-01-01T00:00:00.000Z'
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Filter tasks with tests created on or after this date
        - in: query
          name: createdAtLte
          schema:
            description: Filter tasks with tests created on or before this date
            example: '2024-02-01T00:00:00.000Z'
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Filter tasks with tests created on or before this date
      responses:
        '200':
          description: Successfully retrieved task coverage statistics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCoverageResponse'
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TaskCoverageResponse:
      type: object
      properties:
        taskCoverage:
          type: number
          description: >-
            The percentage of active tasks that have at least one test run in
            the given date range
          example: 75
        taskCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: The total number of active tasks
          example: 20
        taskWithTestCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: >-
            The number of active tasks that have at least one test run in the
            given date range
          example: 15
      required:
        - taskCoverage
        - taskCount
        - taskWithTestCount
      additionalProperties: false
      title: TaskCoverageResponse
      description: Response containing task coverage statistics
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message explaining the error.
          example: Resource not found
      required:
        - message
      additionalProperties: false
      title: ErrorResponse
      description: Standard error format for failed API operations.
    ValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message indicating what went wrong.
          example: Invalid request data
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              path:
                type: array
                items:
                  type: string
            required:
              - code
              - message
              - path
            additionalProperties: false
          description: Array of detailed validation error objects.
          example:
            - code: invalid_string
              message: Invalid UUID
              path:
                - id
      required:
        - message
        - issues
      additionalProperties: false
      title: ValidationErrorResponse
      description: Details about validation errors in incoming requests.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your unique Avido API key
    ApplicationId:
      type: apiKey
      in: header
      name: x-application-id
      description: Your unique Avido Application ID

````