Skip to main content
All Causeloop list endpoints (GET /v1/issues, GET /v1/patterns, etc.) use cursor-based pagination and return a consistent response envelope. This page documents the common query parameters and the page object shape.

Response envelope

Every list endpoint returns a data array and a page metadata object:
{
  "data": [ ... ],
  "page": {
    "next_cursor": "eyJvZmZzZXQiOiAyNX0",
    "has_more": true,
    "total": 142
  }
}
data
array
The current page of results.
page.next_cursor
string | null
An opaque cursor token. Pass it as ?cursor= on the next request to retrieve the following page. null when you are on the last page.
page.has_more
boolean
true if there are more results after this page.
page.total
number
Total number of matching records across all pages. May be estimated for very large result sets (>10 000 records).

Common query parameters

These parameters are supported on every list endpoint unless documented otherwise:
limit
integer
default:"25"
Number of results per page. Minimum 1, maximum 100.
cursor
string
Opaque cursor from the previous page’s page.next_cursor. Omit for the first page.
sort
string
Sort field with optional direction prefix. Prefix with - for descending (default on most endpoints), no prefix for ascending. Example: -created_at (newest first), created_at (oldest first).
Cursors are opaque and signed. Passing a modified or fabricated cursor string returns 400 Bad Request with code validation_error and detail "malformed cursor token".

Issues — additional filter params

status
string
Filter by issue status. Values: open, in_progress, resolved, closed.
severity
string
Filter by severity. Values: critical, high, medium, low.
pattern_id
string
Filter issues belonging to a specific pattern.
q
string
Full-text search across issue title and description. Maximum 200 characters.

Patterns — additional filter params

status
string
Filter by pattern status. Values: active, resolved, watching.
q
string
Search pattern names. Maximum 200 characters.
domain
string
Filter patterns by domain fingerprint (e.g. payments, auth).
risk_min
integer
Minimum risk score (0–100, inclusive).
risk_max
integer
Maximum risk score (0–100, inclusive). Must be ≥ risk_min.
Allowed sort values for patterns: risk_score, -risk_score, issue_count, -issue_count, last_seen_at, -last_seen_at.

Paginating through results

Fetch page 1, then use the returned cursor for page 2:
# Page 1
curl "https://api.causeloop.ai/v1/issues?limit=25" \
  -H "Authorization: Bearer $CAUSELOOP_TOKEN"

# Page 2 — use next_cursor from the previous response
curl "https://api.causeloop.ai/v1/issues?limit=25&cursor=eyJvZmZzZXQiOiAyNX0" \
  -H "Authorization: Bearer $CAUSELOOP_TOKEN"

Filtering and sorting example

Fetch the 10 highest-risk active patterns in the payments domain:
curl "https://api.causeloop.ai/v1/patterns?status=active&domain=payments&sort=-risk_score&limit=10" \
  -H "Authorization: Bearer $CAUSELOOP_TOKEN"