Set the active version
Points the function's traffic at an already-built version and returns the version that is now active. Nothing is rebuilt, so setting an older version is an instant rollback, and setting the version that is already active changes nothing. Only a VERSION_STATE_READY version can be activated (FAILED_PRECONDITION otherwise), and an old container version built before app versions were recorded must be redeployed instead. A version of another function is NOT_FOUND.
Needs the editor role in the owning team. A function.promote event is recorded. 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 <= 64^[A-Za-z0-9_-]+$1 <= length <= 64Response Body
application/json
application/json
curl -X POST "https://functions.xeonr.io/xeonr.functions.v2.VersionsService/SetActiveVersion" \ -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-1a2b3c4d5e6f7081]"
}