Skip to content

Functions

Functions: 28 operations, tagged functions in the OpenAPI document.

Method Path Summary
GET /api/functions List functions
POST /api/functions Create a function
GET /api/functions/{id} Get a function by id
PATCH /api/functions/{id} Update a function’s settings
DELETE /api/functions/{id} Delete a function
GET /api/functions/{id}/aliases List a function’s aliases
PUT /api/functions/{id}/aliases/{name} Point an alias at a version
DELETE /api/functions/{id}/aliases/{name} Remove an alias
PUT /api/functions/{id}/artifacts/{digest} Upload a function artifact by its sha256 digest
PUT /api/functions/{id}/config/{key} Set a config value
DELETE /api/functions/{id}/config/{key} Remove a config value
PUT /api/functions/{id}/db/{name} Set a database DSN
DELETE /api/functions/{id}/db/{name} Remove a database DSN
GET /api/functions/{id}/routes List a function’s public routes
PUT /api/functions/{id}/routes Create or update a public route
DELETE /api/functions/{id}/routes/{routeId} Remove a public route
PUT /api/functions/{id}/secrets/{key} Set a secret value
DELETE /api/functions/{id}/secrets/{key} Remove a secret value
GET /api/functions/{id}/settings List a function’s settings keys
GET /api/functions/{id}/trace List a function’s trace contexts and their windows
GET /api/functions/{id}/trace-log Read a function’s trace records, newest first
PUT /api/functions/{id}/trace/{context} Switch a trace context on for a bounded time
DELETE /api/functions/{id}/trace/{context} Switch a trace context off
GET /api/functions/{id}/versions List a function’s versions
POST /api/functions/{id}/versions Publish a new function version from a stored artifact
POST /api/functions/{id}/versions/prune Prune a function’s oldest untagged versions
GET /api/functions/{id}/versions/{number} Get one function version
POST /api/functions/{id}/versions/{number}/retire Retire a function version

List functions

Operation ID: listFunctions

Parameters

Name In Type Required Description
applicationId query string no Filter by owning application id
clientId query string no Filter by client id
addressPrefix query string no Filter by address prefix (e.g. an application code)
page query integer (int64) no
size query integer (int64) no
limit query integer (int64) no
pageSize query integer (int64) no
page_size query integer (int64) no

Responses

Status Description Body
200 OK application/json OffsetPageFunctionResponse
default Error application/json ErrorModel

Create a function

Operation ID: createFunction

Request body (required)

Content type Schema
application/json CreateFunctionRequest

Responses

Status Description Body
201 Created application/json CreatedResponse
default Error application/json ErrorModel

Get a function by id

Operation ID: getFunction

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
200 OK application/json FunctionResponse
default Error application/json ErrorModel

Update a function’s settings

Operation ID: updateFunction

Parameters

Name In Type Required Description
id path string yes

Request body (required)

Content type Schema
application/json UpdateFunctionRequest

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

Delete a function

Operation ID: deleteFunction

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

List a function’s aliases

Operation ID: listFunctionAliases

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
200 OK application/json AliasResponse[]
default Error application/json ErrorModel

Point an alias at a version

Operation ID: putFunctionAlias

Parameters

Name In Type Required Description
id path string yes
name path string yes

Request body (required)

Content type Schema
application/json PutAliasRequest

Responses

Status Description Body
200 OK application/json PutAliasResponse
default Error application/json ErrorModel

Remove an alias

Operation ID: deleteFunctionAlias

Parameters

Name In Type Required Description
id path string yes
name path string yes

Responses

Status Description Body
200 OK application/json WiringResponse
default Error application/json ErrorModel

PUT /api/functions/{id}/artifacts/{digest}

Section titled “PUT /api/functions/{id}/artifacts/{digest}”

Upload a function artifact by its sha256 digest

Operation ID: putFunctionArtifact

Parameters

Name In Type Required Description
id path string yes
digest path string yes Lowercase hex sha256 of the artifact (64 characters)

Request body (required)

Content type Schema
application/wasm string (binary)

Responses

Status Description Body
201 Created none
default Error application/json ErrorModel

Set a config value

Operation ID: putFunctionConfig

Parameters

Name In Type Required Description
id path string yes
key path string yes

Request body (required)

Content type Schema
application/json PutSettingRequest

Responses

Status Description Body
200 OK application/json SettingResponse
default Error application/json ErrorModel

Remove a config value

Operation ID: deleteFunctionConfig

Parameters

Name In Type Required Description
id path string yes
key path string yes

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

Set a database DSN

Operation ID: putFunctionDB

Parameters

Name In Type Required Description
id path string yes
name path string yes

Request body (required)

Content type Schema
application/json PutSettingRequest

Responses

Status Description Body
200 OK application/json SettingResponse
default Error application/json ErrorModel

Remove a database DSN

Operation ID: deleteFunctionDB

Parameters

Name In Type Required Description
id path string yes
name path string yes

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

List a function’s public routes

Operation ID: listFunctionRoutes

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
200 OK application/json RouteResponse[]
default Error application/json ErrorModel

Create or update a public route

Operation ID: putFunctionRoute

Parameters

Name In Type Required Description
id path string yes

Request body (required)

Content type Schema
application/json PutRouteRequest

Responses

Status Description Body
200 OK application/json RouteResponse
default Error application/json ErrorModel

DELETE /api/functions/{id}/routes/{routeId}

Section titled “DELETE /api/functions/{id}/routes/{routeId}”

Remove a public route

Operation ID: deleteFunctionRoute

Parameters

Name In Type Required Description
id path string yes
routeId path string yes

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

Set a secret value

Operation ID: putFunctionSecret

Parameters

Name In Type Required Description
id path string yes
key path string yes

Request body (required)

Content type Schema
application/json PutSettingRequest

Responses

Status Description Body
200 OK application/json SettingResponse
default Error application/json ErrorModel

Remove a secret value

Operation ID: deleteFunctionSecret

Parameters

Name In Type Required Description
id path string yes
key path string yes

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

List a function’s settings keys

Operation ID: listFunctionSettings

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
200 OK application/json SettingResponse[]
default Error application/json ErrorModel

List a function’s trace contexts and their windows

Operation ID: listFunctionTraceContexts

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
200 OK application/json TraceContextsResponse
default Error application/json ErrorModel

Read a function’s trace records, newest first

Operation ID: listFunctionTraceLog

Parameters

Name In Type Required Description
id path string yes
context query string no Only this context
kind query string no Only this record kind One of: trace, http, log, outbound.
level query string no Only this level (debug, info, warn, error)
reference query string no The author’s business key, exact match
correlationId query string no The request’s X-Correlation-Id, exact match
invocationId query string no One invocation’s records
version query integer (int32) no Only this function version
since query string no Oldest record time: RFC 3339 or unix milliseconds
until query string no Newest record time: RFC 3339 or unix milliseconds
limit query integer (int64) no Page size, default 100, max 500
cursor query string no nextCursor of the previous page

Responses

Status Description Body
200 OK application/json TraceLogResponse
default Error application/json ErrorModel

Switch a trace context on for a bounded time

Operation ID: enableFunctionTraceContext

Parameters

Name In Type Required Description
id path string yes
context path string yes

Request body (required)

Content type Schema
application/json EnableTraceRequest

Responses

Status Description Body
200 OK application/json TraceContextResponse
default Error application/json ErrorModel

DELETE /api/functions/{id}/trace/{context}

Section titled “DELETE /api/functions/{id}/trace/{context}”

Switch a trace context off

Operation ID: disableFunctionTraceContext

Parameters

Name In Type Required Description
id path string yes
context path string yes

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

List a function’s versions

Operation ID: listFunctionVersions

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
200 OK application/json VersionResponse[]
default Error application/json ErrorModel

Publish a new function version from a stored artifact

Operation ID: publishFunctionVersion

Parameters

Name In Type Required Description
id path string yes

Request body (required)

Content type Schema
application/json PublishVersionRequest

Responses

Status Description Body
200 OK application/json VersionResponse
default Error application/json ErrorModel

Prune a function’s oldest untagged versions

Operation ID: pruneFunctionVersions

Parameters

Name In Type Required Description
id path string yes

Request body (required)

Content type Schema
application/json PruneVersionsRequest

Responses

Status Description Body
200 OK application/json PruneVersionsResponse
default Error application/json ErrorModel

Get one function version

Operation ID: getFunctionVersion

Parameters

Name In Type Required Description
id path string yes
number path integer (int32) yes

Responses

Status Description Body
200 OK application/json VersionResponse
default Error application/json ErrorModel

POST /api/functions/{id}/versions/{number}/retire

Section titled “POST /api/functions/{id}/versions/{number}/retire”

Retire a function version

Operation ID: retireFunctionVersion

Parameters

Name In Type Required Description
id path string yes
number path integer (int32) yes

Responses

Status Description Body
200 OK application/json VersionResponse
default Error application/json ErrorModel
Field Type Required Description
functionId string yes
name string yes
updatedAt string (date-time) yes
updatedBy string no
version integer (int32) yes
Field Type Required Description
id string yes
Field Type Required Description
applicationId string yes Owning application id
clientId string no
description string no
limits LimitsDTO no
name string yes Function name (lowercase, alphanumeric, hyphens; matches ^[a-z][a-z0-9-]{0,62}$)
pool string no The runner pool that hosts the function (FC_FUNCTIONS_POOL on its runners); omitted means the default pool. Not the dispatch pool, which is always the function’s own.
serviceAccountId string no Optional webhook verifier identity: a service account id OR code. Its signing secret is what this function’s webhook endpoints verify deliveries with. Omitted means the application’s service account.
warm boolean no
Field Type Required Description
indefinite boolean no Stay on until switched off, at most the context’s indefiniteMaxDays (then it closes by itself); minutes is ignored. Needs platform:function:trace:indefinite; never for http (400 TRACE_INDEFINITE_NOT_ALLOWED)
minutes integer (int64) no How long the window stays open, from 1 up to the context’s maxMinutes. Required unless indefinite.
sampleRate integer (int64) no Capture one invocation in N (1 to 1000). Default 1: all.
Field Type Required Description
address string yes
applicationCode string yes
applicationId string yes
clientId string no
createdAt string (date-time) yes
createdBy string no
description string no
id string yes
limits LimitsDTO yes
name string yes
pool string no
serviceAccountCode string no
serviceAccountId string no
updatedAt string (date-time) yes
warm boolean yes
Field Type Required Description
maxBodyBytes integer (int64) no
maxConcurrency integer (int32) no
memoryMb integer (int32) no
timeoutMs integer (int32) no
Field Type Required Description
data FunctionResponse[] yes
page integer (int64) yes
size integer (int64) yes
total integer (int64) yes
total_pages integer (int64) yes
Field Type Required Description
digest string yes
number integer (int32) yes
Field Type Required Description
dryRun boolean no Report what would be pruned and change nothing
keep integer (int64) no Untagged versions to keep (>= 1); omitted uses the platform setting FC_FUNCTIONS_KEEP_VERSIONS (default 20) Minimum 1.
Field Type Required Description
artifactsDeleted integer (int64) yes Stored artifacts removed because no remaining version references them
dryRun boolean yes
keep integer (int64) yes
pruned PrunedVersionResponse[] yes Versions deleted (would be deleted, on a dry run), oldest first
untagged integer (int64) yes Untagged versions before pruning
Field Type Required Description
digest string yes Lowercase hex sha256 of a previously-uploaded artifact
runtime string no “wasm” (default), “js” or “jvm” (a jar)
Field Type Required Description
version integer (int32) yes
Field Type Required Description
alias AliasResponse yes
wiring WiringResponse no
Field Type Required Description
alias string no An existing alias name to route to; omitted routes to live
aliasPrefixes string[] no Opt-in alias prefixes: for each prefix p, “p-<hostname>” serves alias p (live routes only; no hyphens)
hostname string yes A lowercase DNS hostname covered by a claimed zone (no port, no wildcard)
pathPrefix string yes The path prefix routed to this function, e.g. “/” or “/webhooks”
Field Type Required Description
value string yes
Field Type Required Description
alias string no
aliasPrefixes string[] yes
createdAt string (date-time) yes
createdBy string no
functionId string yes
hostname string yes
id string yes
pathPrefix string yes
updatedAt string (date-time) yes
Field Type Required Description
key string yes
kind string yes
updatedAt string (date-time) yes
value string no
Field Type Required Description
builtIn boolean yes True for the built-in http context
description string yes
enabledUntil string (date-time) | null yes
indefinite boolean yes Live and switched on until switched off; enabledUntil is then its hard ceiling (indefiniteMaxDays after it was switched on), when it closes by itself
indefiniteMaxDays integer (int64) yes The ceiling, in days, of an until-switched-off window for this context; 0 when the context cannot take one (http)
live boolean yes The window is open now (enabledUntil is in the future)
maxMinutes integer (int64) yes The longest timed window this context may be enabled for
name string yes
sampleRate integer (int64) yes One invocation in N is captured; 1 = all
Field Type Required Description
contexts TraceContextResponse[] yes
Field Type Required Description
nextCursor string | null yes Pass as cursor to fetch the next (older) page; null on the last page
records TraceRecordResponse[] yes
Field Type Required Description
at string (date-time) yes
bodiesRedacted boolean no
context string yes
correlationId string | null yes
data any yes The record’s data. For kind http: request, response, durationMs, outcome. For kind outbound (a call the function made): client, request (with url), response, durationMs, attempt, failure.
id string yes
invocationId string yes
kind string yes One of: trace, http, log, outbound.
level string yes
message string yes
redacted boolean no Sensitive parts withheld (no platform:function:trace:view-bodies): an http record keeps only method, path without query, status, duration, outcome and body sizes; a log record its metadata (message empty, no data); a trace record its message (no data)
reference string | null yes
runnerId string | null yes
version integer (int32) yes
Field Type Required Description
clearPool boolean no Set true to move the function back to the default runner pool
clearServiceAccount boolean no Set true to return the function to its application’s service account
description string no
limits LimitsDTO no
pool string no
serviceAccountId string no Set the webhook verifier service account (id or code); must exist, be active and be reachable by the caller
warm boolean no
Field Type Required Description
abi integer (int32) yes
createdAt string (date-time) yes
describe any yes
digest string yes
failure any no
functionId string yes
id string yes
number integer (int32) yes
publishedBy string no
readyAt string (date-time) no
runtime string yes
sizeBytes integer (int64) yes
status string yes
Field Type Required Description
dispatchPoolCode string no
schedulesCreated integer (int64) no
schedulesDeleted integer (int64) no
schedulesUpdated integer (int64) no
subscriptionsCreated integer (int64) no
subscriptionsDeleted integer (int64) no
subscriptionsUpdated integer (int64) no