> ## 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 Detector

> Get one detector's full configuration for the key's project.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/public/detectors/{detector_id}
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/{detector_id}:
    get:
      tags:
        - Detectors
      summary: Get Detector
      description: Get one detector's full configuration for the key's project.
      operationId: get_detector
      parameters:
        - in: path
          name: detector_id
          required: true
          schema:
            title: Detector 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/DetectorDetail'
          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: Detector 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 detector
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication service unavailable
      security:
        - BearerAuth: []
components:
  schemas:
    DetectorDetail:
      description: >-
        A detector's full configuration (Postgres ``detectors`` + optional
        trigger).


        ``trigger_conditions`` comes from ``detector_triggers.conditions`` and
        is

        None when the detector has no trigger row (it then runs on every sampled

        trace).
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        detection_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Detection Model
        detection_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Detection Provider
        detection_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Detection Source
        detector_id:
          title: Detector Id
          type: string
        enable_rca:
          title: Enable Rca
          type: boolean
        enabled:
          title: Enabled
          type: boolean
        name:
          title: Name
          type: string
        output_schema:
          anyOf:
            - {}
            - type: 'null'
          title: Output Schema
        prompt:
          title: Prompt
          type: string
        sample_rate:
          title: Sample Rate
          type: integer
        template:
          title: Template
          type: string
        trigger_conditions:
          anyOf:
            - {}
            - type: 'null'
          title: Trigger Conditions
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - detector_id
        - name
        - template
        - enabled
        - created_at
        - prompt
        - output_schema
        - sample_rate
        - enable_rca
        - detection_model
        - detection_provider
        - detection_source
        - updated_at
        - trigger_conditions
      title: DetectorDetail
      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
    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.