← Documentation and encyclopedia

Developers and engineers

Assessment API reference

Implemented web routes, session authentication and response handling.

Reviewed

Base URL and authentication

The production web API is https://pentriarch.com/api. User-facing routes require a valid Supabase user session through a supported cookie or bearer token. Never expose service-role credentials or executor secrets in a client integration.

Examples use placeholders and require your authorised target. Account and deployment gates apply. Agree API support and stability before building a production dependency.

GET /api/targets

Lists the signed-in user’s targets. limit defaults to 100 and is capped at 250. The response contains a targets array, which may be empty. Cursor pagination is not documented for this route.

curl "https://pentriarch.com/api/targets?limit=25" \
  -H "Authorization: Bearer $PENTRIARCH_USER_ACCESS_TOKEN"

// Illustrative response
{ "targets": [] }

POST /api/scan

Plans and starts an assessment. prompt is required and limited to 500 characters by the planner. Reference an onboarded target using targetId and its target value. depth and focus influence planning.

The response combines planning output with run information. Use the returned planId or scanId appropriately; check the actual status and task coverage separately.

curl -X POST "https://pentriarch.com/api/scan" \
  -H "Authorization: Bearer $PENTRIARCH_USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Review the authorised staging application","targetId":"YOUR_TARGET_ID","target":"staging.your-domain.example","depth":"quick"}'

POST /api/mcp-scan

When enabled, this performs hosted inspection over http or sse. targetId is required; an optional url must remain on the owned target’s host. transport defaults to http. Static inspection is the default.

The response includes scanId, traceId, server, fingerprint, surface, attestation, certification, activeProbes, summary and findings. An active request has separate gates and may report activeProbes.status as blocked. Static success is not active-test success.

{
  "targetId": "YOUR_OWNED_TARGET_ID",
  "url": "https://your-owned-host.example/mcp",
  "transport": "http"
}

Deliverable pack routes

POST /api/assessment-pack returns the plan and the prospective deliverable pack for a target before a run. GET /api/scans/{scanId}/pack returns the issued pack for a scan you own, including its source (frozen or log copy) and recomputed integrity. Add ?document=<kind> to download one document as Markdown; a document that fails integrity returns 409.

POST /api/assessment-pack/verify is public and rate limited. It returns validity flags only and never stored content.

curl "https://pentriarch.com/api/scans/YOUR_SCAN_ID/pack?document=findings_register" \
  -H "Authorization: Bearer $PENTRIARCH_USER_ACCESS_TOKEN"

POST /api/scans/{scanId}/retest

Replays the stored proof of each finding against the scan’s own host and re-runs the same validator. Send an optional findingIds array to retest selected findings. Up to 50 findings are replayed per request, and the route is rate limited.

Each result carries the stable finding identifier and one of: still_open, verified_fixed, regressed, inconclusive or not_retested. The issued report is never modified; the retest is recorded separately.

curl -X POST "https://pentriarch.com/api/scans/YOUR_SCAN_ID/retest" \
  -H "Authorization: Bearer $PENTRIARCH_USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"findingIds":["PF-0123456789abcdef"]}'

Errors and retries

401: missing authentication. 400: rejected input. 403: permission or policy restriction. 404: missing target or disabled feature. 429: rate or account limit. Investigate 5xx responses with a redacted error and traceId.

Respect returned rate-limit headers. After a scan-start timeout, check whether a run exists before retrying; a blind retry can duplicate work. Route-specific and account-specific limits vary.

Continue reading

Need help with availability or an assessment? Contact Pentriarch support.