NylorunDocsBeta
Management APITenantAudit

Read the Tenant's audit

GET
/v1/tenant/audit

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.

Authorization

managementKey
headerAuthorizationBearer <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).

Query Parameters

limit?integer

A page holds at most the Tenant's Runtime limit pageItems (default 200); a larger limit gets that many

Range1 <= value
cursor?string
types?string

Only these event types, comma-separated (credential.used,key.created)

since?string

Only events at or after this ISO time

until?string

Only events before this ISO time

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Response Body

A page of the Tenant's events, newest first

application/json
  1. response
events*array<>
nextCursor*string|null
import { createAdmin } from "@nylorun/admin";const admin = createAdmin();const page = await admin.tenant.audit({ types: ["key.created", "credential.used"], since: "2026-11-20T00:00:00Z" });for (const event of page.events) console.log(event.time, event.type, event.principal);
{  "events": [    {      "schema": "nylorun.tenant-event/1",      "seq": 0,      "time": "string",      "type": "key.created",      "source": "api",      "principal": "string",      "payload": {        "property1": null,        "property2": null      }    }  ],  "nextCursor": "string"}