Back

GET /api/v1/dashboard

Route source: app/api/v1/dashboard/route.ts. Access: Portal session cookie; tenantContext. Status codes are read from the route implementation.

GET/api/v1/dashboard

Access

The session variable in examples is a placeholder. The browser supplies the real session cookie.

Request

PathRoute details
query · rangeoptional · {"type":"string","enum":["open","24h","7d","30d"],"default":"open"}

Request body in the handler contract: none.

Synthetic curl example
curl -i -X GET 'https://portal.rfi-irfos.com/api/v1/dashboard?range=7d' \
  -H "Cookie: $PORTAL_SESSION_COOKIE"

Response

The handler returns JSON. Response fields are defined in the linked route source.

200 401 500 503
Synthetic curl example · synthetic
{
  "data": {
    "openFindings": 0,
    "openIncidents": 0,
    "activeInvestigations": 0,
    "totalInvestigations": 0,
    "assets": 0,
    "locatedAssets": 0,
    "severity": {
      "critical": 0,
      "high": 0,
      "medium": 0,
      "low": 0,
      "informational": 0
    },
    "incidentSeverity": {
      "critical": 0,
      "high": 0,
      "medium": 0,
      "low": 0,
      "informational": 0
    },
    "findingsSeries": [],
    "trend": null,
    "complianceScore": {
      "percent": null,
      "satisfied": 0,
      "applicable": 0,
      "assessed": 0,
      "total": 0
    },
    "mttr": {
      "medianHours": null,
      "sample": 0,
      "weeks": []
    },
    "geoMarkers": [],
    "range": "open",
    "generatedAt": "2026-01-01T00:00:00.000Z"
  },
  "meta": {
    "demo": true,
    "internalPreview": false,
    "role": "analyst",
    "organizationName": "Example workspace"
  }
}

The linked source file contains the authoritative field validation and response structure.

Error codes

  • 401 · Session or credentials are missing or invalid
  • 500 · Internal handler error
  • 503 · Service or database is unavailable

Code evidence

app/api/v1/dashboard/route

Local index↑ ↓ · Enter · Esc