> ## 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 logs traceId

> Requires scopes: traces:read



## OpenAPI

````yaml /api-reference/openapi.json get /api/logs/traces/{traceId}
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  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/logs/traces/{traceId}:
    get:
      tags:
        - logs
      summary: Get logs traceId
      description: 'Requires scopes: traces:read'
      operationId: get_logs_traces_traceId
      parameters:
        - name: traceId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetApiLogsTracesTraceIdResponse200ApplicationJson
        '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'
      security:
        - bearerAuth:
            - traces:read
components:
  schemas:
    GetApiLogsTracesTraceIdResponse200ApplicationJson:
      type: object
      properties:
        trace:
          type: object
          properties:
            metadata:
              $ref: '#/components/schemas/JsonValue'
            createdAt:
              type: string
            retentionState:
              oneOf:
                - type: string
                  enum:
                    - redacted
                - type: string
                  enum:
                    - expired
                - type: string
                  enum:
                    - available
            id:
              type: number
            name:
              type: string
            traceId:
              type: string
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            status:
              type: string
            analysisStatus:
              oneOf:
                - type: 'null'
                - type: string
            source:
              oneOf:
                - type: 'null'
                - type: string
            environment:
              oneOf:
                - type: 'null'
                - type: string
            durationMs:
              oneOf:
                - type: 'null'
                - type: number
            score:
              oneOf:
                - type: 'null'
                - type: number
            activeRevisionId:
              oneOf:
                - type: 'null'
                - type: string
            sealStatus:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - metadata
            - createdAt
            - retentionState
            - id
            - name
            - traceId
            - organizationId
            - status
            - analysisStatus
            - source
            - environment
            - durationMs
            - score
            - activeRevisionId
            - sealStatus
        spans:
          type: array
          items:
            type: object
            properties:
              input:
                $ref: '#/components/schemas/JsonValue'
              output:
                $ref: '#/components/schemas/JsonValue'
              metadata:
                $ref: '#/components/schemas/JsonValue'
              id:
                type: number
              traceId:
                type: number
              spanId:
                type: string
              parentSpanId:
                oneOf:
                  - type: 'null'
                  - type: string
              name:
                type: string
              type:
                type: string
              startTime:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
              endTime:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
              durationMs:
                oneOf:
                  - type: 'null'
                  - type: number
              inputHash:
                oneOf:
                  - type: 'null'
                  - type: string
              evaluationRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              model:
                oneOf:
                  - type: 'null'
                  - type: string
              provider:
                oneOf:
                  - type: 'null'
                  - type: string
              tokenCount:
                oneOf:
                  - type: 'null'
                  - type: number
              createdAt:
                type: string
                format: date-time
            additionalProperties: false
            required:
              - input
              - output
              - metadata
              - id
              - traceId
              - spanId
              - parentSpanId
              - name
              - type
              - startTime
              - endTime
              - durationMs
              - inputHash
              - evaluationRunId
              - model
              - provider
              - tokenCount
              - createdAt
        modelCalls:
          type: array
          items:
            type: object
            properties:
              requestPreview:
                $ref: '#/components/schemas/JsonValue'
              responsePreview:
                $ref: '#/components/schemas/JsonValue'
              dataPolicySnapshot:
                $ref: '#/components/schemas/JsonValue'
              policySnapshot:
                $ref: '#/components/schemas/JsonValue'
              id:
                type: string
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              gatewayConfigId:
                oneOf:
                  - type: 'null'
                  - type: string
              routingProfileId:
                oneOf:
                  - type: 'null'
                  - type: string
              useCase:
                type: string
              backend:
                type: string
              provider:
                oneOf:
                  - type: 'null'
                  - type: string
              modelRequested:
                oneOf:
                  - type: 'null'
                  - type: string
              modelRouted:
                oneOf:
                  - type: 'null'
                  - type: string
              modelReturned:
                oneOf:
                  - type: 'null'
                  - type: string
              status:
                type: string
              evaluationId:
                oneOf:
                  - type: 'null'
                  - type: number
              evaluationRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              testCaseId:
                oneOf:
                  - type: 'null'
                  - type: number
              testResultId:
                oneOf:
                  - type: 'null'
                  - type: number
              traceId:
                oneOf:
                  - type: 'null'
                  - type: number
              spanId:
                oneOf:
                  - type: 'null'
                  - type: number
              toolCallId:
                oneOf:
                  - type: 'null'
                  - type: number
              judgeConfigId:
                oneOf:
                  - type: 'null'
                  - type: number
              judgeResultId:
                oneOf:
                  - type: 'null'
                  - type: number
              autoSessionId:
                oneOf:
                  - type: 'null'
                  - type: number
              syntheticCaseId:
                oneOf:
                  - type: 'null'
                  - type: number
              candidateCaseId:
                oneOf:
                  - type: 'null'
                  - type: number
              policyDecisionId:
                oneOf:
                  - type: 'null'
                  - type: string
              costRecordId:
                oneOf:
                  - type: 'null'
                  - type: number
              requestHash:
                oneOf:
                  - type: 'null'
                  - type: string
              responseHash:
                oneOf:
                  - type: 'null'
                  - type: string
              redactionState:
                type: string
              inputTokens:
                oneOf:
                  - type: 'null'
                  - type: number
              outputTokens:
                oneOf:
                  - type: 'null'
                  - type: number
              cachedInputTokens:
                oneOf:
                  - type: 'null'
                  - type: number
              totalTokens:
                oneOf:
                  - type: 'null'
                  - type: number
              costUsd:
                oneOf:
                  - type: 'null'
                  - type: string
              costSource:
                type: string
              latencyMs:
                oneOf:
                  - type: 'null'
                  - type: number
              retryCount:
                type: number
              fallbackChain:
                type: array
                items:
                  type: string
              routingDecisionSnapshot:
                type: object
                properties:
                  routingProfileId:
                    type: string
                  backend:
                    type: string
                  reason:
                    type: string
                  requestedModel:
                    type: string
                  routedModel:
                    type: string
                additionalProperties: false
              metadata:
                type: object
                properties:
                  useCase:
                    type: string
                  fallbackCount:
                    type: number
                  unavailableReason:
                    type: string
                  pricingVersion:
                    type: string
                  attemptSnapshot:
                    type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
                additionalProperties: false
              errorCode:
                oneOf:
                  - type: 'null'
                  - type: string
              errorMessage:
                oneOf:
                  - type: 'null'
                  - type: string
              provenanceState:
                type: string
              missingProvenanceParts:
                type: array
                items:
                  type: string
              lastReconciliationAt:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
              reconciliationAttempts:
                type: number
              provenanceFailureReason:
                oneOf:
                  - type: 'null'
                  - type: string
              createdAt:
                type: string
                format: date-time
            additionalProperties: false
            required:
              - requestPreview
              - responsePreview
              - dataPolicySnapshot
              - policySnapshot
              - id
              - organizationId
              - gatewayConfigId
              - routingProfileId
              - useCase
              - backend
              - provider
              - modelRequested
              - modelRouted
              - modelReturned
              - status
              - evaluationId
              - evaluationRunId
              - testCaseId
              - testResultId
              - traceId
              - spanId
              - toolCallId
              - judgeConfigId
              - judgeResultId
              - autoSessionId
              - syntheticCaseId
              - candidateCaseId
              - policyDecisionId
              - costRecordId
              - requestHash
              - responseHash
              - redactionState
              - inputTokens
              - outputTokens
              - cachedInputTokens
              - totalTokens
              - costUsd
              - costSource
              - latencyMs
              - retryCount
              - fallbackChain
              - routingDecisionSnapshot
              - metadata
              - errorCode
              - errorMessage
              - provenanceState
              - missingProvenanceParts
              - lastReconciliationAt
              - reconciliationAttempts
              - provenanceFailureReason
              - createdAt
        tools:
          type: array
          items:
            type: object
            properties:
              requestPreview:
                $ref: '#/components/schemas/JsonValue'
              responsePreview:
                $ref: '#/components/schemas/JsonValue'
              id:
                type: number
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              aiSystemId:
                oneOf:
                  - type: 'null'
                  - type: number
              permissionProfileId:
                oneOf:
                  - type: 'null'
                  - type: number
              traceId:
                oneOf:
                  - type: 'null'
                  - type: number
              spanId:
                oneOf:
                  - type: 'null'
                  - type: number
              workflowRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              runtimeId:
                oneOf:
                  - type: 'null'
                  - type: number
              runtimeVersionId:
                oneOf:
                  - type: 'null'
                  - type: number
              connectorId:
                oneOf:
                  - type: 'null'
                  - type: number
              connectorManifestSnapshotId:
                oneOf:
                  - type: 'null'
                  - type: number
              rawEventId:
                oneOf:
                  - type: 'null'
                  - type: number
              invocationId:
                oneOf:
                  - type: 'null'
                  - type: string
              runtimeKey:
                oneOf:
                  - type: 'null'
                  - type: string
              connectorKey:
                oneOf:
                  - type: 'null'
                  - type: string
              toolName:
                type: string
              operation:
                type: string
              requestHash:
                type: string
              responseHash:
                oneOf:
                  - type: 'null'
                  - type: string
              status:
                type: string
              latencyMs:
                oneOf:
                  - type: 'null'
                  - type: number
              errorCode:
                oneOf:
                  - type: 'null'
                  - type: string
              errorMessage:
                oneOf:
                  - type: 'null'
                  - type: string
              cost:
                oneOf:
                  - type: 'null'
                  - type: string
              sideEffectClass:
                type: string
              policyDecision:
                type: string
              metadata:
                allOf:
                  - type: object
                    properties:
                      schemaVersion:
                        type: number
                    additionalProperties: false
                  - type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
              startedAt:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
              completedAt:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
              createdAt:
                type: string
                format: date-time
            additionalProperties: false
            required:
              - requestPreview
              - responsePreview
              - id
              - organizationId
              - aiSystemId
              - permissionProfileId
              - traceId
              - spanId
              - workflowRunId
              - runtimeId
              - runtimeVersionId
              - connectorId
              - connectorManifestSnapshotId
              - rawEventId
              - invocationId
              - runtimeKey
              - connectorKey
              - toolName
              - operation
              - requestHash
              - responseHash
              - status
              - latencyMs
              - errorCode
              - errorMessage
              - cost
              - sideEffectClass
              - policyDecision
              - metadata
              - startedAt
              - completedAt
              - createdAt
        scores:
          type: array
          items:
            type: object
            properties:
              input:
                $ref: '#/components/schemas/JsonValue'
              output:
                $ref: '#/components/schemas/JsonValue'
              reasoning:
                $ref: '#/components/schemas/JsonValue'
              id:
                type: number
              configId:
                type: number
              evaluationRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              testCaseId:
                oneOf:
                  - type: 'null'
                  - type: number
              score:
                type: number
              judgeConfigHash:
                type: string
              promptSnapshot:
                oneOf:
                  - type: 'null'
                  - type: string
              completionSnapshot:
                oneOf:
                  - type: 'null'
                  - type: string
              temperature:
                type: number
              metadata:
                oneOf:
                  - type: 'null'
                  - type: object
                    properties:
                      originalScore:
                        oneOf:
                          - type: 'null'
                          - type: number
                      originalStatus:
                        type: string
                      passed:
                        oneOf:
                          - type: boolean
                            enum:
                              - false
                          - type: boolean
                            enum:
                              - true
                      evaluationRunId:
                        type: number
                      error:
                        type: string
                      generatedAt:
                        type: string
                      judgeResults:
                        type: array
                        items:
                          type: object
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                      aggregation:
                        type: string
                      confidence:
                        type: number
                      signals:
                        type: object
                        additionalProperties:
                          oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                      model:
                        type: string
                      provider:
                        type: string
                      judgeId:
                        type: string
                      latencyMs:
                        type: number
                      tokenUsage:
                        type: object
                        properties:
                          input:
                            type: number
                          output:
                            type: number
                        additionalProperties: false
                      retries:
                        type: number
                      parseStatus:
                        oneOf:
                          - type: string
                            enum:
                              - failed
                          - type: string
                            enum:
                              - ok
                          - type: string
                            enum:
                              - retried
                      scoreA:
                        type: number
                      scoreB:
                        type: number
                      winner:
                        oneOf:
                          - type: string
                            enum:
                              - A
                          - type: string
                            enum:
                              - B
                          - type: string
                            enum:
                              - tie
                      outputA:
                        type: string
                      outputB:
                        type: string
                      judgeVariance:
                        type: number
                      disagreement:
                        type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                      totalCostUsd:
                        type: number
                      flags:
                        type: array
                        items:
                          type: string
                      judgeModelProvenance:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/JsonValue'
                            - type: object
                              additionalProperties:
                                $ref: '#/components/schemas/JsonValue'
                      primaryJudgeModelProvenance:
                        oneOf:
                          - $ref: '#/components/schemas/JsonValue'
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                      temperature:
                        type: number
                      top_p:
                        type: number
                      seed:
                        type: number
                      max_tokens:
                        type: number
                      prompt_hash:
                        type: string
                      evaluationTime:
                        type: number
                      modelVersion:
                        type: string
                      judgeConfigHash:
                        oneOf:
                          - type: 'null'
                          - type: string
                      rubricHash:
                        oneOf:
                          - type: 'null'
                          - type: string
                      normalizedScore:
                        oneOf:
                          - type: 'null'
                          - type: number
                      normalizedScoreUnavailableReason:
                        type: string
                      comparableAcrossJudgeConfigs:
                        oneOf:
                          - type: boolean
                            enum:
                              - false
                          - type: boolean
                            enum:
                              - true
                      comparabilityStatus:
                        oneOf:
                          - type: string
                            enum:
                              - not_comparable
                          - type: string
                            enum:
                              - exact_comparable
                          - type: string
                            enum:
                              - calibrated_comparable
                          - type: string
                            enum:
                              - trend_discontinuity
                      comparabilityGroupId:
                        oneOf:
                          - type: 'null'
                          - type: string
                      mappingVersionId:
                        oneOf:
                          - type: 'null'
                          - type: string
                      calibrationSetId:
                        oneOf:
                          - type: 'null'
                          - type: string
                      calibrationSetVersionId:
                        oneOf:
                          - type: 'null'
                          - type: string
                      calibrationRunId:
                        oneOf:
                          - type: 'null'
                          - type: string
                      scoreMappingId:
                        oneOf:
                          - type: 'null'
                          - type: string
                      normalizationMethod:
                        oneOf:
                          - type: 'null'
                          - type: string
                            enum:
                              - percentile
                          - type: string
                            enum:
                              - z_score
                          - type: string
                            enum:
                              - isotonic
                      scoreScaleVersion:
                        type: string
                      uncertainty:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              ciLower:
                                type: number
                              ciUpper:
                                type: number
                              sampleSize:
                                type: number
                            additionalProperties: false
                      modelCallId:
                        oneOf:
                          - type: 'null'
                          - type: string
                    additionalProperties: false
              evaluatorReleaseId:
                oneOf:
                  - type: 'null'
                  - type: string
              executionBatchId:
                oneOf:
                  - type: 'null'
                  - type: string
              resultKind:
                oneOf:
                  - type: 'null'
                  - type: string
              aggregateParentId:
                oneOf:
                  - type: 'null'
                  - type: number
              presentationOrder:
                oneOf:
                  - type: 'null'
                  - type: string
              logicalPairId:
                oneOf:
                  - type: 'null'
                  - type: string
              rawScore:
                oneOf:
                  - type: 'null'
                  - type: number
              normalizedScore:
                oneOf:
                  - type: 'null'
                  - type: number
              calibratedScore:
                oneOf:
                  - type: 'null'
                  - type: number
              comparabilityStatus:
                oneOf:
                  - type: string
                    enum:
                      - not_comparable
                  - type: string
                    enum:
                      - exact_comparable
                  - type: string
                    enum:
                      - calibrated_comparable
                  - type: string
                    enum:
                      - trend_discontinuity
              comparabilityGroupId:
                oneOf:
                  - type: 'null'
                  - type: string
              mappingVersionId:
                oneOf:
                  - type: 'null'
                  - type: string
              calibrationSetId:
                oneOf:
                  - type: 'null'
                  - type: string
              calibrationSetVersionId:
                oneOf:
                  - type: 'null'
                  - type: string
              calibrationRunId:
                oneOf:
                  - type: 'null'
                  - type: string
              scoreMappingId:
                oneOf:
                  - type: 'null'
                  - type: string
              normalizationMethod:
                oneOf:
                  - type: 'null'
                  - type: string
                    enum:
                      - percentile
                  - type: string
                    enum:
                      - z_score
                  - type: string
                    enum:
                      - isotonic
              calibratedScoreScaleVersion:
                oneOf:
                  - type: 'null'
                  - type: string
              normalizedScoreUnavailableReason:
                oneOf:
                  - type: 'null'
                  - type: string
              comparabilityUncertainty:
                oneOf:
                  - type: 'null'
                  - type: object
                    properties:
                      ciLower:
                        type: number
                      ciUpper:
                        type: number
                      sampleSize:
                        type: number
                    additionalProperties: false
              scoreMinimum:
                oneOf:
                  - type: 'null'
                  - type: number
              scoreMaximum:
                oneOf:
                  - type: 'null'
                  - type: number
              scoreDirection:
                oneOf:
                  - type: 'null'
                  - type: string
              normalizationVersion:
                oneOf:
                  - type: 'null'
                  - type: string
              createdAt:
                type: string
                format: date-time
            additionalProperties: false
            required:
              - input
              - output
              - reasoning
              - id
              - configId
              - evaluationRunId
              - testCaseId
              - score
              - judgeConfigHash
              - promptSnapshot
              - completionSnapshot
              - temperature
              - metadata
              - evaluatorReleaseId
              - executionBatchId
              - resultKind
              - aggregateParentId
              - presentationOrder
              - logicalPairId
              - rawScore
              - normalizedScore
              - calibratedScore
              - comparabilityStatus
              - comparabilityGroupId
              - mappingVersionId
              - calibrationSetId
              - calibrationSetVersionId
              - calibrationRunId
              - scoreMappingId
              - normalizationMethod
              - calibratedScoreScaleVersion
              - normalizedScoreUnavailableReason
              - comparabilityUncertainty
              - scoreMinimum
              - scoreMaximum
              - scoreDirection
              - normalizationVersion
              - createdAt
        costs:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              spanId:
                oneOf:
                  - type: 'null'
                  - type: number
              workflowRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              evaluationRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              provider:
                type: string
              model:
                type: string
              inputTokens:
                type: number
              outputTokens:
                type: number
              totalTokens:
                type: number
              inputCost:
                type: string
              outputCost:
                type: string
              totalCost:
                type: string
              isRetry:
                oneOf:
                  - type: 'null'
                  - type: boolean
                    enum:
                      - false
                  - type: boolean
                    enum:
                      - true
              retryNumber:
                oneOf:
                  - type: 'null'
                  - type: number
              costCategory:
                type: string
              costSource:
                type: string
              pricingVersion:
                oneOf:
                  - type: 'null'
                  - type: string
              environment:
                type: string
              isTest:
                oneOf:
                  - type: 'null'
                  - type: boolean
                    enum:
                      - false
                  - type: boolean
                    enum:
                      - true
              agentName:
                oneOf:
                  - type: 'null'
                  - type: string
              stepName:
                oneOf:
                  - type: 'null'
                  - type: string
              promptHash:
                oneOf:
                  - type: 'null'
                  - type: string
              cachedInputTokens:
                oneOf:
                  - type: 'null'
                  - type: number
              modelCallId:
                oneOf:
                  - type: 'null'
                  - type: string
              createdAt:
                type: string
                format: date-time
            additionalProperties: false
            required:
              - id
              - spanId
              - workflowRunId
              - evaluationRunId
              - organizationId
              - provider
              - model
              - inputTokens
              - outputTokens
              - totalTokens
              - inputCost
              - outputCost
              - totalCost
              - isRetry
              - retryNumber
              - costCategory
              - costSource
              - pricingVersion
              - environment
              - isTest
              - agentName
              - stepName
              - promptHash
              - cachedInputTokens
              - modelCallId
              - createdAt
        evidence:
          type: array
          items:
            type: object
            properties:
              preview:
                $ref: '#/components/schemas/JsonValue'
              id:
                type: number
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              aiSystemId:
                oneOf:
                  - type: 'null'
                  - type: number
              runtimeId:
                oneOf:
                  - type: 'null'
                  - type: number
              runtimeVersionId:
                oneOf:
                  - type: 'null'
                  - type: number
              connectorId:
                oneOf:
                  - type: 'null'
                  - type: number
              connectorManifestSnapshotId:
                oneOf:
                  - type: 'null'
                  - type: number
              rawEventId:
                oneOf:
                  - type: 'null'
                  - type: number
              traceId:
                oneOf:
                  - type: 'null'
                  - type: number
              spanId:
                oneOf:
                  - type: 'null'
                  - type: number
              workflowRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              evaluationId:
                oneOf:
                  - type: 'null'
                  - type: number
              evaluationRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              testResultId:
                oneOf:
                  - type: 'null'
                  - type: number
              toolInvocationEvidenceId:
                oneOf:
                  - type: 'null'
                  - type: number
              sideEffectLedgerId:
                oneOf:
                  - type: 'null'
                  - type: number
              policyDecisionId:
                oneOf:
                  - type: 'null'
                  - type: number
              evidenceKey:
                oneOf:
                  - type: 'null'
                  - type: string
              kind:
                type: string
              source:
                type: string
              subjectType:
                type: string
              subjectId:
                oneOf:
                  - type: 'null'
                  - type: string
              contentHash:
                type: string
              redactionState:
                type: string
              storageUri:
                oneOf:
                  - type: 'null'
                  - type: string
              score:
                oneOf:
                  - type: 'null'
                  - type: number
              confidence:
                oneOf:
                  - type: 'null'
                  - type: number
              metadata:
                allOf:
                  - type: object
                    properties:
                      schemaVersion:
                        type: number
                      tags:
                        type: array
                        items:
                          type: string
                    additionalProperties: false
                  - type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
              createdAt:
                type: string
                format: date-time
            additionalProperties: false
            required:
              - preview
              - id
              - organizationId
              - aiSystemId
              - runtimeId
              - runtimeVersionId
              - connectorId
              - connectorManifestSnapshotId
              - rawEventId
              - traceId
              - spanId
              - workflowRunId
              - evaluationId
              - evaluationRunId
              - testResultId
              - toolInvocationEvidenceId
              - sideEffectLedgerId
              - policyDecisionId
              - evidenceKey
              - kind
              - source
              - subjectType
              - subjectId
              - contentHash
              - redactionState
              - storageUri
              - score
              - confidence
              - metadata
              - createdAt
        policies:
          type: array
          items:
            type: object
            properties:
              input:
                $ref: '#/components/schemas/JsonValue'
              id:
                type: number
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              aiSystemId:
                oneOf:
                  - type: 'null'
                  - type: number
              permissionProfileId:
                oneOf:
                  - type: 'null'
                  - type: number
              runtimeId:
                oneOf:
                  - type: 'null'
                  - type: number
              runtimeVersionId:
                oneOf:
                  - type: 'null'
                  - type: number
              connectorId:
                oneOf:
                  - type: 'null'
                  - type: number
              connectorManifestSnapshotId:
                oneOf:
                  - type: 'null'
                  - type: number
              rawEventId:
                oneOf:
                  - type: 'null'
                  - type: number
              toolInvocationEvidenceId:
                oneOf:
                  - type: 'null'
                  - type: number
              sideEffectLedgerId:
                oneOf:
                  - type: 'null'
                  - type: number
              decisionKey:
                oneOf:
                  - type: 'null'
                  - type: string
              policyVersion:
                type: string
              question:
                type: string
              decision:
                type: string
              severity:
                type: string
              reasonCode:
                oneOf:
                  - type: 'null'
                  - type: string
              reason:
                oneOf:
                  - type: 'null'
                  - type: string
              inputHash:
                oneOf:
                  - type: 'null'
                  - type: string
              evidenceItemIds:
                type: array
                items:
                  type: number
              metadata:
                allOf:
                  - type: object
                    properties:
                      schemaVersion:
                        type: number
                    additionalProperties: false
                  - type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
              decidedAt:
                type: string
                format: date-time
              createdAt:
                type: string
                format: date-time
            additionalProperties: false
            required:
              - input
              - id
              - organizationId
              - aiSystemId
              - permissionProfileId
              - runtimeId
              - runtimeVersionId
              - connectorId
              - connectorManifestSnapshotId
              - rawEventId
              - toolInvocationEvidenceId
              - sideEffectLedgerId
              - decisionKey
              - policyVersion
              - question
              - decision
              - severity
              - reasonCode
              - reason
              - inputHash
              - evidenceItemIds
              - metadata
              - decidedAt
              - createdAt
        alerts:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              monitorId:
                type: number
              monitorVersionId:
                oneOf:
                  - type: 'null'
                  - type: string
              executionId:
                oneOf:
                  - type: 'null'
                  - type: string
              sampleId:
                oneOf:
                  - type: 'null'
                  - type: number
              monitorRunId:
                oneOf:
                  - type: 'null'
                  - type: number
              traceId:
                type: number
              severity:
                type: string
              status:
                type: string
              title:
                type: string
              message:
                oneOf:
                  - type: 'null'
                  - type: string
              modelCallId:
                oneOf:
                  - type: 'null'
                  - type: string
              dedupeKey:
                oneOf:
                  - type: 'null'
                  - type: string
              deliveryState:
                type: string
              reviewItemId:
                oneOf:
                  - type: 'null'
                  - type: number
              candidateId:
                oneOf:
                  - type: 'null'
                  - type: number
              remediationStatus:
                type: string
              metadata:
                type: object
                properties:
                  checkSummary:
                    type: object
                    properties:
                      statusFailure:
                        type: boolean
                      signalCount:
                        type: number
                      aggregatedConfidence:
                        type: number
                      topCategory:
                        oneOf:
                          - type: 'null'
                          - type: string
                      gatewaySkipReason:
                        oneOf:
                          - type: 'null'
                          - type: string
                      judgeAlert:
                        oneOf:
                          - type: 'null'
                          - type: boolean
                            enum:
                              - false
                          - type: boolean
                            enum:
                              - true
                      judgeSeverity:
                        oneOf:
                          - type: 'null'
                          - type: string
                      judgeCategory:
                        oneOf:
                          - type: 'null'
                          - type: string
                      judgeConfidence:
                        oneOf:
                          - type: 'null'
                          - type: number
                      judgeReason:
                        oneOf:
                          - type: 'null'
                          - type: string
                    additionalProperties: false
                    required:
                      - statusFailure
                      - signalCount
                      - aggregatedConfidence
                      - topCategory
                      - gatewaySkipReason
                  traceKey:
                    type: string
                additionalProperties: false
              createdAt:
                type: string
                format: date-time
              acknowledgedAt:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
              acknowledgedBy:
                oneOf:
                  - type: 'null'
                  - type: string
              resolvedAt:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
              resolvedBy:
                oneOf:
                  - type: 'null'
                  - type: string
            additionalProperties: false
            required:
              - id
              - organizationId
              - monitorId
              - monitorVersionId
              - executionId
              - sampleId
              - monitorRunId
              - traceId
              - severity
              - status
              - title
              - message
              - modelCallId
              - dedupeKey
              - deliveryState
              - reviewItemId
              - candidateId
              - remediationStatus
              - metadata
              - createdAt
              - acknowledgedAt
              - acknowledgedBy
              - resolvedAt
              - resolvedBy
        reviews:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              reasonCode:
                type: string
              status:
                type: string
              severity:
                type: string
              sourceType:
                type: string
              sourceId:
                type: string
              evaluationId:
                oneOf:
                  - type: 'null'
                  - type: number
              title:
                type: string
              summary:
                oneOf:
                  - type: 'null'
                  - type: string
              provenance:
                type: object
                properties:
                  sourceLabel:
                    type: string
                  redactedPreview:
                    type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
                  traceKey:
                    type: string
                  evalCaseId:
                    type: string
                  confidence:
                    type: number
                additionalProperties: false
              assignedTo:
                oneOf:
                  - type: 'null'
                  - type: string
              createdBy:
                oneOf:
                  - type: 'null'
                  - type: string
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              resolvedAt:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
            additionalProperties: false
            required:
              - id
              - organizationId
              - reasonCode
              - status
              - severity
              - sourceType
              - sourceId
              - evaluationId
              - title
              - summary
              - provenance
              - assignedTo
              - createdBy
              - createdAt
              - updatedAt
              - resolvedAt
        nextCursors:
          type: object
          properties:
            evidence:
              oneOf:
                - type: 'null'
                - type: string
            costs:
              oneOf:
                - type: 'null'
                - type: string
            spans:
              oneOf:
                - type: 'null'
                - type: string
            tools:
              oneOf:
                - type: 'null'
                - type: string
            scores:
              oneOf:
                - type: 'null'
                - type: string
            alerts:
              oneOf:
                - type: 'null'
                - type: string
            policies:
              oneOf:
                - type: 'null'
                - type: string
            modelCalls:
              oneOf:
                - type: 'null'
                - type: string
            reviews:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
        truncated:
          type: object
          additionalProperties:
            type: boolean
      additionalProperties: false
      required:
        - trace
        - spans
        - modelCalls
        - tools
        - scores
        - costs
        - evidence
        - policies
        - alerts
        - reviews
        - nextCursors
        - truncated
    JsonValue:
      oneOf:
        - type: 'null'
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    OrganizationId:
      type: string
      format: uuid
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          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'
    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'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````