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

# Get repository intelligence baselines

> Requires scopes: eval:read



## OpenAPI

````yaml /api-reference/openapi.json get /api/repository-intelligence/repositories/{repositoryId}/baselines
openapi: 3.1.2
info:
  title: EvalGate API
  version: 5.1.0
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/repository-intelligence/repositories/{repositoryId}/baselines:
    get:
      tags:
        - repository intelligence
      summary: Get repository intelligence baselines
      description: 'Requires scopes: eval:read'
      operationId: get_repository_intelligence_repositories_repositoryId_baselines
      parameters:
        - name: repositoryId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetApiRepositoryIntelligenceRepositoriesRepositoryIdBaselinesResponse200ApplicationJson
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  schemas:
    GetApiRepositoryIntelligenceRepositoriesRepositoryIdBaselinesResponse200ApplicationJson:
      type: object
      properties:
        baselines:
          type: array
          items:
            type: object
            properties:
              schemaVersion:
                type: string
                enum:
                  - evalgate.repository-baseline-report.v1
              baseline:
                type: object
                properties:
                  id:
                    type: string
                  stage:
                    type: string
                  stateVersion:
                    type: number
                  planHash:
                    type: string
                  identity:
                    type: object
                    properties:
                      repositoryId:
                        type: number
                      fullName:
                        type: string
                      requestedRef:
                        type: string
                      commitSha:
                        type: string
                      rootPath:
                        type: string
                      harnessPresetKey:
                        oneOf:
                          - type: 'null'
                          - type: string
                      scanRunId:
                        type: string
                      graphVersionId:
                        type: string
                      snapshotHash:
                        type: string
                      intakeManifestHash:
                        oneOf:
                          - type: 'null'
                          - type: string
                    additionalProperties: false
                    required:
                      - repositoryId
                      - fullName
                      - requestedRef
                      - commitSha
                      - rootPath
                      - harnessPresetKey
                      - scanRunId
                      - graphVersionId
                      - snapshotHash
                      - intakeManifestHash
                  createdAt:
                    oneOf:
                      - type: 'null'
                      - type: string
                  updatedAt:
                    oneOf:
                      - type: 'null'
                      - type: string
                additionalProperties: false
                required:
                  - id
                  - stage
                  - stateVersion
                  - planHash
                  - identity
                  - createdAt
                  - updatedAt
              preview:
                type: object
                properties:
                  summary:
                    type: object
                    properties:
                      selectedTestCount:
                        type: number
                      selectedCaseCount:
                        type: number
                      deterministicCaseCount:
                        type: number
                      modelBackedCaseCount:
                        type: number
                      targetProbeCaseCount:
                        type: number
                      estimatedTargetCalls:
                        type: number
                      estimatedJudgeCalls:
                        type: number
                    additionalProperties: false
                    required:
                      - selectedTestCount
                      - selectedCaseCount
                      - deterministicCaseCount
                      - modelBackedCaseCount
                      - targetProbeCaseCount
                      - estimatedTargetCalls
                      - estimatedJudgeCalls
                  execution:
                    type: object
                    properties:
                      rootPath:
                        type: string
                      harnessPresetKey:
                        oneOf:
                          - type: 'null'
                          - type: string
                      packageManager:
                        oneOf:
                          - type: 'null'
                          - type: string
                      installCommand:
                        oneOf:
                          - type: 'null'
                          - type: string
                      provider:
                        oneOf:
                          - type: 'null'
                          - type: string
                      runner:
                        oneOf:
                          - type: 'null'
                          - type: string
                      baselineCommands:
                        type: array
                        items:
                          type: string
                      requiredServices:
                        type: array
                        items:
                          type: string
                      capabilities:
                        type: array
                        items:
                          type: string
                      privilegeClass:
                        oneOf:
                          - type: 'null'
                          - type: string
                      isolation:
                        oneOf:
                          - type: 'null'
                          - type: string
                      networkPolicy:
                        oneOf:
                          - type: 'null'
                          - type: string
                      writablePaths:
                        type: array
                        items:
                          type: string
                      forbiddenPaths:
                        type: array
                        items:
                          type: string
                      timeoutMs:
                        oneOf:
                          - type: 'null'
                          - type: number
                      sideEffects:
                        type: string
                        enum:
                          - unknown
                      expectedCost:
                        type: string
                        enum:
                          - unknown
                      expectedRuntime:
                        type: string
                        enum:
                          - unknown
                      existingCaseCount:
                        type: number
                      generatedCaseCount:
                        type: number
                      sourceClassification:
                        oneOf:
                          - type: string
                            enum:
                              - none
                          - type: string
                            enum:
                              - existing_and_generated
                          - type: string
                            enum:
                              - existing_only
                          - type: string
                            enum:
                              - generated_only
                      evaluatorRefs:
                        type: array
                        items:
                          type: string
                      verifierVersionId:
                        oneOf:
                          - type: 'null'
                          - type: string
                    additionalProperties: false
                    required:
                      - rootPath
                      - harnessPresetKey
                      - packageManager
                      - installCommand
                      - provider
                      - runner
                      - baselineCommands
                      - requiredServices
                      - capabilities
                      - privilegeClass
                      - isolation
                      - networkPolicy
                      - writablePaths
                      - forbiddenPaths
                      - timeoutMs
                      - sideEffects
                      - expectedCost
                      - expectedRuntime
                      - existingCaseCount
                      - generatedCaseCount
                      - sourceClassification
                      - evaluatorRefs
                      - verifierVersionId
                  opportunities:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        mechanism:
                          type: string
                        falsifier:
                          type: string
                        artifactRequirements:
                          type: array
                          items:
                            type: string
                        verification:
                          type: string
                        evidence:
                          type: array
                          items:
                            type: object
                            properties:
                              label:
                                type: string
                              confidence:
                                type: number
                              path:
                                type: string
                              startLine:
                                type: number
                              endLine:
                                type: number
                            additionalProperties: false
                            required:
                              - label
                              - confidence
                      additionalProperties: false
                      required:
                        - key
                        - title
                        - description
                        - mechanism
                        - falsifier
                        - artifactRequirements
                        - verification
                        - evidence
                  tests:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        title:
                          type: string
                        summary:
                          type: string
                        category:
                          type: string
                        priority:
                          oneOf:
                            - type: string
                              enum:
                                - required
                            - type: string
                              enum:
                                - recommended
                        executionMode:
                          oneOf:
                            - type: string
                              enum:
                                - deterministic
                            - type: string
                              enum:
                                - model_backed
                            - type: string
                              enum:
                                - target_probe
                        caseCount:
                          type: number
                        reason:
                          type: string
                        evidence:
                          type: array
                          items:
                            type: object
                            properties:
                              label:
                                type: string
                              confidence:
                                type: number
                              path:
                                type: string
                              startLine:
                                type: number
                              endLine:
                                type: number
                            additionalProperties: false
                            required:
                              - label
                              - confidence
                      additionalProperties: false
                      required:
                        - key
                        - title
                        - summary
                        - category
                        - priority
                        - executionMode
                        - caseCount
                        - reason
                        - evidence
                  warnings:
                    type: array
                    items:
                      type: string
                  blockers:
                    type: array
                    items:
                      type: string
                additionalProperties: false
                required:
                  - summary
                  - execution
                  - opportunities
                  - tests
                  - warnings
                  - blockers
              evaluation:
                oneOf:
                  - type: 'null'
                  - type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      status:
                        type: string
                      executorType:
                        oneOf:
                          - type: 'null'
                          - type: string
                      href:
                        type: string
                    additionalProperties: false
                    required:
                      - id
                      - name
                      - status
                      - executorType
                      - href
              run:
                oneOf:
                  - type: 'null'
                  - type: object
                    properties:
                      id:
                        type: number
                      status:
                        type: string
                      checksPlanned:
                        oneOf:
                          - type: 'null'
                          - type: number
                      checksCompleted:
                        oneOf:
                          - type: 'null'
                          - type: number
                      checksPassed:
                        oneOf:
                          - type: 'null'
                          - type: number
                      checksFailed:
                        oneOf:
                          - type: 'null'
                          - type: number
                      startedAt:
                        oneOf:
                          - type: 'null'
                          - type: string
                      completedAt:
                        oneOf:
                          - type: 'null'
                          - type: string
                      href:
                        type: string
                      traceEvidenceAvailable:
                        type: boolean
                    additionalProperties: false
                    required:
                      - id
                      - status
                      - checksPlanned
                      - checksCompleted
                      - checksPassed
                      - checksFailed
                      - startedAt
                      - completedAt
                      - href
                      - traceEvidenceAvailable
              findings:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    classification:
                      type: string
                    status:
                      type: string
                    score:
                      oneOf:
                        - type: 'null'
                        - type: number
                    caseId:
                      type: number
                    caseName:
                      type: string
                    outputPreview:
                      oneOf:
                        - type: 'null'
                        - type: string
                    error:
                      oneOf:
                        - type: 'null'
                        - type: string
                    durationMs:
                      oneOf:
                        - type: 'null'
                        - type: number
                    reproduction:
                      type: object
                      properties:
                        commitSha:
                          type: string
                        rootPath:
                          type: string
                        commands:
                          type: array
                          items:
                            type: string
                      additionalProperties: false
                      required:
                        - commitSha
                        - rootPath
                        - commands
                  additionalProperties: false
                  required:
                    - id
                    - classification
                    - status
                    - score
                    - caseId
                    - caseName
                    - outputPreview
                    - error
                    - durationMs
                    - reproduction
              observability:
                type: object
                properties:
                  resultCount:
                    oneOf:
                      - type: 'null'
                      - type: number
                  toolCallCount:
                    oneOf:
                      - type: 'null'
                      - type: number
                  failedToolCallCount:
                    oneOf:
                      - type: 'null'
                      - type: number
                  cost:
                    type: object
                    properties:
                      status:
                        oneOf:
                          - type: string
                            enum:
                              - unknown
                          - type: string
                            enum:
                              - measured
                      totalUsd:
                        oneOf:
                          - type: 'null'
                          - type: number
                      sources:
                        type: array
                        items:
                          type: string
                    additionalProperties: false
                    required:
                      - status
                      - totalUsd
                      - sources
                additionalProperties: false
                required:
                  - resultCount
                  - toolCallCount
                  - failedToolCallCount
                  - cost
              history:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    status:
                      type: string
                    createdAt:
                      oneOf:
                        - type: 'null'
                        - type: string
                    completedAt:
                      oneOf:
                        - type: 'null'
                        - type: string
                  additionalProperties: false
                  required:
                    - id
                    - status
                    - createdAt
                    - completedAt
              actions:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    type:
                      oneOf:
                        - type: string
                          enum:
                            - prompt_copied
                        - type: string
                          enum:
                            - regression_created
                        - type: string
                          enum:
                            - fix_proposal_created
                        - type: string
                          enum:
                            - ci_proposal_created
                    opportunityKey:
                      oneOf:
                        - type: 'null'
                        - type: string
                    status:
                      type: string
                    resourceType:
                      oneOf:
                        - type: 'null'
                        - type: string
                    resourceId:
                      oneOf:
                        - type: 'null'
                        - type: string
                    href:
                      oneOf:
                        - type: 'null'
                        - type: string
                    createdAt:
                      oneOf:
                        - type: 'null'
                        - type: string
                  additionalProperties: false
                  required:
                    - id
                    - type
                    - opportunityKey
                    - status
                    - resourceType
                    - resourceId
                    - href
                    - createdAt
            additionalProperties: false
            required:
              - schemaVersion
              - baseline
              - preview
              - evaluation
              - run
              - findings
              - observability
              - history
              - actions
        total:
          type: number
      additionalProperties: false
      required:
        - baselines
        - total
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - INVALID_REFERENCE
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - FEATURE_LIMIT_REACHED
                - NO_ORG_MEMBERSHIP
                - SHARE_REVOKED
                - SHARE_EXPIRED
                - SHARE_UNAVAILABLE
                - PROVIDER_KEY_MISSING
                - PROVIDER_KEY_EXPIRED
                - PROVIDER_RATE_LIMITED
                - PROVIDER_UNAUTHORIZED
                - PROVIDER_UNAVAILABLE
                - AGENT_HANDOFF_INVALID
                - AGENT_HANDOFF_EXPIRED
                - AGENT_HANDOFF_DENIED
                - AGENT_HANDOFF_CONSUMED
                - PAYLOAD_TOO_LARGE
                - METHOD_NOT_ALLOWED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
            redaction:
              type: object
              properties:
                applied:
                  type: boolean
                  enum:
                    - true
                fieldCount:
                  type: integer
                  minimum: 0
                secretCount:
                  type: integer
                  minimum: 0
              required:
                - applied
                - fieldCount
                - secretCount
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        WWW-Authenticate:
          description: >-
            Bearer challenge. Agent-facing routes include the RFC 9728
            resource_metadata URL.
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        Retry-After:
          description: Delay in seconds before retrying when present.
          schema:
            type: integer
            minimum: 1
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: EvalGate API key
      description: >-
        Organization-scoped EvalGate API key. Discover the supported agent
        scopes at /.well-known/oauth-protected-resource. Per-operation grants
        are listed in x-evalgate-required-scopes; OpenAPI bearer security
        requirement arrays remain empty as required for non-OAuth schemes.
      x-evalgate-scopes-supported:
        - eval:read
        - eval:write
        - objectives:read
        - objectives:write
        - runs:read
        - runs:write
        - traces:read
        - traces:write
        - exports:download
        - reports:write
        - prompt:publish
        - scorer:publish
        - red_team:read
        - red_team:run
        - red_team:approve
        - docs:read
        - agent:read
        - agent:execute
        - admin:keys
        - admin:org
      x-evalgate-protected-resource-metadata: https://www.evalgate.com/.well-known/oauth-protected-resource

````