Skip to Content
Xeonr Developer Docs
API SpecificationFunctions

Delete a function

POST
/xeonr.functions.v2.FunctionsService/DeleteFunction

Deletes the function. Its hostname stops serving, and what it held on the platform is released: the App behind every version, and the workspace that owns their snapshots. The platform clean-up is best effort, so a platform outage does not block the delete.

Needs the editor role in the owning team. A function.delete event is recorded in the activity feed. Callable with a console session or a team API key (Authorization: Bearer xk_…).

Required scopes: functions:functions:edit

Authorization

BearerAuth
AuthorizationBearer <token>

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

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

functionId?string
Match^[A-Za-z0-9_-]+$
Length1 <= length <= 64
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://functions.xeonr.io/xeonr.functions.v2.FunctionsService/DeleteFunction" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{}

Create a function POST

Creates a function owned by `ownerTeam` (a team URN or slug) and assigns its hostname, `<name>.fns.xnr.app`. Names are never chosen. `displayName` is required (at most 64 characters, no control characters). `kind` is required (`KIND_NODE`, `KIND_GO` or `KIND_STATIC`) and cannot be changed later. Settings that do not apply to the kind are refused with `INVALID_ARGUMENT`: a port, entrypoint, packages or env on a static function, `staticDir` on a non-static one, `mainPackage` on a non-Go one. `source` says where the code lives, once and for good. Left out, or `SOURCE_MODE_PLATFORM`, the workspace is scaffolded with a working hello-world project for the kind and is edited in the console. `SOURCE_MODE_EXISTING_REPO` attaches `repo` through a team connection, and `SOURCE_MODE_NEW_REPO` creates the repository through the provider and writes the scaffold into it. A first deploy starts in the background, so the returned function usually has no `activeVersionId` yet; follow the deploy with `ListVersions` or `GetFunction`. A failure to apply `source` does not undo the function: it is created, and the reason comes back in `sourceError` with an OK status so the caller keeps the record. A `function.create` event is recorded in the team's activity feed. Needs the editor role in the owning team. A team API key may leave `ownerTeam` empty to create in its own team, and needs the editor role there; a signed-in user must name the team. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:edit`

Get a function POST

Returns one function by `functionId`, or by `name` (its assigned hostname label) when no id is given. One of the two is required (`INVALID_ARGUMENT`). The response embeds the active and latest versions, as `ListFunctions` does. Needs the viewer role in the owning team. An unknown function is `NOT_FOUND`; one in a team the caller cannot read is `PERMISSION_DENIED`. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:read`