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

# List Sources



## OpenAPI

````yaml /openapi-docs.yaml get /sources
openapi: 3.1.0
info:
  title: Nia AI API
  version: 1.1.0
  description: >-
    Nia AI API provides a single, consistent `sources` resource for all indexed
    content.


    ## Core Resources


    **Sources** (`/sources`)

    - `repository`

    - `documentation`

    - `research_paper`

    - `huggingface_dataset`

    - `local_folder`


    **Search** (`/search`)

    - `mode`: query | web | deep | universal


    Legacy endpoints are deprecated and will be removed in a future version.
    Prefer `/sources` and `/search` for new integrations.
servers:
  - url: https://apigcp.trynia.ai/v2
    description: Production API
  - url: http://localhost:8000/v2
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
    description: API-first signup, login, and API key bootstrapping
  - name: Sources
    description: >-
      Unified source management (repositories, documentation, papers, datasets,
      local folders)
  - name: Search
    description: Unified search endpoint with mode discriminator
  - name: Context Sharing
    description: Cross-agent context management and retrieval
  - name: Categories
    description: Category management for organizing indexed sources
  - name: GitHub Search
    description: Live GitHub search and repository exploration
  - name: Advisor
    description: Context-aware code advisor against indexed documentation
  - name: Dependencies
    description: Dependency analysis and documentation subscription
  - name: Usage
    description: Usage tracking and bulk operations
paths:
  /sources:
    get:
      tags:
        - Sources
      summary: List Sources
      operationId: list_sources_v2_sources_get
      parameters:
        - name: type
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - repository
                  - documentation
                  - research_paper
                  - huggingface_dataset
                  - local_folder
                  - slack
                  - google_drive
                  - connector
                type: string
              - type: 'null'
            description: Filter by source type
            title: Type
          description: Filter by source type
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search by name or identifier
            title: Query
          description: Search by name or identifier
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by status
            title: Status
          description: Filter by status
        - name: category_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by category
            title: Category Id
          description: Filter by category
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SourceListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Source'
          type: array
          title: Items
          description: List of sources
        pagination:
          $ref: '#/components/schemas/PaginationInfo'
          description: Pagination metadata
      type: object
      required:
        - pagination
      title: SourceListResponse
      description: Response for listing sources.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Source:
      properties:
        id:
          type: string
          title: Id
          description: Source identifier
        type:
          type: string
          enum:
            - repository
            - documentation
            - research_paper
            - huggingface_dataset
            - local_folder
            - slack
            - google_drive
            - connector
          title: Type
          description: Source type
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Canonical identifier (repo slug, URL, or folder path)
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: Human-readable name
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Indexing status
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
          description: Creation timestamp (ISO)
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
          description: Last update timestamp (ISO)
        category_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Category Id
          description: Category assignment
        is_global:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Global
          description: Whether the source is global/shared
        global_source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Global Source Id
          description: Global source ID if applicable
        global_namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Global Namespace
          description: Global namespace if applicable
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Type-specific metadata
        curation:
          anyOf:
            - $ref: '#/components/schemas/SourceCurationSummary'
            - type: 'null'
          description: Trust signals and curated guidance summary
      type: object
      required:
        - id
        - type
      title: Source
      description: Unified source representation.
    PaginationInfo:
      properties:
        total:
          type: integer
          title: Total
          description: Total number of items
        limit:
          type: integer
          title: Limit
          description: Items per page
        offset:
          type: integer
          title: Offset
          description: Current offset
        has_more:
          type: boolean
          title: Has More
          description: Whether more items exist
      type: object
      required:
        - total
        - limit
        - offset
        - has_more
      title: PaginationInfo
      description: Pagination metadata.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SourceCurationSummary:
      properties:
        trust_signals:
          $ref: '#/components/schemas/SourceTrustSignals'
          description: Derived trust signals
        overlay_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Overlay Summary
          description: Short overlay summary if one exists
        recommended_queries:
          items:
            type: string
          type: array
          title: Recommended Queries
          description: Suggested prompts from the overlay
      type: object
      title: SourceCurationSummary
      description: Compact curation info embedded into source responses.
    SourceTrustSignals:
      properties:
        trust_level:
          type: string
          enum:
            - low
            - medium
            - high
          title: Trust Level
          description: User or team trust preference for the source
          default: medium
        trust_tier:
          type: string
          enum:
            - low
            - medium
            - high
            - verified
          title: Trust Tier
          description: Effective trust tier after derived verified/global signals
          default: medium
        scope:
          type: string
          enum:
            - private
            - organization
            - global
          title: Scope
          description: Ownership scope of the source
          default: private
        is_global:
          type: boolean
          title: Is Global
          description: Whether the source references a shared global source
          default: false
        is_verified:
          type: boolean
          title: Is Verified
          description: Whether the source has a Nia-verified overlay
          default: false
        overlay_available:
          type: boolean
          title: Overlay Available
          description: Whether a curated overlay is attached
          default: false
        annotation_count:
          type: integer
          title: Annotation Count
          description: Number of saved annotations for this source
          default: 0
      type: object
      title: SourceTrustSignals
      description: Trust and curation signals attached to a source.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key must be provided in the Authorization header

````