Skip to content
Holistra

Documentation

API

Authenticate against the REST API and call the main endpoints for scans, findings, assets, agents and reports.

Basics

The Holistra dashboard is built entirely on a JSON REST API, and the same API is available to your own scripts. It lives under /api on your server, for example https://<your-server>/api/findings. Requests and responses are JSON unless noted.

Every call acts as a user and is limited by that user's role and organisation, exactly as in the dashboard. Changes made through the API appear in the audit log under that user.

Authentication

Sign in with an email and password to get an access token, then send it as a Bearer token. Access tokens last 15 minutes; sign in again when one expires. Long-lived API keys are not available yet, so create a dedicated user for automation with the least privileged role that works (Auditor for read-only reporting).

1. Sign in (form-encoded)
curl -s https://<your-server>/api/auth/login \
  -d "[email protected]" \
  --data-urlencode "password=<password>"
Response
{ "access_token": "eyJhbGciOi...", "token_type": "bearer", ... }
2. Call the API
curl -s https://<your-server>/api/findings?severity=Critical \
  -H "Authorization: Bearer <access_token>"

Accounts with two-factor authentication

If the account has two-factor authentication, the sign-in response is {"mfa_required": true, "mfa_token": "…"} instead. Send the token with a current code to finish:

curl -s https://<your-server>/api/auth/login/mfa \
  -H "Content-Type: application/json" \
  -d '{"mfa_token": "<mfa_token>", "code": "123456"}'

Things to know

  • Sign-in is rate limited per IP address and failed attempts count towards the account lockout, so reuse a token for its 15 minutes rather than signing in for every call.
  • Accounts that sign in only through SSO have no usable password, and when your organisation requires SSO, only Admins can use password sign-in.
  • Bearer requests don't need the X-Aetherion-CSRF header; only the browser's cookie-based sessions do.

Status codes

CodeMeaning
400The request was invalid, for example a scan target that isn’t allowed. The detail field says why.
401No token, or it has expired. Sign in again.
403Your role can’t do this, your password has expired, or two-factor setup is required. On scans, it can also mean the instance has no valid licence.
404Not found. Records from other organisations also answer 404.
429Too many sign-in attempts, or the account is locked. Wait and retry.
503The service is temporarily unavailable. Retry shortly.

Main endpoints

Paths are relative to https://<your-server>/api. “Write” means Admin or Security Engineer.

Scans

EndpointRolePurpose
POST /scansWriteStart a scan (body below)
GET /scansAnyList scans and their status
GET /scans/{id}AnyOne scan
GET /scans/{id}/findingsAnyThe scan’s findings
DELETE /scans/{id}WriteDelete a scan
POST /scans
{
  "target": "https://staging.example.com",
  "name": "Staging web scan",
  "scan_type": "web",
  "options": {}
}

scan_type is one of network, web, owasp, pci_gdpr, cis_linux, cis_windows, host, sca, sast or cspm. Credentialed scans take their credentials in options: ssh_user with ssh_password or ssh_private_key for Linux, and winrm_user, winrm_password and optionally winrm_domain for Windows. CIS Linux scans require SSH credentials.

Findings, assets and reports

EndpointRolePurpose
GET /findings?severity=&status=&q=AnyList findings, filtered by severity (e.g. Critical), status (e.g. New) or text in the title
GET /findings/{id}AnyOne finding
PATCH /findings/{id}WriteChange status or severity (triage)
POST /findings/{id}/retestWriteRe-run the check that found it
GET /assetsAnyList assets, one row per host
POST /assetsWriteAdd an asset
PATCH /assets/{id}WriteEdit type, owner or tags
GET /statsAnyDashboard figures: posture score, counts by severity, KEV, MTTR
GET /stats/trendAnyFindings over time
GET /reports/{scan_id}/downloadAnyPDF report for a scan
GET /compliance/overviewAnyCompliance scores by baseline
GET /compliance/reports/overview?format=pdf|csvAnyOrganisation compliance report

Agents and remediation

EndpointRolePurpose
GET /agentsWriteList agents with status, version and posture
POST /agents/{id}/approveWriteApprove a pending agent
POST /agents/{id}/revokeWriteRevoke an agent
GET /agents/{id}/inventoryAnyInstalled software and OS checks
GET /agents/{id}/factsAnyHardware, OS, users, network and posture
POST /remediate/previewWriteWhich agents a dispatch would reach
POST /remediateWriteSend a script to agents
GET /remediate/jobsWrite, AuditorRecent jobs with status, exit code and output

Administration

EndpointRolePurpose
GET /auth/meAnyThe signed-in user
GET /auth/usersAdminList users
GET /audit-logsAdmin, AuditorThe audit log
GET /audit-logs/exportAdmin, AuditorThe audit log as CSV
GET /audit-logs/verifyAdmin, AuditorCheck the audit log’s integrity
GET /healthNoneService health: healthy, degraded or unhealthy

User provisioning from an identity provider uses the separate SCIM 2.0 interface; see Provisioning with SCIM.

The API is evolving. Endpoints listed here are the ones the dashboard relies on, but response fields may be added between releases, so ignore fields you don't recognise.

Something missing or unclear? Email [email protected].