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

# Get Finding By Trace

> Get the finding for a single trace (findings are 1-per-trace).



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/public/detectors/traces/{trace_id}/finding
openapi: 3.1.0
info:
  title: TraceRoot Public API
  version: 0.1.0
servers:
  - description: TraceRoot Cloud
    url: https://app.traceroot.ai
  - description: Self-hosted
    url: '{baseUrl}'
    variables:
      baseUrl:
        default: http://localhost:8000
        description: Your TraceRoot backend URL
security: []
paths:
  /api/v1/public/detectors/traces/{trace_id}/finding:
    get:
      tags:
        - Detectors
      summary: Get Finding By Trace
      description: Get the finding for a single trace (findings are 1-per-trace).
      operationId: get_finding_by_trace
      parameters:
        - in: path
          name: trace_id
          required: true
          schema:
            title: Trace Id
            type: string
        - description: >-
            Target project for the request. Required when authenticating with a
            user session token (a user credential is only meaningful scoped to a
            project); for an API key it is optional and, if given, must match
            the key's project.
          in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Target project for the request. Required when authenticating with
              a user session token (a user credential is only meaningful scoped
              to a project); for an API key it is optional and, if given, must
              match the key's project.
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindingDetail'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication failed
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Finding not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Failed to read finding
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication service unavailable
      security:
        - BearerAuth: []
components:
  schemas:
    FindingDetail:
      description: A finding plus its per-detector results and optional free-text RCA.
      properties:
        detectors:
          items:
            type: string
          title: Detectors
          type: array
        finding_id:
          title: Finding Id
          type: string
        project_id:
          title: Project Id
          type: string
        rca:
          anyOf:
            - $ref: '#/components/schemas/RCAResult'
            - type: 'null'
        results:
          items:
            $ref: '#/components/schemas/DetectorResultItem'
          title: Results
          type: array
        run_ids:
          default: []
          items:
            type: string
          title: Run Ids
          type: array
        signals:
          default: []
          items:
            $ref: '#/components/schemas/FindingSignal'
          title: Signals
          type: array
        summary:
          title: Summary
          type: string
        timestamp:
          format: date-time
          title: Timestamp
          type: string
        trace_id:
          title: Trace Id
          type: string
      required:
        - finding_id
        - project_id
        - trace_id
        - summary
        - timestamp
        - detectors
        - results
        - rca
      title: FindingDetail
      type: object
    ErrorResponse:
      description: >-
        The canonical public error envelope (matches the gateway's normalized
        shape).
      properties:
        detail:
          title: Detail
          type: string
      required:
        - detail
      title: ErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    RCAResult:
      description: >-
        Free-text root-cause analysis for a finding (Postgres
        ``detector_rcas``).


        The agent trace behind an RCA (``detector_rca_executions``) is internal
        and

        deliberately not part of this contract: its trace id is not readable
        through

        the public trace endpoints, so advertising it here would be misleading.
      properties:
        inherited:
          default: false
          title: Inherited
          type: boolean
        result:
          anyOf:
            - type: string
            - type: 'null'
          title: Result
        status:
          title: Status
          type: string
      required:
        - status
        - result
      title: RCAResult
      type: object
    DetectorResultItem:
      description: >-
        One detector's result within a finding, normalized from the stored
        payload.


        The stored finding ``payload`` uses camelCase keys (``detectorId`` /

        ``detectorName``); the public API exposes snake_case. Only triggered
        detectors

        are persisted, so ``identified`` is always ``True`` for a present item.
        ``data``

        is the detector's opaque output, passed through verbatim. ``template``
        is looked

        up from the Postgres ``detectors`` row and is ``None`` when that row is
        absent

        (e.g. a deleted detector).
      properties:
        data:
          anyOf:
            - {}
            - type: 'null'
          title: Data
        detector_id:
          title: Detector Id
          type: string
        detector_name:
          title: Detector Name
          type: string
        identified:
          title: Identified
          type: boolean
        signal_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Signal Id
        signal_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Signal Status
        signal_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Signal Title
        summary:
          title: Summary
          type: string
        template:
          anyOf:
            - type: string
            - type: 'null'
          title: Template
      required:
        - detector_id
        - detector_name
        - template
        - summary
        - identified
        - data
      title: DetectorResultItem
      type: object
    FindingSignal:
      description: The signal one detector's hit in a finding belongs to.
      properties:
        detector_id:
          title: Detector Id
          type: string
        signal_id:
          title: Signal Id
          type: string
        signal_status:
          title: Signal Status
          type: string
        signal_title:
          title: Signal Title
          type: string
      required:
        - detector_id
        - signal_id
        - signal_title
        - signal_status
      title: FindingSignal
      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:
    BearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.