Xeonr Developer Docs
API SpecificationFunctions

Update function

POST
/xeonr.functions.v1.FunctionService/UpdateFunction

Applies only the fields present in the request. Settings that do not apply to the function's kind are refused rather than stored.

Authorization

BearerAuth
AuthorizationBearer <token>

A team API token, created by a team owner and presented as Authorization: Bearer fnt_…. The secret is shown once at creation and stored only as a hash.

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
displayName?string|null

Only the fields present are applied; the rest are left alone.

ownerTeam?string|null

owner_team moves the function to another team (URN). Requires the functions admin role in BOTH teams, and the destination must be entitled to the product.

build?

BuildConfig is the author's declared intent. Every field is optional, and each applies to only some kinds.

scaling?

ScalingSpec is passed through to the platform. Ignored for static functions, which have nothing to scale. An unset field means the platform's default.

env?

env is replaced wholesale, because a client can round-trip it.

setSecrets?

set_secrets is merged in rather than replacing, because a client can never read a secret back and so has nothing to send in a whole-map write. Secrets win over env on a key collision.

clearSecrets?clear_secrets

clear_secrets removes secrets by name.

git?

git carries branch and subdirectory. Provider and repository are fixed once chosen.

gitAccessToken?string|null

git_access_token and git_webhook_secret are write-only: stored encrypted and never read back. Absent means "leave alone"; an empty string clears.

gitWebhookSecret?string|null
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://functions.xeonr.io/xeonr.functions.v1.FunctionService/UpdateFunction" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "function": {
    "functionId": "string",
    "name": "string",
    "displayName": "string",
    "ownerTeam": "string",
    "kind": "KIND_UNSPECIFIED",
    "build": {
      "packages": [
        "string"
      ],
      "entrypoint": [
        "string"
      ],
      "port": 0,
      "staticDir": "string",
      "mainPackage": "string"
    },
    "scaling": {
      "minInstances": 0,
      "maxInstances": 0,
      "concurrency": 0,
      "idleTimeoutSec": 0,
      "activationTimeoutSec": 0
    },
    "env": {
      "property1": "string",
      "property2": "string"
    },
    "secretKeys": [
      "string"
    ],
    "git": {
      "provider": "GIT_PROVIDER_UNSPECIFIED",
      "repo": "string",
      "branch": "string",
      "subdirectory": "string",
      "webhookUrl": "string",
      "credentialsSet": true,
      "authMode": "AUTH_MODE_UNSPECIFIED",
      "installationId": 0,
      "credentialExpiresAtUnix": 0
    },
    "activeVersionId": "string",
    "filesReadOnly": true,
    "createdAtUnix": 0,
    "updatedAtUnix": 0,
    "activeVersion": {
      "versionId": "string",
      "functionId": "string",
      "state": "VERSION_STATE_UNSPECIFIED",
      "snapshotId": "string",
      "environmentId": "string",
      "appId": "string",
      "staticRoot": "string",
      "gitCommit": "string",
      "gitRef": "string",
      "failureMessage": "string",
      "createdAtUnix": 0
    },
    "latestVersion": {
      "versionId": "string",
      "functionId": "string",
      "state": "VERSION_STATE_UNSPECIFIED",
      "snapshotId": "string",
      "environmentId": "string",
      "appId": "string",
      "staticRoot": "string",
      "gitCommit": "string",
      "gitRef": "string",
      "failureMessage": "string",
      "createdAtUnix": 0
    }
  }
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}