Skip to the documentation
All documentation pages ↓

Reading data

Incidents, alerts and the security score: requests, paging and response shapes.

Five operations, all GET, all read-only. Every one answers only with your organisation's records: the tenant filter comes from the key and is part of every query.

The read operations and the scope each needs
OperationScopeReturns
GET /api/v1/public/identitynoneThe key itself: organisation, scopes, expiry, read limit
GET /api/v1/public/incidentsincidents:readIncidents, most recently active first
GET /api/v1/public/incidents/{incident_id}incidents:readOne incident with the findings it was assembled from
GET /api/v1/public/alertsalerts:readIndividual alerts, most recently opened first
GET /api/v1/public/security-scoresecurity_score:readThe current score, its categories and why it moved
GET /api/v1/public/security-eventssecurity_events:readSecurity events for a SIEM to collect, oldest first — see pulling into a SIEM

Incidents

An incident is related findings grouped into one story. Filter with status (matched exactly, for example open or closed).

curl
curl -sS "https://securiteagi.com/api/v1/public/incidents?status=open&limit=25" \
  -H "X-API-Key: $NEXGUARD_API_KEY"
Response
{
  "incidents": [
    {
      "incident_id": "3f1c6a0e-…",
      "title": "Repeated failed sign-ins, then a success",
      "summary": "…",
      "severity": "high",
      "status": "open",
      "correlation_kind": "…",
      "entity_values": ["9b1d…"],
      "alert_count": 4,
      "opened_at": "2026-10-25T09:14:03Z",
      "last_activity_at": "2026-10-25T09:20:41Z",
      "reopened_at": null,
      "closed_at": null
    }
  ],
  "page": { "has_more": false, "next_cursor": null }
}

One incident, with its timeline of findings — each with the rule that raised it, the reason, and the observed count against the threshold:

curl
curl -sS "https://securiteagi.com/api/v1/public/incidents/3f1c6a0e-8d2b-4c55-9a51-2f7e0b6d4c11" \
  -H "X-API-Key: $NEXGUARD_API_KEY"

The response is the incident's fields plus timeline, a list of entries with alert_id, rule_id, severity, status, reason, observed, threshold, entity and occurred_at. The AI analyst's notes are not included: they are an attributed opinion on the console screen, and an API field is where that framing gets lost.

An incident that belongs to another organisation answers exactly like one that never existed: 404.

Alerts

curl
curl -sS "https://securiteagi.com/api/v1/public/alerts?status=open&limit=50" \
  -H "X-API-Key: $NEXGUARD_API_KEY"

Each alert has alert_id, rule_id, title, severity, status, entity_kind, entity_value, opened_at, and — when set — incident_id, assigned_to_principal_id, feedback and note.

Security score

curl
curl -sS "https://securiteagi.com/api/v1/public/security-score" \
  -H "X-API-Key: $NEXGUARD_API_KEY"
Response
{
  "scored": true,
  "overall": 72.5,
  "previous": 68.0,
  "movement_reasons": ["…"],
  "categories": [
    { "category": "…", "score": 80.0, "weight": 0.25, "reason": "…", "observations": {} }
  ],
  "captured_at": "2026-10-25T06:00:00Z"
}

An organisation that has not been scored yet answers { "scored": false } with the other fields empty — not a 404, and not a zero. Treat it as "not yet".

Paging

Lists use a cursor, not an offset: a list you poll grows at the front, and paging by offset silently skips whatever arrived in between.

  • limit is 1–200 and defaults to 50.
  • Every list answers with its rows and "page": { "has_more", "next_cursor" }.
  • Pass next_cursor back as cursor; stop when has_more is false and next_cursor is null.
  • There is no total count, on purpose. A cursor this service did not issue is a 422, not a silent restart from the top.
Node.js
// On your own server. Never in browser code.
const BASE = "https://securiteagi.com";

async function allOpenIncidents() {
  const incidents = [];
  let cursor = null;
  do {
    const url = new URL(`${BASE}/api/v1/public/incidents`);
    url.searchParams.set("status", "open");
    url.searchParams.set("limit", "50");
    if (cursor) url.searchParams.set("cursor", cursor);

    const response = await fetch(url, {
      headers: { "X-API-Key": process.env.NEXGUARD_API_KEY },
    });
    if (response.status === 429 || response.status === 503) {
      const wait = Number(response.headers.get("Retry-After") ?? 1);
      await new Promise((resolve) => setTimeout(resolve, wait * 1000));
      continue;                       // same cursor: nothing is skipped
    }
    if (!response.ok) {
      const problem = await response.json();   // application/problem+json
      throw new Error(`NexGuard ${problem.status}: ${problem.detail} (${problem.request_id})`);
    }
    const body = await response.json();
    incidents.push(...body.incidents);
    cursor = body.page.next_cursor;
  } while (cursor);
  return incidents;
}

How often you can read

Reads are limited per key, by default to 120 requests a minute in a fixed clock minute. X-RateLimit-Limit and X-RateLimit-Remaining come back on each read, and rate_limit_per_minute on the identity call reports the limit for the key you hold — read it rather than hardcoding the number. For high-severity incidents a notification webhook saves polling; poll within the limit for everything else. Timestamps are UTC, ISO 8601, ending in Z.

We use only the cookies needed to sign you in securely and to remember your language and display choices. No analytics, advertising or third-party cookies.

Cookie policy