Lists Xray violations with opaque cursor (keyset) pagination and no scroll cap. Prefer this endpoint when you need to enumerate large violation sets. Unlike POST /api/v1/violations, page latency stays flat across cursor depth and the request is not short-circuited with HTTP 429 after 50,000 matching violations.
Available from Xray 3.152.0. Gated by the xray.api.v2.violations.enabled system property (default false). When the flag is off, the endpoint returns HTTP 404.
Use page_info.next_cursor from each response as pagination.cursor on the next request. Keep filters, order_by, and direction identical across pages; changing them (or tampering with the cursor) returns HTTP 400 with cursor_invalidated.
Set pagination.include_total to true only when you need total_violations (extra COUNT cost). Use pagination.include_details of none for the cheapest artifact-enumeration payload, summary (default) for standard enrichment, or full for v1-equivalent detail.
Performs best with admin or tightly scoped tokens at very large scale. Requires a user with Read or Manage Watches permissions.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
