Detectors

Edit a detector

Edit a detector in a project the authenticated user can write to.

Requires MEMBER role or higher in the project's workspace (the write service decides). Only the sent fields change; template is immutable.

Args: request (Request): Incoming request (rate-limit plumbing). response (Response): Outgoing response (rate-limit plumbing). auth (AccountStampedAuth): Account-scope user auth (session token or CLI access JWT); its resolved user_id becomes the actor. detector_id (str): The detector to edit. payload (UpdateDetectorRequest): The project and the fields to change. _live (None): Write-path liveness gate (blocks a revoked JWT session).

Returns: UpdateDetectorResponse: The updated detector and the changed fields.

Raises: HTTPException: The write service's 400/403/404/409 verbatim, or a 503 when its response is ambiguous.

patch/api/v1/public/detectors/{detector_id}

Request

  • Base URL
    https://app.traceroot.ai
  • URL
    https://app.traceroot.ai/api/v1/public/detectors/{detector_id}
  • Auth
    HTTP bearer

Path parameters

detector_idstring required

Request body

detection_modelstring nullable
detection_providerstring nullable
detection_source'system' | 'byok' nullable
enable_rcaboolean
enabledboolean

The pause switch. Detection is ingestion-triggered, so enabling starts nothing retroactively.

namestring
project_idstring required
promptstring

Detector instructions, stored verbatim. There is no reset to a template's default on update: send the canonical text to restore it.

sample_rateinteger

Response

Successful Response

changedstring[] required
updatedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.