openapi: 3.0.3
info:
  title: Codecov API
  version: 2.0.0
  description: Public Codecov API
paths:
  /{service}/:
    get:
      operationId: root_list
      description: Returns all owners to which the currently authenticated user has
        access
      summary: Service owners
      parameters:
      - 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: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Users
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOwnerList'
          description: ''
  /{service}/{owner_username}/:
    get:
      operationId: root_retrieve
      description: Returns a single owner by name
      summary: Owner detail
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Users
      security:
      - tokenAuth: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Owner'
          description: ''
  /{service}/{owner_username}/repos/:
    get:
      operationId: repos_list
      description: |-
        Returns a paginated list of repositories for the specified provider service and owner username

        Optionally filterable by:
        * a list of repository `name`s
        * a `search` term which matches against the name
        * whether the repository is `active` or not
      summary: Repository list
      parameters:
      - in: query
        name: active
        schema:
          type: boolean
        description: whether the repository has received an upload
      - in: query
        name: names
        schema:
          type: array
          items:
            type: string
        description: list of repository names
        explode: true
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Repos
      security:
      - tokenAuth: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedRepoList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/:
    get:
      operationId: repos_retrieve
      description: Returns a single repository by name
      summary: Repository detail
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Repos
      security:
      - tokenAuth: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/branches/:
    get:
      operationId: repos_branches_list
      description: Returns a paginated list of branches for the specified repository
      summary: Branch list
      parameters:
      - in: query
        name: author
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Branches
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBranchList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/branches/{name}/:
    get:
      operationId: repos_branches_retrieve
      description: |-
        Returns a single branch by name.
        Includes head commit information embedded in the response.
      summary: Branch detail
      parameters:
      - in: path
        name: name
        schema:
          type: string
        description: branch name
        required: true
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Branches
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchDetail'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/commits/:
    get:
      operationId: repos_commits_list
      description: |-
        Returns a paginated list of commits for the specified repository

        Optionally filterable by:
        * a `branch` name
      summary: Commit list
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Commits
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCommitList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/commits/{commitid}/:
    get:
      operationId: repos_commits_retrieve
      description: Returns a single commit by commitid (SHA)
      summary: Commit detail
      parameters:
      - in: path
        name: commitid
        schema:
          type: string
        description: commit SHA
        required: true
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Commits
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommitDetail'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/commits/{commitid}/uploads/:
    get:
      operationId: repos_commits_uploads_list
      description: Returns a paginated list of uploads for a single commit by commitid
        (SHA)
      summary: Commit uploads
      parameters:
      - in: path
        name: commitid
        schema:
          type: string
        description: commit SHA
        required: true
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Commits
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCommitUploadsList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/compare/:
    get:
      operationId: repos_compare_retrieve
      description: Returns a comparison for either a pair of commits or a pull
      summary: Comparison
      parameters:
      - in: query
        name: base
        schema:
          type: string
        description: base commit SHA (`head` also required)
      - in: query
        name: head
        schema:
          type: string
        description: head commit SHA (`base` also required)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: pullid
        schema:
          type: integer
        description: pull ID on which to perform the comparison (alternative to specifying
          `base` and `head`)
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Comparison
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comparison'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/compare/components:
    get:
      operationId: repos_compare_components_retrieve
      summary: Component comparison
      parameters:
      - in: query
        name: base
        schema:
          type: string
        description: base commit SHA (`head` also required)
      - in: query
        name: head
        schema:
          type: string
        description: head commit SHA (`base` also required)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: pullid
        schema:
          type: integer
        description: pull ID on which to perform the comparison (alternative to specifying
          `base` and `head`)
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Comparison
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComponentComparison'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/compare/file/{file_path}:
    get:
      operationId: repos_compare_file_retrieve
      description: Returns a comparison for a specific file path
      summary: File comparison
      parameters:
      - in: query
        name: base
        schema:
          type: string
        description: base commit SHA (`head` also required)
      - in: path
        name: file_path
        schema:
          type: string
        description: file path
        required: true
      - in: query
        name: head
        schema:
          type: string
        description: head commit SHA (`base` also required)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: pullid
        schema:
          type: integer
        description: pull ID on which to perform the comparison (alternative to specifying
          `base` and `head`)
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Comparison
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileComparison'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/compare/flags:
    get:
      operationId: repos_compare_flags_retrieve
      description: Returns flag comparisons
      summary: Flag comparison
      parameters:
      - in: query
        name: base
        schema:
          type: string
        description: base commit SHA (`head` also required)
      - in: query
        name: head
        schema:
          type: string
        description: head commit SHA (`base` also required)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: pullid
        schema:
          type: integer
        description: pull ID on which to perform the comparison (alternative to specifying
          `base` and `head`)
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Comparison
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlagComparison'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/compare/impacted_files:
    get:
      operationId: repos_compare_impacted_files_retrieve
      description: |-
        Returns a comparison for either a pair of commits or a pull
        Will only return pre-computed impacted files comparisons if available
        If unavailable `files` will be empty, however once the computation is ready
        the files will appear on subsequent calls
        `state: "processed"` means `files` are finished computing and returned
        `state: "pending"` means `files` are still computing, poll again later
      summary: Impacted files comparison
      parameters:
      - in: query
        name: base
        schema:
          type: string
        description: base commit SHA (`head` also required)
      - in: query
        name: head
        schema:
          type: string
        description: head commit SHA (`base` also required)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: pullid
        schema:
          type: integer
        description: pull ID on which to perform the comparison (alternative to specifying
          `base` and `head`)
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Comparison
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImpactedFilesComparison'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/compare/segments/{file_path}:
    get:
      operationId: repos_compare_segments_retrieve
      description: |-
        Returns a comparison for a specific file path only showing the segments
        of the file that are impacted instead of all lines in file
      summary: Segmented file comparison
      parameters:
      - in: query
        name: base
        schema:
          type: string
        description: base commit SHA (`head` also required)
      - in: path
        name: file_path
        schema:
          type: string
        description: file path
        required: true
      - in: query
        name: head
        schema:
          type: string
        description: head commit SHA (`base` also required)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: pullid
        schema:
          type: integer
        description: pull ID on which to perform the comparison (alternative to specifying
          `base` and `head`)
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Comparison
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImpactedFileSegments'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/components/:
    get:
      operationId: repos_components_list
      description: Returns a list of components for the specified repository
      summary: Component list
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name for which to return components (of head commit)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: sha
        schema:
          type: string
        description: commit SHA for which to return components
      tags:
      - Components
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Component'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/config/:
    get:
      operationId: repos_config_retrieve
      summary: Repository config
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Repos
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoConfig'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/coverage/:
    get:
      operationId: repos_coverage_list
      description: |-
        Returns a paginated list of timeseries measurements aggregated by the specified
        `interval`.  If there are no measurements on `start_date` then the response will include
        1 measurement older than `start_date` so that the coverage value can be carried forward
        if necessary.

        Optionally filterable by:
        * `branch`
        * `start_date`
        * `end_date`
      summary: Coverage trend
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name
      - in: query
        name: end_date
        schema:
          type: string
          format: date-time
        description: end datetime (inclusive)
      - in: query
        name: interval
        schema:
          type: string
          enum:
          - 1d
          - 30d
          - 7d
        description: |-
          * `1d` - 1 day
          * `7d` - 7 day
          * `30d` - 30 day
        required: true
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: start_date
        schema:
          type: string
          format: date-time
        description: start datetime (inclusive)
      tags:
      - Coverage
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMeasurementList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/evals/compare/:
    get:
      operationId: repos_evals_compare_retrieve
      description: Returns a comparison of evaluations between two commits
      summary: Evaluation compare
      parameters:
      - in: query
        name: base_sha
        schema:
          type: string
        description: base commit SHA to compare from
      - in: query
        name: head_sha
        schema:
          type: string
        description: head commit SHA to compare to
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Evaluations
      security:
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /{service}/{owner_username}/repos/{repo_name}/evals/summary/:
    get:
      operationId: repos_evals_summary_retrieve
      description: Returns a summary of evaluations for the specified repository and
        commit
      summary: Evaluation summary
      parameters:
      - in: query
        name: classname
        schema:
          type: string
        description: class name the test belongs to, or `describe` block in vitest,
          or run name in langfuse
      - in: query
        name: commit
        schema:
          type: string
        description: commit SHA for which to return evaluation summary
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Evaluations
      security:
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /{service}/{owner_username}/repos/{repo_name}/file_report/{path}/:
    get:
      operationId: repos_file_report_retrieve
      description: |-
        Similar to the coverage report endpoint but only returns coverage info for a single
        file specified by `path`.

        By default that commit is the head of the default branch but can also be specified explictily by:
        * `sha` - return report for the commit with the given SHA
        * `branch` - return report for the head commit of the branch with the given name
      summary: File coverage report
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name for which to return report (of head commit)
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: path
        schema:
          type: string
        description: the file path for which to retrieve coverage info
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: sha
        schema:
          type: string
        description: commit SHA for which to return report
      tags:
      - Coverage
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileReport'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/flags/:
    get:
      operationId: repos_flags_list
      description: Returns a paginated list of flags for the specified repository
      summary: Flag list
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Flags
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedFlagList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/flags/{flag_name}/coverage/:
    get:
      operationId: repos_flags_coverage_list
      description: |-
        Returns a paginated list of timeseries measurements aggregated by the specified
        `interval`.  If there are no measurements on `start_date` then the response will include
        1 measurement older than `start_date` so that the coverage value can be carried forward
        if necessary.

        Optionally filterable by:
        * `branch`
        * `start_date`
        * `end_date`
      summary: Coverage trend
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name
      - in: query
        name: end_date
        schema:
          type: string
          format: date-time
        description: end datetime (inclusive)
      - in: path
        name: flag_name
        schema:
          type: string
        required: true
      - in: query
        name: interval
        schema:
          type: string
          enum:
          - 1d
          - 30d
          - 7d
        description: |-
          * `1d` - 1 day
          * `7d` - 7 day
          * `30d` - 30 day
        required: true
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: start_date
        schema:
          type: string
          format: date-time
        description: start datetime (inclusive)
      tags:
      - Flags
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMeasurementList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/pulls/:
    get:
      operationId: repos_pulls_list
      description: |-
        Returns a paginated list of pulls for the specified repository

        Optionally filterable by:
        * `state`
        * `start_date`

        Orderable by:
        * `pullid`
      summary: Pull list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: start_date
        schema:
          type: string
          format: date-time
        description: only return pulls with updatestamp on or after this date
      - in: query
        name: state
        schema:
          type: string
        description: the state of the pull (open/merged/closed)
      tags:
      - Pulls
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPullList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/pulls/{pullid}/:
    get:
      operationId: repos_pulls_retrieve
      description: Returns a single pull by ID
      summary: Pull detail
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: pullid
        schema:
          type: string
        description: pull ID
        required: true
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Pulls
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pull'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/report/:
    get:
      operationId: repos_report_retrieve
      description: |-
        Similar to the coverage totals endpoint but also returns line-by-line
        coverage info (hit=0/miss=1/partial=2).

        By default that commit is the head of the default branch but can also be specified explictily by:
        * `sha` - return report for the commit with the given SHA
        * `branch` - return report for the head commit of the branch with the given name

        The report can be optionally filtered by specifying:
        * `path` - only show report info for pathnames that start with this value
        * `flag` - only show report info that applies to the specified flag name
        * `component_id` - only show report info that applies to the specified component
      summary: Commit coverage report
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name for which to return report (of head commit)
      - in: query
        name: component_id
        schema:
          type: string
        description: filter report to only include info pertaining to given component
          id
      - in: query
        name: flag
        schema:
          type: string
        description: filter report to only include info pertaining to given flag name
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: path
        schema:
          type: string
        description: filter report to only include file paths starting with this value
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: sha
        schema:
          type: string
        description: commit SHA for which to return report
      tags:
      - Coverage
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoverageReport'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/report/tree:
    get:
      operationId: repos_report_tree_retrieve
      description: |-
        Returns a hierarchical view of the report that matches the file structure of the covered files
        with coverage info rollups at each level.

        Returns only top-level data by default but the depth of the traversal can be controlled via
        the `depth` parameter.

        * `depth` - how deep in the tree to traverse (default=1)
        * `path` - path in the tree from which to start the traversal (default is the root)
      summary: Coverage report tree
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name for which to return report (of head commit)
      - in: query
        name: component_id
        schema:
          type: string
        description: filter report to only include info pertaining to given component
          id
      - in: query
        name: depth
        schema:
          type: string
        description: depth of the traversal (default=1)
      - in: query
        name: flag
        schema:
          type: string
        description: filter report to only include info pertaining to given flag name
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: path
        schema:
          type: string
        description: starting path of the traversal (default is root path)
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: sha
        schema:
          type: string
        description: commit SHA for which to return report
      tags:
      - Coverage
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tree'
          description: ''
  /{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: ''
  /{service}/{owner_username}/repos/{repo_name}/test-results/:
    get:
      operationId: repos_test_results_list
      summary: Retrieve test results
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: Branch name for which to return test results
      - in: query
        name: commit_id
        schema:
          type: string
        description: Commit SHA for which to return test results
      - 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 Results
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTestrunList'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/test-results/{id}/:
    get:
      operationId: repos_test_results_retrieve
      summary: Retrieve test results
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: Branch name for which to return test results
      - in: query
        name: commit_id
        schema:
          type: string
        description: Commit SHA for which to return test results
      - 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: path
        name: id
        schema:
          type: string
        required: true
      - 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
      - in: path
        name: repo_name
        schema:
          type: string
        required: true
      - in: path
        name: service
        schema:
          type: string
        required: true
      tags:
      - Test Results
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Testrun'
          description: ''
  /{service}/{owner_username}/repos/{repo_name}/totals/:
    get:
      operationId: repos_totals_retrieve
      description: |-
        Returns the coverage totals for a given commit and the
        coverage totals broken down by file.

        By default that commit is the head of the default branch but can also be specified explictily by:
        * `sha` - return totals for the commit with the given SHA
        * `branch` - return totals for the head commit of the branch with the given name

        The totals can be optionally filtered by specifying:
        * `path` - only show totals for pathnames that start with this value
        * `flag` - only show totals that applies to the specified flag name
        * `component_id` - only show totals that applies to the specified component
      summary: Commit coverage totals
      parameters:
      - in: query
        name: branch
        schema:
          type: string
        description: branch name for which to return report (of head commit)
      - in: query
        name: component_id
        schema:
          type: string
        description: filter report to only include info pertaining to given component
          id
      - in: query
        name: flag
        schema:
          type: string
        description: filter report to only include info pertaining to given flag name
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: query
        name: path
        schema:
          type: string
        description: filter report to only include file paths starting with this value
      - in: path
        name: repo_name
        schema:
          type: string
        description: repository name
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: query
        name: sha
        schema:
          type: string
        description: commit SHA for which to return report
      tags:
      - Coverage
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoverageReport'
          description: ''
  /{service}/{owner_username}/user-sessions/:
    get:
      operationId: user_sessions_list
      description: |-
        Returns a paginated list of users' login session for the specified owner (org)

        Note: Requires the caller to be an admin of the requested organization
      summary: User session list
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Users
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedUserSessionList'
          description: ''
  /{service}/{owner_username}/users/:
    get:
      operationId: users_list
      description: Returns a paginated list of users for the specified owner (org)
      summary: User list
      parameters:
      - in: query
        name: activated
        schema:
          type: boolean
      - in: query
        name: is_admin
        schema:
          type: boolean
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        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
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      tags:
      - Users
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedUserList'
          description: ''
  /{service}/{owner_username}/users/{user_username_or_ownerid}/:
    get:
      operationId: users_retrieve
      description: Returns a user for the specified owner_username or ownerid
      summary: User detail
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: path
        name: user_username_or_ownerid
        schema:
          type: string
        required: true
      tags:
      - Users
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: ''
    patch:
      operationId: users_partial_update
      description: |-
        Updates a user for the specified owner_username or ownerid

        Allowed fields
          - activated: boolean value to activate or deactivate the user
      summary: Update a user
      parameters:
      - in: path
        name: owner_username
        schema:
          type: string
        description: username from service provider
        required: true
      - in: path
        name: service
        schema:
          type: string
          enum:
          - bitbucket
          - bitbucket_server
          - github
          - github_enterprise
          - gitlab
          - gitlab_enterprise
          - to_be_deleted
        description: Git hosting service provider
        required: true
      - in: path
        name: user_username_or_ownerid
        schema:
          type: string
        required: true
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUserUpdateActivation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUserUpdateActivation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUserUpdateActivation'
      security:
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: ''
components:
  schemas:
    Branch:
      type: object
      properties:
        name:
          type: string
          title: branch name
        updatestamp:
          type: string
          format: date-time
          title: last updated timestamp
      required:
      - name
      - updatestamp
    BranchDetail:
      type: object
      properties:
        name:
          type: string
          title: branch name
        updatestamp:
          type: string
          format: date-time
          title: last updated timestamp
        head_commit:
          allOf:
          - $ref: '#/components/schemas/CommitDetail'
          readOnly: true
          title: branch's current head commit
      required:
      - head_commit
      - name
      - updatestamp
    Commit:
      type: object
      properties:
        commitid:
          type: string
          title: commit SHA
        message:
          type: string
          title: commit message
        timestamp:
          type: string
          format: date-time
          title: timestamp when commit was made
        ci_passed:
          type: boolean
          title: indicates whether the CI process passed for this commit
        author:
          allOf:
          - $ref: '#/components/schemas/Owner'
          title: author of the commit
        branch:
          type: string
          title: branch name on which this commit currently lives
        totals:
          allOf:
          - $ref: '#/components/schemas/CommitTotals'
          title: coverage totals
        state:
          allOf:
          - $ref: '#/components/schemas/StateB73Enum'
          title: Codecov processing state for this commit
        parent:
          type: string
          title: commit SHA of first ancestor commit with coverage
      required:
      - author
      - branch
      - ci_passed
      - commitid
      - message
      - parent
      - state
      - timestamp
      - totals
    CommitDetail:
      type: object
      properties:
        commitid:
          type: string
          title: commit SHA
        message:
          type: string
          title: commit message
        timestamp:
          type: string
          format: date-time
          title: timestamp when commit was made
        ci_passed:
          type: boolean
          title: indicates whether the CI process passed for this commit
        author:
          allOf:
          - $ref: '#/components/schemas/Owner'
          title: author of the commit
        branch:
          type: string
          title: branch name on which this commit currently lives
        totals:
          allOf:
          - $ref: '#/components/schemas/CommitTotals'
          title: coverage totals
        state:
          allOf:
          - $ref: '#/components/schemas/StateB73Enum'
          title: Codecov processing state for this commit
        parent:
          type: string
          title: commit SHA of first ancestor commit with coverage
        report:
          allOf:
          - $ref: '#/components/schemas/Report'
          title: coverage report
      required:
      - author
      - branch
      - ci_passed
      - commitid
      - message
      - parent
      - report
      - state
      - timestamp
      - totals
    CommitTotals:
      type: object
      properties:
        files:
          type: integer
        lines:
          type: integer
        hits:
          type: integer
        misses:
          type: integer
        partials:
          type: integer
        coverage:
          type: number
          format: double
          readOnly: true
        branches:
          type: integer
        methods:
          type: integer
        sessions:
          type: integer
        complexity:
          type: number
          format: double
        complexity_total:
          type: number
          format: double
        complexity_ratio:
          type: number
          format: double
          readOnly: true
        diff:
          type: integer
          readOnly: true
          title: 'Deprecated: this will always return 0.  Please use comparison endpoint
            for diff totals instead.'
      required:
      - branches
      - complexity
      - complexity_ratio
      - complexity_total
      - coverage
      - diff
      - files
      - hits
      - lines
      - methods
      - misses
      - partials
      - sessions
    CommitUploads:
      type: object
      properties:
        created_at:
          type: string
        updated_at:
          type: string
        storage_path:
          type: string
        flags:
          type: array
          items:
            type: string
        provider:
          type: string
        build_code:
          type: string
        name:
          type: string
        job_code:
          type: string
        build_url:
          type: string
        state:
          type: string
        env: {}
        upload_type:
          type: string
        upload_extras: {}
        totals:
          $ref: '#/components/schemas/UploadTotals'
      required:
      - build_code
      - build_url
      - created_at
      - env
      - flags
      - job_code
      - name
      - provider
      - state
      - storage_path
      - totals
      - updated_at
      - upload_extras
      - upload_type
    Comparison:
      type: object
      properties:
        base_commit:
          type: string
        head_commit:
          type: string
        totals:
          $ref: '#/components/schemas/TotalsComparison'
        commit_uploads:
          type: array
          items:
            $ref: '#/components/schemas/Commit'
        diff:
          type: object
          additionalProperties: {}
          readOnly: true
        files:
          type: array
          items:
            type: object
            additionalProperties: {}
          readOnly: true
        untracked:
          type: array
          items:
            type: string
          readOnly: true
      required:
      - base_commit
      - commit_uploads
      - diff
      - files
      - head_commit
      - totals
      - untracked
    Component:
      type: object
      properties:
        component_id:
          type: string
        name:
          type: string
          title: component name
        coverage:
          type: number
          format: double
          title: component coverage
      required:
      - component_id
      - coverage
      - name
    ComponentComparison:
      type: object
      properties:
        component_id:
          type: string
        name:
          type: string
        base_report_totals:
          $ref: '#/components/schemas/ReportTotals'
        head_report_totals:
          $ref: '#/components/schemas/ReportTotals'
        diff_totals:
          $ref: '#/components/schemas/ReportTotals'
      required:
      - base_report_totals
      - component_id
      - diff_totals
      - head_report_totals
      - name
    CoverageReport:
      type: object
      properties:
        totals:
          allOf:
          - $ref: '#/components/schemas/ReportTotals'
          title: coverage totals
        files:
          allOf:
          - $ref: '#/components/schemas/ReportFile'
          readOnly: true
          title: file specific coverage totals
        commit_file_url:
          type: string
          title: Codecov url to see file coverage on commit. Can be unreliable with
            partial path names.
      required:
      - commit_file_url
      - files
      - totals
    FileComparison:
      type: object
      properties:
        name: {}
        totals:
          $ref: '#/components/schemas/TotalsComparison'
        has_diff:
          type: boolean
        stats: {}
        change_summary: {}
        lines:
          type: array
          items:
            $ref: '#/components/schemas/LineComparison'
      required:
      - change_summary
      - has_diff
      - lines
      - name
      - stats
      - totals
    FileReport:
      type: object
      properties:
        name:
          type: string
          title: file path
        totals:
          allOf:
          - $ref: '#/components/schemas/ReportTotals'
          title: coverage totals
        line_coverage:
          type: array
          items: {}
          readOnly: true
          title: line-by-line coverage values
        commit_sha:
          type: string
          readOnly: true
          title: commit SHA of the commit for which coverage info was found
        commit_file_url:
          type: string
          readOnly: true
          title: Codecov URL to see file coverage on commit.
      required:
      - commit_file_url
      - commit_sha
      - line_coverage
      - name
      - totals
    Flag:
      type: object
      properties:
        flag_name:
          type: string
        coverage:
          type: number
          format: double
          title: flag coverage
      required:
      - coverage
      - flag_name
    FlagComparison:
      type: object
      properties:
        name:
          type: string
        base_report_totals:
          type: object
          additionalProperties: {}
          nullable: true
          readOnly: true
        head_report_totals:
          $ref: '#/components/schemas/ReportTotals'
        diff_totals:
          $ref: '#/components/schemas/ReportTotals'
      required:
      - base_report_totals
      - diff_totals
      - head_report_totals
      - name
    ImpactedFileSegments:
      type: object
      properties:
        segments:
          type: string
          readOnly: true
      required:
      - segments
    ImpactedFilesComparison:
      type: object
      properties:
        base_commit:
          type: string
        head_commit:
          type: string
        totals:
          $ref: '#/components/schemas/TotalsComparison'
        commit_uploads:
          type: array
          items:
            $ref: '#/components/schemas/Commit'
        diff:
          type: object
          additionalProperties: {}
          readOnly: true
        files:
          type: array
          items:
            type: object
            additionalProperties: {}
          readOnly: true
        untracked:
          type: array
          items:
            type: string
          readOnly: true
        state:
          type: string
          readOnly: true
      required:
      - base_commit
      - commit_uploads
      - diff
      - files
      - head_commit
      - state
      - totals
      - untracked
    LineComparison:
      type: object
      properties:
        value:
          type: string
        number: {}
        coverage: {}
        is_diff:
          type: boolean
        added:
          type: boolean
        removed:
          type: boolean
        sessions:
          type: integer
      required:
      - added
      - coverage
      - is_diff
      - number
      - removed
      - sessions
      - value
    Measurement:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          title: timestamp at the start of the interval
        min:
          type: number
          format: double
          title: minimum value in the interval
        max:
          type: number
          format: double
          title: maximum value in the interval
        avg:
          type: number
          format: double
          title: average value in the interval
      required:
      - avg
      - max
      - min
      - timestamp
    Owner:
      type: object
      properties:
        service:
          allOf:
          - $ref: '#/components/schemas/ServiceEnum'
          readOnly: true
        username:
          type: string
          readOnly: true
          nullable: true
        name:
          type: string
          readOnly: true
          nullable: true
      required:
      - name
      - service
      - username
    PaginatedBranchList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Branch'
    PaginatedCommitList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Commit'
    PaginatedCommitUploadsList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/CommitUploads'
    PaginatedFlagList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Flag'
    PaginatedMeasurementList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Measurement'
    PaginatedOwnerList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Owner'
    PaginatedPullList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Pull'
    PaginatedRepoList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Repo'
    PaginatedTestrunList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Testrun'
    PaginatedUserList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/User'
    PaginatedUserSessionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/UserSession'
    PatchedUserUpdateActivation:
      type: object
      properties:
        activated:
          type: boolean
    Pull:
      type: object
      properties:
        pullid:
          type: integer
          title: pull ID number
        title:
          type: string
          title: title of the pull
        base_totals:
          allOf:
          - $ref: '#/components/schemas/CommitTotals'
          title: coverage totals of base commit
        head_totals:
          allOf:
          - $ref: '#/components/schemas/CommitTotals'
          title: coverage totals of head commit
        updatestamp:
          type: string
          format: date-time
          title: last updated timestamp
        state:
          allOf:
          - $ref: '#/components/schemas/PullStateEnum'
          title: state of the pull
        ci_passed:
          type: boolean
          title: indicates whether the CI process passed for the head commit of this
            pull
        author:
          allOf:
          - $ref: '#/components/schemas/Owner'
          title: pull author
        patch:
          type: object
          additionalProperties:
            type: number
            format: double
          nullable: true
          readOnly: true
      required:
      - author
      - base_totals
      - ci_passed
      - head_totals
      - patch
      - pullid
      - state
      - title
      - updatestamp
    PullStateEnum:
      enum:
      - open
      - merged
      - closed
      type: string
      description: |-
        * `open` - Open
        * `merged` - Merged
        * `closed` - Closed
    Repo:
      type: object
      properties:
        name:
          type: string
          title: repository name
        private:
          type: boolean
          title: indicates private vs. public repository
        updatestamp:
          type: string
          format: date-time
          title: last updated timestamp
        author:
          allOf:
          - $ref: '#/components/schemas/Owner'
          title: repository owner
        language:
          type: string
          title: primary programming language used
        branch:
          type: string
          title: default branch name
        active:
          type: boolean
          title: indicates whether the repository has received a coverage upload
        activated:
          type: boolean
          title: indicates whether the repository has been manually deactivated
        totals:
          allOf:
          - $ref: '#/components/schemas/CommitTotals'
          title: recent commit totals on the default branch
      required:
      - activated
      - active
      - author
      - branch
      - language
      - name
      - private
      - totals
      - updatestamp
    RepoConfig:
      type: object
      properties:
        upload_token:
          type: string
          title: token used for uploading coverage reports for this repo
        graph_token:
          type: string
          title: token used for repository graphs
      required:
      - graph_token
      - upload_token
    Report:
      type: object
      properties:
        totals:
          allOf:
          - $ref: '#/components/schemas/ReportTotals'
          title: coverage totals
        files:
          allOf:
          - $ref: '#/components/schemas/ReportFile'
          readOnly: true
          title: file specific coverage totals
      required:
      - files
      - totals
    ReportFile:
      type: object
      properties:
        name:
          type: string
          title: file path
        totals:
          allOf:
          - $ref: '#/components/schemas/ReportTotals'
          title: coverage totals
        line_coverage:
          type: array
          items: {}
          readOnly: true
          title: line-by-line coverage values
      required:
      - line_coverage
      - name
      - totals
    ReportTotals:
      type: object
      properties:
        files:
          type: integer
        lines:
          type: integer
        hits:
          type: integer
        misses:
          type: integer
        partials:
          type: integer
        coverage:
          type: number
          format: double
          readOnly: true
        branches:
          type: integer
        methods:
          type: integer
        messages:
          type: integer
        sessions:
          type: integer
        complexity:
          type: number
          format: double
        complexity_total:
          type: number
          format: double
        complexity_ratio:
          type: number
          format: double
          readOnly: true
        diff: {}
      required:
      - branches
      - complexity
      - complexity_ratio
      - complexity_total
      - coverage
      - diff
      - files
      - hits
      - lines
      - messages
      - methods
      - misses
      - partials
      - sessions
    ServiceEnum:
      enum:
      - github
      - gitlab
      - bitbucket
      - github_enterprise
      - gitlab_enterprise
      - bitbucket_server
      - to_be_deleted
      type: string
      description: |-
        * `github` - Github
        * `gitlab` - Gitlab
        * `bitbucket` - Bitbucket
        * `github_enterprise` - Github Enterprise
        * `gitlab_enterprise` - Gitlab Enterprise
        * `bitbucket_server` - Bitbucket Server
        * `to_be_deleted` - To Be Deleted
    StateB73Enum:
      enum:
      - complete
      - pending
      - error
      - skipped
      type: string
      description: |-
        * `complete` - Complete
        * `pending` - Pending
        * `error` - Error
        * `skipped` - Skipped
    Testrun:
      type: object
      properties:
        test_id:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
          nullable: true
          title: test name
        classname:
          type: string
          readOnly: true
          nullable: true
          title: class name
        testsuite:
          type: string
          readOnly: true
          nullable: true
          title: test suite
        computed_name:
          type: string
          readOnly: true
          nullable: true
        outcome:
          type: string
          readOnly: true
        duration_seconds:
          type: number
          format: double
          readOnly: true
          nullable: true
          title: duration in seconds
        failure_message:
          type: string
          readOnly: true
          nullable: true
        framework:
          type: string
          readOnly: true
          nullable: true
        filename:
          type: string
          readOnly: true
          nullable: true
        repo_id:
          type: integer
          readOnly: true
        commit_sha:
          type: string
          readOnly: true
          nullable: true
        branch:
          type: string
          readOnly: true
          nullable: true
          title: branch name
        flags:
          type: array
          items:
            type: string
          readOnly: true
          nullable: true
        upload_id:
          type: integer
          readOnly: true
          nullable: true
        properties:
          readOnly: true
          nullable: 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
    TotalsComparison:
      type: object
      properties:
        base:
          $ref: '#/components/schemas/ReportTotals'
        head:
          $ref: '#/components/schemas/ReportTotals'
        patch:
          $ref: '#/components/schemas/ReportTotals'
      required:
      - base
      - head
      - patch
    Tree:
      type: object
      properties:
        name:
          type: string
        full_path:
          type: string
        coverage:
          type: number
          format: double
        lines:
          type: integer
        hits:
          type: integer
        partials:
          type: integer
        misses:
          type: integer
      required:
      - coverage
      - full_path
      - hits
      - lines
      - misses
      - name
      - partials
    UploadTotals:
      type: object
      properties:
        files:
          type: integer
        lines:
          type: integer
        hits:
          type: integer
        misses:
          type: integer
        partials:
          type: integer
        coverage:
          type: number
          format: double
          readOnly: true
        branches:
          type: integer
        methods:
          type: integer
      required:
      - branches
      - coverage
      - files
      - hits
      - lines
      - methods
      - misses
      - partials
    User:
      type: object
      properties:
        service:
          $ref: '#/components/schemas/ServiceEnum'
        username:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        activated:
          type: boolean
        is_admin:
          type: boolean
        email:
          type: string
          nullable: true
      required:
      - activated
      - is_admin
      - service
    UserSession:
      type: object
      properties:
        username:
          type: string
          readOnly: true
          nullable: true
        name:
          type: string
          readOnly: true
          nullable: true
        has_active_session:
          type: boolean
        expiry_date:
          type: string
          format: date-time
      required:
      - expiry_date
      - has_active_session
      - name
      - username
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer
servers:
- url: /api/v2
