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

# Bus-factor signal + capped human contributors for one repo (spec §8).

> Return the ownership signal for one repo, scoped to the latest scan of its org.

Contributors are humans only, ordered by ``commit_count DESC``. Returns 200
with zeros / null / empty arrays when no signal exists yet (the feature flag
``OWNERSHIP_SIGNAL_ENABLED`` is off, or the scan ran before backfill) — the
endpoint stays callable without agents needing a "flag-off" branch.

Paginated via ``limit`` / ``offset``; ``X-Total-Count`` carries the full
human contributor count. Raw emails are never returned (PII contract).



## OpenAPI

````yaml /openapi.json get /api/v1/repositories/{repo_id}/ownership
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.12.2
servers: []
security: []
paths:
  /api/v1/repositories/{repo_id}/ownership:
    get:
      tags:
        - repositories
      summary: Bus-factor signal + capped human contributors for one repo (spec §8).
      description: >-
        Return the ownership signal for one repo, scoped to the latest scan of
        its org.


        Contributors are humans only, ordered by ``commit_count DESC``. Returns
        200

        with zeros / null / empty arrays when no signal exists yet (the feature
        flag

        ``OWNERSHIP_SIGNAL_ENABLED`` is off, or the scan ran before backfill) —
        the

        endpoint stays callable without agents needing a "flag-off" branch.


        Paginated via ``limit`` / ``offset``; ``X-Total-Count`` carries the full

        human contributor count. Raw emails are never returned (PII contract).
      operationId: get_repository_ownership_api_v1_repositories__repo_id__ownership_get
      parameters:
        - in: path
          name: repo_id
          required: true
          schema:
            format: uuid
            title: Repo Id
            type: string
        - description: Maximum items to return.
          in: query
          name: limit
          required: false
          schema:
            default: 100
            description: Maximum items to return.
            maximum: 500
            minimum: 1
            title: Limit
            type: integer
        - description: Items to skip.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: Items to skip.
            minimum: 0
            title: Offset
            type: integer
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryOwnershipResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    RepositoryOwnershipResponse:
      description: >-
        Per-repo ownership signal + capped human contributors (spec §8).


        Returns the signal computed at the latest completed scan of the repo's

        connected org. When no signal row exists yet
        (``OWNERSHIP_SIGNAL_ENABLED``

        is off, or the scan ran before backfill), all numeric fields are 0,

        ``top_author``/``window``/``computed_at`` are null, and ``contributors``

        is empty — endpoints stay callable so agents do not need to special-case

        "ownership not enabled yet".
      properties:
        bus_factor:
          title: Bus Factor
          type: integer
        computed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Computed At
        contributors:
          items:
            $ref: '#/components/schemas/ContributorEntry'
          title: Contributors
          type: array
        contributors_total:
          title: Contributors Total
          type: integer
        human_author_count:
          title: Human Author Count
          type: integer
        top_author:
          anyOf:
            - $ref: '#/components/schemas/TopAuthor'
            - type: 'null'
        top_author_share:
          title: Top Author Share
          type: number
        window:
          anyOf:
            - $ref: '#/components/schemas/OwnershipWindow'
            - type: 'null'
      required:
        - bus_factor
        - top_author_share
        - human_author_count
        - contributors
        - contributors_total
      title: RepositoryOwnershipResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ContributorEntry:
      description: |-
        One human contributor's commit rollup for a repo+scan.

        Bots are filtered out upstream; ``is_bot`` is always ``False`` here and
        is retained for shape stability so a future iteration can expose bot
        contributors without a breaking response shape.
      properties:
        commit_count:
          title: Commit Count
          type: integer
        is_bot:
          default: false
          title: Is Bot
          type: boolean
        name:
          title: Name
          type: string
        share:
          title: Share
          type: number
      required:
        - name
        - commit_count
        - share
      title: ContributorEntry
      type: object
    TopAuthor:
      description: Name + share of the single top contributor (humans only).
      properties:
        name:
          title: Name
          type: string
        share:
          title: Share
          type: number
      required:
        - name
        - share
      title: TopAuthor
      type: object
    OwnershipWindow:
      description: The trailing window the signal was computed over.
      properties:
        end:
          format: date-time
          title: End
          type: string
        start:
          format: date-time
          title: Start
          type: string
      required:
        - start
        - end
      title: OwnershipWindow
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````