Skip to content
Hexel StudioDocs

Set session lifecycle

POST/titan/admin/sessions/{id}/lifecycle

Pause, drain, resume or close a runtime session (ses_) or a durable session (dss_, every leg). pause and drain are signals to ACP v1 clients (titan.acp.v1) and restrict nothing: pause holds the client (running work finishes), drain asks it to finish its in-flight work and then close; that close ends the session, and for a leg of a draining durable session the durable session too. resume ends a pause or a drain. close moves the session to its terminal closed state now. pause while draining is 409 SESSION_DRAINING; a session that is no longer live is 409 SESSION_NOT_ACTIVE.

Path parameters

idstring

Headers

Bearer <token>. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

The enforcement deployment this call acts on (its td-... id). Required on the shared plane, where one Gateway serves many tenants and there is no default: a missing, unknown, repeated or other organization's deployment answers 403, like a failed authorization. Optional on a dedicated cell, which defaults to its one deployment.

Body parameters

actionstring

One of: "pause", "drain", "resume", "close"

One of: "OPERATOR_REQUEST", "SECURITY_INCIDENT", "POLICY_VIOLATION"

Returns

200Successful response; exact status varies by operation.object

changedboolean
lifecyclestring

One of: "running", "paused", "draining", "closed"

Errors

  • 400Admin error
  • 403Admin error
  • 404Admin error
  • 409Admin error
  • 413Admin error
  • 415Admin error
  • 503Admin error