CTEM
API Reference

SDK

HTTP API, not a language SDK; private scanner SDK not documented here. Org comes from token. Unauthenticated calls are 401 when route exists. Full schema at gateway /docs.

POST /v1/scans

Creates a scan and forwards the body to the orchestrator. Requires scan:run. The gateway does not emit scan.kick.

Request Headers
Idempotency-Key (string, optional)

Forwarded when present so the orchestrator can dedupe the accept.

Request Body Parameters
scannerType (string) required

Allowed values: "sca", "sast", "container", "iac", "secrets", "asm", "cloud_posture".

assetSelector (object) optional

Optional fields assetIds, kinds, and tags. An empty selector means everything in scope for this scanner.

options (object) optional

Optional record. Client conclusion keys are refused.

Note: conclusion (pending, passed, failed) and deployConclusion (pending, allowed, blocked) are read-only GET fields, never inputs. The client does not send them.

Scope Architecture & Allowed Routes

v1 Matrix

Session

GET /v1/session returns userId, orgId, role, permissions, and serviceAccount. The client cannot supply an org id. Role and permissions for humans come from Membership.

Scans

GET /v1/scans, GET /v1/scans/:id (conclusion and deployConclusion are read-only; conclusion comes from fail_build and deployConclusion from block_deploy), POST /v1/scans (scannerType sca|sast|container|iac|secrets|asm|cloud_posture, optional assetSelector and options; do not send conclusion or deployConclusion), POST /v1/scans/sbom (assetExternalKey, format cyclonedx-json|spdx-json|syft-json, exactly one of artifactKey or document; optional ref and commitSha).

Assets

GET /v1/assets, GET /v1/assets/:id, GET /v1/assets/:id/graph (depth defaults to 2), POST /v1/assets/discover (no body), POST /v1/assets (kind, externalKey, name, source). Response bodies are at gateway /docs.

Findings

GET /v1/findings, GET /v1/findings/:id, GET /v1/findings/:id/risk (forwarded to the risk service), PATCH /v1/findings/:id/triage (state and reason; expiresAt is optional here and the policy service requires it for risk_accepted). Response bodies are at gateway /docs.

Policies

GET /v1/policies, POST /v1/policies, GET /v1/policies/:id, PATCH /v1/policies/:id. Editor actions are notify, ticket, fail_build, and block_deploy. ignore is not an editor action. Org comes from the token.

Members

GET /v1/org/members, POST /v1/org/members (email and role), PATCH /v1/org/members/:userId/role, DELETE /v1/org/members/:userId (disables the membership and does not call the Keycloak Admin API). Roles: owner, admin, security_analyst, developer, auditor.

Meters

GET /v1/meters/scan-kicks. Params: from, to, source manual|api|webhook|ci|schedule, limit, cursor. limit defaults to 50 and is capped at 200. When neither from nor to is set, the window is the last 30×24h with no upper bound. A query orgId is dropped. This proxy does not emit a meter row. Full schema is gateway /docs.

agent-dora