NylorunDocsBeta
Management APITenantAudit

Record a Studio sign-in

POST
/v1/tenant/audit/studio-sign-in

Studio's server records that a browser signed in (studio.signed_in): on its loopback address, with a login token, or through a sign-in proxy (forwarded), and the person's subject when there is one. Only Studio's key (principal studio, derived from the admin key) may call it; any other management key is 403.

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

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Request Body

application/json
  1. body
method*string
Value in"loopback""token""forwarded"
subject?string
Length1 <= length <= 200

Response Body

The event recorded

application/json
  1. response
schema*"nylorun.tenant-event/1"
Value in"nylorun.tenant-event/1"
seq*integer
Range0 <= value
time*string
type*string
Value in"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"
source*string
Value in"api""operate""runtime""studio"
principal*string
payload*
curl -X POST "https://example.com/v1/tenant/audit/studio-sign-in" \  -H "Nylorun-Protocol: string" \  -H "Content-Type: application/json" \  -d '{    "method": "loopback"  }'
{  "schema": "nylorun.tenant-event/1",  "seq": 0,  "time": "string",  "type": "key.created",  "source": "api",  "principal": "string",  "payload": {    "property1": null,    "property2": null  }}