Reset the Tenant
Deletes its sessions, its Agents (with their vaults), or both, after draining or cancelling the turns in progress. The Tenant stays open.
managementKeyAuthorizationBearer <token>A management key of the Tenant (role management): it reaches the Management API (/v1/tenant/*) and /v1/me, as itself, never for a subject. Issued only on the Tenant's machine (nylorun-operate keys put <id> --role management) or from NYLORUN_MANAGEMENT_KEY_FILE. Never accepted from a browser (Origin).
Nylorun-Protocol*stringThe protocol version, 18
application/json- body
requestId*string1 <= lengthscope*string"sessions""agents""all"activeWork*string"drain""cancel"Reset
application/json- response
ok*truetrueimport { createAdmin } from "@nylorun/admin";const admin = createAdmin();await admin.tenant.reset({ scope: "sessions", activeWork: "cancel" });{ "ok": true}Seed the Tenant's configuration PUT
Sets each setting the Tenant does not have yet; keeps the ones it has.
Read the Tenant's audit GET
The Tenant's stream, newest first: `key.created`, `key.revoked`, `signing_key.rotated`, `signing_key.revoked`, `policy.changed`, `settings.changed`, `credential.created`, `credential.rotated`, `credential.deleted`, `credential.used`, `studio.signed_in`. Each event names who acted (`principal`, from the credential of the request that made the change: a key's name, `<key>:<subject>`, `<issuer>:<subject>`, `operate`, or `host` for the Runtime itself) and what wrote it (`source`), and never holds a secret value. A page holds `limit` events (default 50); `nextCursor` reads older ones with the same filters. Host feature `tenant-audit`.