Get a version
Returns one version of the function: its state, build outputs, source ref and commit, and the failure reason of a failed build. Poll it to follow a build. versionId is required; a version that belongs to another function 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
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 <= 64^[A-Za-z0-9_-]+$1 <= length <= 64Response Body
application/json
application/json
curl -X POST "https://functions.xeonr.io/xeonr.functions.v2.VersionsService/GetVersion" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"version": "map[createdAt:2026-10-22T09:30:00Z functionId:fn-3f9a2c71d4e8b605 gitRef:main snapshotId:snap-8d41b2e7c05a state:VERSION_STATE_READY versionId:v-7c1e04b9a2d35f68]"
}Create a version (deploy) POST
Builds a new version from exactly one `source`, and makes it the active version unless `skipActivate` is set. `archive` is an uploaded zip of at most 64 MiB (base64 in JSON), imported into the workspace first; an archive that is not a valid zip, or that the buildpack cannot build, is `INVALID_ARGUMENT`. `workspace` deploys what is already in the function's workspace; a function with no files yet is `FAILED_PRECONDITION`. `git` fetches the connected repository at `ref` (a branch, tag or commit) for this deploy only, falling back to the configured branch and then the repository's default branch; a function with no repository, a credential that cannot be obtained, or no branch to deploy is `FAILED_PRECONDITION`, and a fetch that fails is `INTERNAL` with the reason in the message. `redeploy` clones an existing version's stored snapshot: without `rebuild` the existing image is reused with the function's current environment and secrets (this is how an env or secret change goes live, and needs a `VERSION_STATE_READY` source version); with `rebuild` the snapshot is built again, which is how a failed build is retried. The source version is never changed, and one belonging to another function is `NOT_FOUND`. `skipActivate` applies to `archive` and `workspace` only; with the other sources they always activate. A static version is `VERSION_STATE_READY` at once and activated before the response. A Node.js or Go version comes back `VERSION_STATE_BUILDING`: the image builds in the background (for up to 30 minutes) and the version is activated when the build succeeds, unless a newer version is already live. Follow it with `GetVersion` and `GetBuildLog`. Needs the editor role in the owning team. A `function.deploy` or `function.redeploy` event is recorded. A deployment with no platform configured answers `UNIMPLEMENTED`. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:edit`
List a function's versions POST
Lists the function's versions, newest first: the deploy history. Pages default to 50 versions and are capped at 500 (`limit`). Pass `nextCursor` back as `cursor`; an empty `nextCursor` means the last page. 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`