Function control: 7 operations, tagged function-control in the OpenAPI document.
| Method |
Path |
Summary |
GET |
/control/functions/artifacts/{digest} |
Download a function artifact by digest (function-runner role only) |
GET |
/control/functions/desired |
A function pool’s desired state (long-poll; function-runner role only) |
POST |
/control/functions/dispatch-jobs |
Create a dispatch job on a function’s behalf (function-runner role only) |
POST |
/control/functions/events |
Emit an event on a function’s behalf (function-runner role only) |
POST |
/control/functions/heartbeat |
A function runner’s heartbeat report (function-runner role only) |
POST |
/control/functions/token |
Mint the application’s service account token for a function that declares platformToken (function-runner role only) |
POST |
/control/functions/trace-log |
Ship trace records captured by a function runner (function-runner role only) |
Download a function artifact by digest (function-runner role only)
Operation ID: getFunctionRunnerArtifact
Parameters
| Name |
In |
Type |
Required |
Description |
digest |
path |
string |
yes |
Lowercase hex sha256 of the artifact (64 characters) |
Responses
| Status |
Description |
Body |
200 |
OK |
none |
default |
Error |
application/json ErrorModel |
A function pool’s desired state (long-poll; function-runner role only)
Operation ID: getFunctionRunnerDesired
Parameters
| Name |
In |
Type |
Required |
Description |
pool |
query |
string |
yes |
The runner pool to fetch desired state for |
wait |
query |
integer (int64) |
no |
Seconds to hold the request open for a change, capped at control.MaxWait |
runtimes |
query |
string |
no |
Comma-separated runtimes the runner can run (for example wasm,js). Only versions of these runtimes are returned. Absent means wasm,js. |
If-None-Match |
header |
string |
no |
|
Responses
| Status |
Description |
Body |
200 |
OK |
application/json Desired |
default |
Error |
application/json ErrorModel |
Create a dispatch job on a function’s behalf (function-runner role only)
Operation ID: postFunctionRunnerDispatchJob
Request body (required)
Responses
Emit an event on a function’s behalf (function-runner role only)
Operation ID: postFunctionRunnerEvent
Request body (required)
Responses
A function runner’s heartbeat report (function-runner role only)
Operation ID: postFunctionRunnerHeartbeat
Request body (required)
| Content type |
Schema |
application/json |
Heartbeat |
Responses
| Status |
Description |
Body |
204 |
No Content |
none |
default |
Error |
application/json ErrorModel |
Mint the application’s service account token for a function that declares platformToken (function-runner role only)
Operation ID: postFunctionRunnerToken
Request body (required)
Responses
Ship trace records captured by a function runner (function-runner role only)
Operation ID: postFunctionRunnerTraceLog
Request body (required)
Responses
| Status |
Description |
Body |
202 |
Accepted |
application/json TraceAck |
default |
Error |
application/json ErrorModel |
| Field |
Type |
Required |
Description |
budgetBytes |
integer (int64) |
yes |
|
compiledBytes |
integer (int64) |
yes |
|
evictions |
integer (int64) |
yes |
|
limitBytes |
integer (int64) |
yes |
|
linearBytes |
integer (int64) |
yes |
|
loaded |
integer (int64) |
yes |
|
refused |
integer (int64) |
yes |
|
reserveBytes |
integer (int64) |
yes |
|
rssBytes |
integer (int64) |
no |
|
| Field |
Type |
Required |
Description |
auth |
TokenAuth |
yes |
|
functions |
Function[] |
yes |
|
pool |
string |
yes |
|
revision |
integer (int64) |
yes |
|
routes |
Route[] |
no |
|
| Field |
Type |
Required |
Description |
causationId |
string |
no |
|
code |
string |
no |
|
contentType |
string |
no |
|
correlationId |
string |
no |
|
dataOnly |
boolean |
no |
|
descriptor |
string |
no |
|
maxRetries |
integer (int64) |
no |
|
messageGroup |
string |
no |
|
metadata |
KV[] |
no |
|
mode |
string |
no |
|
path |
string |
yes |
|
subject |
string |
no |
|
target |
string |
yes |
|
timeoutSeconds |
integer (int64) |
no |
|
| Field |
Type |
Required |
Description |
dispatch |
Dispatch |
yes |
|
functionId |
string |
yes |
|
invocationId |
string |
no |
|
payload |
string |
yes |
|
requestCorrelationId |
string |
no |
|
version |
integer (int64) |
yes |
|
| Field |
Type |
Required |
Description |
jobId |
string |
yes |
|
| Field |
Type |
Required |
Description |
data |
string |
yes |
|
event |
Event |
yes |
|
functionId |
string |
yes |
|
version |
integer (int64) |
yes |
|
| Field |
Type |
Required |
Description |
eventId |
string |
yes |
|
| Field |
Type |
Required |
Description |
causationId |
string |
no |
|
contentType |
string |
no |
|
correlationId |
string |
no |
|
dedupId |
string |
yes |
|
messageGroup |
string |
no |
|
source |
string |
no |
|
subject |
string |
no |
|
type |
string |
yes |
|
| Field |
Type |
Required |
Description |
address |
string |
yes |
|
applicationId |
string |
yes |
|
clientId |
string |
no |
|
config |
map<string, string> |
no |
|
db |
map<string, string> |
no |
|
id |
string |
yes |
|
limits |
Limits |
yes |
|
secrets |
map<string, string> |
no |
|
trace |
TraceState[] |
no |
|
versions |
Version[] |
yes |
|
warm |
boolean |
yes |
|
webhookSecret |
string |
no |
|
| Field |
Type |
Required |
Description |
functionId |
string |
yes |
|
version |
integer (int64) |
yes |
|
| Field |
Type |
Required |
Description |
accessToken |
string |
yes |
|
expiresIn |
integer (int64) |
yes |
|
tokenType |
string |
yes |
|
| Field |
Type |
Required |
Description |
budget |
BudgetReport |
yes |
|
capabilities |
RunnerCapabilities |
no |
|
pool |
string |
yes |
|
revision |
integer (int64) |
yes |
|
runnerId |
string |
yes |
|
startedAt |
string (date-time) |
yes |
|
versions |
VersionReport[] |
yes |
|
| Field |
Type |
Required |
Description |
key |
string |
yes |
|
value |
string |
yes |
|
| Field |
Type |
Required |
Description |
maxBodyBytes |
integer (int64) |
yes |
|
maxConcurrency |
integer (int64) |
yes |
|
memoryMb |
integer (int64) |
yes |
|
timeoutMs |
integer (int64) |
yes |
|
| Field |
Type |
Required |
Description |
address |
string |
yes |
|
alias |
string |
no |
|
aliasPrefixes |
string[] |
no |
|
hostname |
string |
yes |
|
pathPrefix |
string |
yes |
|
| Field |
Type |
Required |
Description |
extra |
object |
no |
|
protocol |
integer (int64) |
yes |
|
runnerKind |
string |
no |
|
runtimes |
string[] |
yes |
|
version |
string |
no |
|
| Field |
Type |
Required |
Description |
audience |
string |
yes |
|
issuer |
string |
yes |
|
| Field |
Type |
Required |
Description |
accepted |
integer (int64) |
yes |
|
dropped |
integer (int64) |
yes |
|
| Field |
Type |
Required |
Description |
pool |
string |
yes |
|
records |
TraceRecord[] |
yes |
|
runnerId |
string |
yes |
|
| Field |
Type |
Required |
Description |
address |
string |
yes |
|
at |
integer (int64) |
yes |
|
context |
string |
yes |
|
correlationId |
string |
no |
|
data |
any |
no |
|
id |
string |
no |
|
invocationId |
string |
yes |
|
kind |
string |
yes |
|
level |
string |
yes |
|
message |
string |
yes |
|
reference |
string |
no |
|
version |
integer (int64) |
yes |
|
| Field |
Type |
Required |
Description |
context |
string |
yes |
|
enabledUntilMs |
integer (int64) |
yes |
|
sampleRate |
integer (int64) |
yes |
|
| Field |
Type |
Required |
Description |
abi |
integer (int64) |
yes |
|
describe |
any |
yes |
|
digest |
string |
yes |
|
number |
integer (int64) |
yes |
|
roles |
string[] |
yes |
|
runtime |
string |
no |
|
| Field |
Type |
Required |
Description |
functionId |
string |
yes |
|
number |
integer (int64) |
yes |
|
reason |
string |
no |
|
state |
string |
yes |
|