NylorunDocsBeta
Management APIVaults

Create a vault

POST
/v1/tenant/vaults

With scope: "installation" the installation's own vault, owned by installation, which any session may attach; or a vault of one person (ownerUserId), which only that person's sessions attach.

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, 8

Request Body

application/json
  1. body
requestId*string
Length1 <= length
idempotencyKey*string
Length1 <= length <= 256
name*string
Length1 <= length
scope?string
Value in"user""installation"
ownerUserId?string
Length1 <= length
metadata?

Response Body

The vault

application/json
  1. response
id*string
name*string
ownerUserId*string
metadata?
createdAt*string
import { createAdmin } from "@nylorun/admin";const admin = createAdmin();const vault = await admin.vaults.create({  scope: "installation",  name: "tools",  idempotencyKey: "tools",});
{  "id": "string",  "name": "string",  "ownerUserId": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "createdAt": "string"}