---
title: "List guardrail violations."
method: GET
path: "/guardrails/violations"
tags: ["Guardrails"]
---

# List guardrail violations.

`GET /guardrails/violations`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/guardrails/violations`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/guardrails/violations/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a paginated list of guardrail violations with user and collection context. Admin only.

## Query parameters

- `offset` integer
- `limit` integer
- `interval` string
- `type_filter` string
- `collection_id_filter` string
- `user_id_filter` string

## Response `200`

Successful operation

- GuardrailViolationsList
  - `total` integer
  - `items` GuardrailViolation[]
    - `id` string
    - `created_at` string
    - `user_id` string
    - `username` string
    - `email` string
    - `collection_id` string, nullable
    - `collection_name` string
    - `violation_type` string
    - `violation_message` string

## Other responses

- `400`: Bad request
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
