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

# Get guardrail evaluation by ID

> Returns one guardrail validation record by ID, including full validator component results.

Use this endpoint after listing evaluations via `GET .../guardrails/evaluations` when you need prompt/response content, per-validator outcomes, latency, and enforcement details for a single run.

The `evaluationId` is the `id` field from list results.



## OpenAPI

````yaml /openapi.json get /applications/{applicationId}/guardrails/evaluations/{evaluationId}
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}/guardrails/evaluations/{evaluationId}:
    get:
      tags:
        - Guardrails
      summary: Get guardrail evaluation by ID
      description: >-
        Returns one guardrail validation record by ID, including full validator
        component results.


        Use this endpoint after listing evaluations via `GET
        .../guardrails/evaluations` when you need prompt/response content,
        per-validator outcomes, latency, and enforcement details for a single
        run.


        The `evaluationId` is the `id` field from list results.
      operationId: getGuardrailEvaluationById
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - name: evaluationId
          in: path
          required: true
          schema:
            type: string
          description: Guardrail evaluation record ID from list results (`results[].id`).
      responses:
        '200':
          description: Guardrail evaluation detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardrailEvaluationDetailResponse'
        '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`.
  schemas:
    GuardrailEvaluationDetailResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          description: >-
            Full guardrail validation record with per-validator component
            results.
          properties:
            id:
              type: string
              description: Evaluation record ID.
            guardrail_stage:
              type: string
              enum:
                - input
                - output
              description: >-
                Whether validators ran on the prompt (input) or model response
                (output).
            prompt:
              type: string
              description: Original prompt text when stage is input.
            response:
              type: string
              description: Original model response when stage is output.
            final_content:
              type: string
              description: >-
                Content after enforcement actions (mask, filter, etc.), when
                applicable.
            latency:
              type: number
              description: Total guardrail latency in milliseconds.
            app_version:
              type: string
              nullable: true
            environment:
              type: string
              nullable: true
            created_at:
              type: string
              format: date-time
            cost:
              type: number
              description: >-
                Estimated TRU credits cost for LLM-backed validators in this
                run.
            allComponents:
              type: array
              description: >-
                Per-validator results in execution order, including pass/fail,
                scores, and optional token usage.
              items:
                type: object
                additionalProperties: true
    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
  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>

        ```

````