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

# List traces with optional evaluation summary

> Returns a paginated list of traces for an application in the requested time range. Includes traces with or without evaluation results.

Each row includes trace metadata (timing, span count, status). Evaluated traces include a compact `evaluation` summary — not full span or detailed evaluation payloads.

**Source** (`source`): `monitoring`, `security`, or `all` (default).

**Outcome** (`outcome`): `all` (default) returns every trace in range. Use `pass`, `fail`, or `error` to filter traces by overall evaluation result.

**Metric filter** (`metricName`): optional metric or security plugin name. Combine with `outcome` `pass`, `fail`, or `error` to return only traces where that specific metric passed, failed, or errored.



## OpenAPI

````yaml /openapi.json get /applications/{applicationId}/traces
openapi: 3.0.0
info:
  title: Trusys API
  version: 1.0.0
  description: >-
    Programmatic access to Trusys for integrating AI quality monitoring,
    evaluation, and guardrails into your own systems — without using the Trusys
    UI.


    **Typical integration flow**


    1. `POST /applications` — register your application and get an id.

    2. `PUT /applications/{id}/monitoring` and/or `PUT
    /applications/{id}/guardrails` — configure which metrics, security plugins,
    and guardrails apply.

    3. `POST /applications/{id}/evaluations` — submit prompt/response traces to
    be scored as your application runs.

    4. `GET /applications/{id}/traces`, `GET /applications/{id}/evaluations`,
    and `POST /applications/{id}/widget-data` — pull results, trends, and
    dashboard-equivalent chart data back into your own tools.


    All requests require an `x-api-key` header (see Authentication). All
    timestamps are ISO 8601 UTC. Paginated endpoints default to 20 items per
    page (max 100).
servers:
  - url: https://app.trusys.ai/api/external
security:
  - ApiKeyAuth: []
paths:
  /applications/{applicationId}/traces:
    get:
      tags:
        - Traces
      summary: List traces with optional evaluation summary
      description: >-
        Returns a paginated list of traces for an application in the requested
        time range. Includes traces with or without evaluation results.


        Each row includes trace metadata (timing, span count, status). Evaluated
        traces include a compact `evaluation` summary — not full span or
        detailed evaluation payloads.


        **Source** (`source`): `monitoring`, `security`, or `all` (default).


        **Outcome** (`outcome`): `all` (default) returns every trace in range.
        Use `pass`, `fail`, or `error` to filter traces by overall evaluation
        result.


        **Metric filter** (`metricName`): optional metric or security plugin
        name. Combine with `outcome` `pass`, `fail`, or `error` to return only
        traces where that specific metric passed, failed, or errored.
      operationId: listTraces
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/start'
        - $ref: '#/components/parameters/end'
        - name: source
          in: query
          required: false
          schema:
            type: string
            enum:
              - monitoring
              - security
              - all
            default: all
        - name: outcome
          in: query
          required: false
          schema:
            type: string
            enum:
              - all
              - pass
              - fail
              - error
            default: all
        - name: metricName
          in: query
          required: false
          schema:
            type: string
          description: >-
            Optional metric or security plugin name. With `outcome` set to
            `pass`, `fail`, or `error`, filters to traces where that metric
            scored accordingly.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Paginated trace list with optional evaluation summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraceResultsListResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    applicationId:
      name: applicationId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: >-
        Unique identifier (UUID) of the application. Returned by `POST
        /applications`.
    start:
      name: start
      in: query
      required: true
      schema:
        type: string
        format: date-time
      description: >-
        Start of the time range, inclusive. ISO 8601 datetime in UTC (for
        example `2026-07-01T00:00:00.000Z`).
      example: '2026-07-01T00:00:00.000Z'
    end:
      name: end
      in: query
      required: true
      schema:
        type: string
        format: date-time
      description: >-
        End of the time range, inclusive. Must be the same as or after `start`.
        ISO 8601 datetime in UTC.
      example: '2026-07-02T23:59:59.999Z'
    page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Page number for paginated results (1-based).
    limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      description: Maximum number of applications per page (max 100).
  schemas:
    TraceResultsListResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/TraceResultListItem'
            count:
              type: integer
            page:
              type: integer
            limit:
              type: integer
    TraceResultListItem:
      type: object
      properties:
        traceId:
          type: string
        applicationId:
          type: string
          format: uuid
        startTime:
          type: string
          format: date-time
          nullable: true
        endTime:
          type: string
          format: date-time
          nullable: true
        spanCount:
          type: integer
        status:
          type: string
          enum:
            - success
            - error
        evaluation:
          $ref: '#/components/schemas/TraceEvalSummary'
    ValidationErrorResponse:
      type: object
      description: Returned when request body or query parameters fail validation.
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Invalid request body
          description: Summary of the validation failure.
        errors:
          type: array
          description: Per-field validation errors.
          items:
            type: object
            properties:
              path:
                type: string
                description: >-
                  JSON path to the invalid field (for example
                  `traces.0.prompt`).
              message:
                type: string
                description: Why the field failed validation.
    ErrorResponse:
      type: object
      description: Standard error envelope for non-validation failures.
      properties:
        success:
          type: boolean
          example: false
          description: Always `false` for errors.
        message:
          type: string
          description: Human-readable explanation of the error.
      required:
        - success
        - message
    TraceEvalSummary:
      type: object
      description: Compact evaluation metadata for a trace (list view).
      properties:
        evaluated:
          type: boolean
          example: true
        evalId:
          type: string
        success:
          type: boolean
        score:
          type: number
          nullable: true
        source:
          type: string
          enum:
            - monitoring
            - security
        failureReason:
          type: integer
          nullable: true
        hasError:
          type: boolean
        metricNames:
          type: array
          items:
            type: string
        evaluatedAt:
          type: string
          format: date-time
  responses:
    ValidationError:
      description: >-
        The request body or query parameters are invalid. See the `errors` array
        for field-level detail.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            success: false
            message: Invalid request body
            errors:
              - path: name
                message: name is required
    Unauthorized:
      description: >-
        The API key is missing, invalid, or revoked. Verify the `x-api-key`
        header and that the key is active in Trusys settings.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Error while verifying api key
    NotFound:
      description: The requested resource does not exist, or your API key cannot access it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Application not found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Trusys API key. Create and manage keys in the Trusys UI under
        **Settings → API Keys**.


        Include the key on every request:


        ```

        x-api-key: <your-api-key>

        ```

````