Move or rename a path
Moves or renames a file or directory within the workspace. The only writable path in updateMask is new_path: an empty mask, or a mask naming anything else, is INVALID_ARGUMENT. Neither path nor newPath can be the root or escape it (INVALID_ARGUMENT), and newPath is required when it is masked. Returns both cleaned paths. A function that deploys from a repository has a read-only workspace and is refused with FAILED_PRECONDITION.
Needs the editor role in the owning team. Recorded as a files.edit activity event. Callable with a console session or a team API key (Authorization: Bearer xk_…).
Required scopes: functions:functions:edit
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 the existing file or directory.
1 <= length <= 4096new_path is where it moves to. Writable through update_mask.
1 <= length <= 4096update_mask names the fields to write. Only new_path is writable; an empty mask, or one naming anything else, is INVALID_ARGUMENT.
Response Body
application/json
application/json
curl -X POST "https://functions.xeonr.io/xeonr.functions.v2.FilesService/UpdateFile" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{ "updateMask": "newPath" }'{
"path": "src/server.js",
"newPath": "src/index.js"
}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`
Functions
Functions: create, read, configure and delete. Reachable with a team API key.