Agents
Upload a definition file
PUT
Stores the body, at most 10485760 bytes, at the SHA-256 the path names; a body with another hash stores nothing (400). A file the Tenant holds already is kept as it is (200).
applicationKeyheader
AuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
file*stringsha256: and the SHA-256 of the file's bytes, 64 lowercase hex digits
Nylorun-Protocol*stringThe protocol version, 8
The file's bytes
body*fileapplication/octet-streamFormat
binaryThe Tenant held the file already
application/json- response
sha256*stringMatch
^sha256:[0-9a-f]{64}$size*integerRange
0 <= value <= 10485760import { createClient } from "@nylorun/agents";const client = await createClient();const file = await client.files.upload(bytes);{ "sha256": "string", "size": 0}