Detectors

Create a detector

Create 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). Idempotent on the detector name within the project.

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. payload (CreateDetectorRequest): The detector to create. _live (None): Write-path liveness gate (blocks a revoked JWT session).

Returns: CreateDetectorResponse: The created (or matched) detector.

post/api/v1/public/detectors

Request

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

Request body

detection_modelstring nullable
detection_providerstring nullable
detection_sourcestring nullable
enable_rcaboolean nullable
enabledboolean nullable
namestring required
project_idstring required
promptstring nullable

Detector instructions. Omit to adopt the canonical instructions of a standard template; required for any other template.

sample_rateinteger nullable
templatestring required

Response

Successful Response

createdboolean required
enabledboolean required
idstring required
namestring required
project_idstring required
sample_rateinteger required

Changes

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