Get Violations (Cursor Pagination)

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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string

When included, the response is scoped to the specified project.

Body Params

Request body for POST /api/v2/violations. Filters match v1; pagination uses an opaque cursor instead of page-number offset.

filters
object

Filtering parameters for a violations search.

pagination
object

Cursor pagination and sorting for POST /api/v2/violations. Omit cursor on the first page; pass page_info.next_cursor thereafter.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json