Skip to content

API Guide

Use /api for REST requests and the running server’s generated reference for endpoint schemas.

ResourceURL
Interactive API reference/api-reference
OpenAPI JSON/api/openapi
API base/api
Readiness probe (includes database availability)/_readiness
Process health (startup/liveness)/_health

API responses, including errors and one-time credentials, use Cache-Control: no-store, private.

Authenticate with a PAT

Create a personal access token under Settings > Access Tokens, copy its one-time value, and send it as a bearer token:

curl --fail-with-body \
  -H 'Authorization: Bearer endura_pat_...' \
  https://team-server.example.com/api/pipelines

PATs inherit owner permissions. GET/HEAD require read capability; other methods require write, including validation/test/sync POSTs. Token creation, rotation, and deletion require interactive sign-in; privileged local tasks are separate.

Browser Authentication

Browser login carries the original route in returnTo, restored after username/password or OIDC authentication, including query and fragment. OIDC redirects use 303 See Other.

returnTo must be root-relative and at most 2,048 UTF-8 bytes. External/protocol-relative URLs, traversal, backslashes, repeated encoding, and /api or /authentication destinations are rejected; missing/unsafe values fall back to /dashboards. Username/password login is non-production only.

Username/password login, logout, and browser-session requests other than GET/HEAD/OPTIONS require exactly one Origin matching settings.tenant.base_url, regardless of CORS. Missing, malformed, duplicate, or nonmatching origins return 403.

Bearer-only requests may omit Origin; if supplied, CORS and origin rules apply.

Array Query Parameters

Repeat the bare key for an array filter:

?id=1&id=2

Literal id[]/id[0] work, but encoded brackets (%5B, %5D) in parameter names return 400. Repeated bare keys avoid client encoding issues.

Pagination

ListsControls/defaults
Builds, pipelines, deployments, workloads, violations, policy commits, discovery runs1-based page, size up to 200; omitting both returns the complete filtered set
Team Server/Sensor logsDefault newest 512 matches; explicit size capped at 512
Sensors, policies, usersUnpaginated; documented filters only

Paginated responses include filtered X-Total-Count. For log tailing, after=<record-id> instead returns up to 512 greater IDs ascending, with existing filters. It ignores page/size/ordering and omits total count. At 512 results, request again after the greatest returned ID.

Integration Runs and Statistics

Operators and Administrators can inspect CI/CD discovery run history through these endpoints:

EndpointPurpose
GET /api/integrations/{provider}/{integration_id}/runsLists run history with search, ordering, outcome, scope, and trigger filters
GET /api/integrations/{provider}/{integration_id}/runs/{run_id}Returns one run and its bounded warning and error diagnostics
GET /api/integrations/schedules/nextReturns the nearest configured discovery run for each provider

Run triggers are manual, scheduled, create, and update. Outcomes are running, success, partial, failed, cancelled, and interrupted. A run stores at most 100 diagnostics and reports any additional count in omittedDiagnosticCount.

CI/CD integration responses expose lastSuccessfulRunAt, lastSuccessfulRunDuration, and lastSuccessfulRunScope. Pipeline assignment filtering uses repeated policyAssignment=assigned or policyAssignment=unassigned query parameters and is independent of runtime protection status.

Dashboard clients use GET /api/stats/security-posture for the current internally consistent security-posture calculation. Historical latest-build violation points are available from GET /api/stats/latest-build-violations.

Runtime Sensor Endpoints

Build heartbeats, deployment/workload/violation ingest, /sensors/current/*, and /sensors/logs require Sensor JWTs, as marked in the reference. Sessions/PATs cannot call them.

Sensor-token rotation immediately invalidates earlier generations with 401.

Error Responses

StatusMeaning
400 Bad RequestInvalid JSON or query syntax, including encoded array brackets
401 UnauthorizedMissing, expired, revoked, or invalid credentials
403 ForbiddenBrowser origin, role, resource scope, ownership, or PAT capability denied the action
404 Not FoundThe resource does not exist
409 ConflictCurrent state prevents the action, such as stopping an integration that is not syncing
415 Unsupported Media TypeA JSON body lacks Content-Type: application/json
422 Unprocessable ContentParsed input fails schema, bounds, credential, policy, or proposal validation
500 Internal Server ErrorAn unexpected server or configuration failure occurred
503 Service UnavailablePostgreSQL is unavailable

Database outages cause 503 database unavailable across /api except /api/version. Detection waits five seconds between completed probes, plus probe duration; database-dependent requests can fail earlier. Readiness includes dependencies; process health does not.