POST
/create
(registers a new function)
name required type description Name
yes string Name of the function (globally unique) Runtime
yes string Base container runtime (e.g., python310
)MemoryMB
yes int Memory (in MB) reserved for each function instance CPUDemand
float Max CPU cores (or fractions of) allocated to function instances (e.g., 1.0
means up to 1 core,-1.0
means no cap)Handler
(yes) string Function entrypoint in the source package; syntax and semantics depend on the chosen runtime (e.g., module.function_name
). Not needed ifRuntime
iscustom
TarFunctionCode
(yes) string Source code package as a base64-encoded TAR archive. Not needed if Runtime
iscustom
CustomImage
string If Runtime
iscustom
: custom container image to use
http code content-type response comments 200
application/json
{ "Created": "function_name" }
404
text/plain
Invalid runtime.
Chosen Runtime
does not exist409
text/plain
Function already exists 503
text/plain
Creation failed
POST
/delete
(deletes an existing function)
name required type description Name
yes string Name of the function
http code content-type response comments 200
application/json
{ "Deleted": "function_name" }
404
text/plain
Unknown function.
The function does not exist 503
text/plain
Creation failed
POST
/invoke/
(invokes function <func>
)
name required type description Params
yes dict Key-value specification of invocation parameters CanDoOffloading
bool Whether the request can be offloaded (default: true) Async
bool Whether the invocation is asynchronous (default: false) QoSClass
int ID of the QoS class for the request QoSMaxRespT
float Desired max response time ReturnOutput
bool Whether function std. output and error should be collected (if supported by the function runtime)
http code content-type response comments 200
application/json
See below. 404
text/plain
Function unknown.
429
text/plain
Not served because of excessive load. 500
text/plain
Invocation failed.
An example response for a successful synchronous request:
{
"Success": true,
"Result": "{\"IsPrime\": false}",
"ResponseTime": 0.712851098,
"IsWarmStart": false,
"InitTime": 0.709491144,
"OffloadLatency": 0,
"Duration": 0.003351790000000021,
"SchedAction": ""
}
Result
contains the object returned by the function upon completion.
The other fields provide lower-level information. For instance, Duration
reports the execution time of the function (in seconds), excluding all the
communication and initialization overheads. IsWarmStart
indicates whether
a warm container has been used for the request.
An example response for a successful asynchronous request:
{
"ReqId": "isprime-98330239242748"
}
ReqId
can be used later to poll the execution results.
GET
/poll/
(polls the results of <reqId>
)
<reqId>
is the request identifier, as returned by /invoke
.
http code content-type response comments 200
application/json
See response to synchronous requests. 404
text/plain
Results not found. 500
text/plain
Could not retrieve results
500
text/plain
Failed to connect to Global Registry
POST
/prewarm
(prewarms instances for a function)
name required type description Function
yes string Name of the function Instances
yes int Instances to spawn (0 to only pull the image) ForceImagePull
bool Always check for image updates, even if a local copy exists
http code content-type response comments 200
application/json
{ "Prewarmed": N }
The number of prewarmed instances is returned. It might be less than Instances
due to resource shortage.404
text/plain
Unknown function.
The function does not exist 503
text/plain
Prewarming failed