List files
Lists the entries under path in the function's workspace, sorted by path, with size, SHA-256 and modification time. An empty path or . is the root, and recursive walks the whole subtree. With versionId, the version's frozen snapshot is listed instead. Pages default to 50 entries and are capped at 500 (limit); pass nextCursor back as cursor until it comes back empty. A path that escapes the root, or a version of another function, is INVALID_ARGUMENT; a missing directory is NOT_FOUND.
Needs the viewer role in the owning team. A function with no workspace yet gets an empty one. Callable with a console session or a team API key (Authorization: Bearer xk_…).
Required scopes: functions:functions:read
Authorization
BearerAuth A team API key, created by a team admin in the console and presented as
Authorization: Bearer xk_…. Xeonr Auth issues and verifies it; the
secret is shown once at creation and stored only as a hash, and a
revoked key stops working within 30 seconds. An existing fnt_… token
is accepted the same way.
In: header
Header Parameters
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
^[A-Za-z0-9_-]+$1 <= length <= 64path is workspace-relative; anything escaping the root is refused. Empty is the root.
length <= 4096validate:skip a boolean has no bounds to state
version_id reads a version's frozen snapshot instead of the live workspace.
^[A-Za-z0-9_-]*$length <= 64cursor is a previous response's next_cursor; empty for the first page.
limit is the page size: 0 means the default of 50, at most 500.
value <= 500Response Body
application/json
application/json
curl -X POST "https://functions.xeonr.io/xeonr.functions.v2.FilesService/ListFiles" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"files": [
"map[isDir:false modifiedAt:2026-10-22T09:30:00Z path:src/server.js sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 size:1842]"
],
"nextCursor": "50"
}Read a file POST
Reads one file from the workspace, or from a version's snapshot when `versionId` is set. Text comes back in `content`. A file containing a NUL byte is treated as binary and comes back base64-encoded in `contentBase64`, with `binary` set. Files over 2 MiB are refused with `FAILED_PRECONDITION`. A missing file is `NOT_FOUND`. Needs the viewer role in the owning team. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:read`
Write a file POST
Creates or overwrites one file in the workspace, from `content` (text) or `contentBase64` (binary, which wins if both are sent). Files are limited to 2 MiB. The change goes live with the next deploy. A function that deploys from a repository has a read-only workspace (`filesReadOnly`) and is refused with `FAILED_PRECONDITION`. Needs the editor role in the owning team. Edits are recorded as `files.edit` activity events, coalesced to one per ten-minute window. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:edit`