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

# Get guardrail violations dashboard data.

`GET /guardrails/violations/dashboard`

## Request

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

Returns daily trend, breakdown by violation type, by collection, and by user. Admin only.

## Query parameters

- `interval` string
- `collection_id_filter` string
- `user_id_filter` string

## Response `200`

Successful operation

- GuardrailViolationsDashboard
  - `daily_trend` GuardrailViolationsDailyTrend[]
    - `day` string
    - `violation_type` string: One row per (day, violation_type); a day appears once per type.
    - `total` integer
  - `by_type` GuardrailViolationsByType[]
    - `violation_type` string
    - `total` integer
  - `by_collection` GuardrailViolationsByCollection[]
    - `collection_name` string
    - `collection_id` string, nullable
    - `total` integer
  - `by_user` GuardrailViolationsByUser[]
    - `username` string
    - `email` string
    - `total` integer
  - `available_types` 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)
