Skip to Content
PlatformSessions and Executions

Sessions and Executions

A session defines identity and default governance context. An execution is an action performed inside that session.

Session Start

POST /v4/sessions.start

Create a session with optional defaults (policy, route, risk).

Execution

POST /v4/sessions/{sessionId}/executions.execute

Execute with input payload. If policy or route is omitted, DriftGate inherits session defaults. If session defaults are missing, backend defaults are applied.

One-Liner Mode

POST /v4/execute

Use ephemeral execution for fast command-style workflows.

Auth Contract

  • Runtime sessions.start and execute endpoints require a bearer session token.
  • Service-account API keys (x-driftgate-api-key, dgk_*) are scoped to admin/config APIs and are not accepted as runtime session auth.

Traceability Fields

Execution responses include envelope metadata where available:

  • meta.requestId (always)
  • meta.sessionId
  • meta.executionId
  • meta.lineageId
  • meta.timingMs.total (always)
Last updated on