Codecov Test Analytics API

The Test Analytics API from Codecov — 1 operation(s) for test analytics.

Operations 1

GET /{service}/{owner_username}/repos/{repo_name}/test-analytics/ Test analytics list #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codecov:codecov-test-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codecov-test-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codecov Test Analytics API
  version: 2.0.0
  description: Public Codecov API
servers:
- url: https://api.codecov.io/api/v2/
tags:
- name: Test Analytics
paths:
  /{service}/{owner_username}/repos/{repo_name}/test-analytics/:
    get:
      operationId: repos_test_analytics_list
      description: Returns a list of test analytics for the specified repository
      summary: Test analytics list
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: Branch name for which to return test analytics
      - in: query
        name: commit_sha
        schema:
          type: string
        description: Commit SHA for which to return test analytics
      - in: query
        name: duration_max
        schema:
          type: integer
        description: Maximum duration of the test in seconds
      - in: query
        name: duration_min
        schema:
          type: integer
        description: Minimum duration of the test in seconds
      - in: query
        name: outcome
        schema:
          type: string
        description: Status of the test (failure, skip, error, pass)
      - in: path
        name: owner_username
        schema:
          type: string
        required: true
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: path
        name: repo_name
        schema:
          type: string
        required: true
      - in: path
        name: service
        schema:
          type: string
        required: true
      tags:
      - Test Analytics
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTestrunList'
          description: ''
components:
  schemas:
    Testrun:
      type: object
      properties:
        test_id:
          type: string
          readOnly: true
        name:
          type:
          - string
          - 'null'
          readOnly: true
          title: test name
        classname:
          type:
          - string
          - 'null'
          readOnly: true
          title: class name
        testsuite:
          type:
          - string
          - 'null'
          readOnly: true
          title: test suite
        computed_name:
          type:
          - string
          - 'null'
          readOnly: true
        outcome:
          type: string
          readOnly: true
        duration_seconds:
          type:
          - number
          - 'null'
          format: double
          readOnly: true
          title: duration in seconds
        failure_message:
          type:
          - string
          - 'null'
          readOnly: true
        framework:
          type:
          - string
          - 'null'
          readOnly: true
        filename:
          type:
          - string
          - 'null'
          readOnly: true
        repo_id:
          type: integer
          readOnly: true
        commit_sha:
          type:
          - string
          - 'null'
          readOnly: true
        branch:
          type:
          - string
          - 'null'
          readOnly: true
          title: branch name
        flags:
          type:
          - array
          - 'null'
          items:
            type: string
          readOnly: true
        upload_id:
          type:
          - integer
          - 'null'
          readOnly: true
        properties:
          readOnly: true
        timestamp:
          type: string
          format: date-time
          readOnly: true
      required:
      - branch
      - classname
      - commit_sha
      - computed_name
      - duration_seconds
      - failure_message
      - filename
      - flags
      - framework
      - name
      - outcome
      - properties
      - repo_id
      - test_id
      - testsuite
      - timestamp
      - upload_id
    PaginatedTestrunList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Testrun'
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer
x-provenance:
  method: searched
  source: https://docs.codecov.com/reference
  harvested: '2026-10-26'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.codecov.com/reference/repos_branches_list.md
  - https://docs.codecov.com/reference/repos_branches_retrieve.md
  - https://docs.codecov.com/reference/repos_commits_list.md
  - https://docs.codecov.com/reference/repos_commits_retrieve.md
  - https://docs.codecov.com/reference/repos_commits_uploads_list.md
  - https://docs.codecov.com/reference/repos_compare_components_retrieve.md
  - https://docs.codecov.com/reference/repos_compare_file_retrieve.md
  - https://docs.codecov.com/reference/repos_compare_flags_retrieve.md
  - https://docs.codecov.com/reference/repos_compare_impacted_files_retrieve.md
  - https://docs.codecov.com/reference/repos_compare_retrieve.md
  - https://docs.codecov.com/reference/repos_compare_segments_retrieve.md
  - https://docs.codecov.com/reference/repos_components_list.md
  - https://docs.codecov.com/reference/repos_config_retrieve.md
  - https://docs.codecov.com/reference/repos_coverage_list.md
  - https://docs.codecov.com/reference/repos_evals_compare_retrieve-1.md
  - https://docs.codecov.com/reference/repos_evals_summary_retrieve-1.md
  - https://docs.codecov.com/reference/repos_file_report_retrieve.md
  - https://docs.codecov.com/reference/repos_flags_coverage_list.md
  - https://docs.codecov.com/reference/repos_flags_list.md
  - https://docs.codecov.com/reference/repos_list.md
  - https://docs.codecov.com/reference/repos_pulls_list.md
  - https://docs.codecov.com/reference/repos_pulls_retrieve.md
  - https://docs.codecov.com/reference/repos_report_retrieve.md
  - https://docs.codecov.com/reference/repos_report_tree_retrieve.md
  - https://docs.codecov.com/reference/repos_retrieve.md
  - https://docs.codecov.com/reference/repos_test_analytics_list-1.md
  - https://docs.codecov.com/reference/repos_test_results_list.md
  - https://docs.codecov.com/reference/repos_test_results_retrieve.md
  - https://docs.codecov.com/reference/repos_totals_retrieve.md
  - https://docs.codecov.com/reference/root_list.md
  - https://docs.codecov.com/reference/root_retrieve.md
  - https://docs.codecov.com/reference/user_sessions_list.md
  - https://docs.codecov.com/reference/users_list.md
  - https://docs.codecov.com/reference/users_partial_update.md
  - https://docs.codecov.com/reference/users_retrieve.md
  merge:
    pages: 35
    deduped: 98
    conflicts_kept_first: 0