POST /create (registers a new function)
name required type description Nameyes string Name of the function (globally unique) Runtimeyes string Base container runtime (e.g., python310)MemoryMByes int Memory (in MB) reserved for each function instance CPUDemandfloat Max CPU cores (or fractions of) allocated to function instances (e.g., 1.0means up to 1 core,-1.0means 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 ifRuntimeiscustomTarFunctionCode(yes) string Source code package as a base64-encoded TAR archive. Not needed if RuntimeiscustomCustomImagestring If Runtimeiscustom: custom container image to use
http code content-type response comments 200application/json{ "Created": "function_name" }404text/plainInvalid runtime.Chosen Runtimedoes not exist409text/plainFunction already exists 503text/plainCreation failed
POST /delete (deletes an existing function)
name required type description Nameyes string Name of the function
http code content-type response comments 200application/json{ "Deleted": "function_name" }404text/plainUnknown function.The function does not exist 503text/plainCreation failed
POST /invoke/ (invokes function <func>)
name required type description Paramsyes dict Key-value specification of invocation parameters CanDoOffloadingbool Whether the request can be offloaded (default: true) Asyncbool Whether the invocation is asynchronous (default: false) QoSClassint ID of the QoS class for the request QoSMaxRespTfloat Desired max response time ReturnOutputbool Whether function std. output and error should be collected (if supported by the function runtime)
http code content-type response comments 200application/jsonSee below. 404text/plainFunction unknown.429text/plainNot served because of excessive load. 500text/plainInvocation 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 200application/jsonSee response to synchronous requests. 404text/plainResults not found. 500text/plainCould not retrieve results500text/plainFailed to connect to Global Registry
POST /prewarm (prewarms instances for a function)
name required type description Functionyes string Name of the function Instancesyes int Instances to spawn (0 to only pull the image) ForceImagePullbool Always check for image updates, even if a local copy exists
http code content-type response comments 200application/json{ "Prewarmed": N }The number of prewarmed instances is returned. It might be less than Instancesdue to resource shortage.404text/plainUnknown function.The function does not exist 503text/plainPrewarming failed