Read a FunctionCall
const url = 'https://example.com/apis/nodus.dev/v1/namespaces/example/functioncalls/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/apis/nodus.dev/v1/namespaces/example/functioncalls/exampleParameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The project.
The object’s name.
Responses
Section titled “ Responses ”OK
FunctionCall is one invocation of a Function. .remote() and .spawn() create one; .map() creates one per input in batches of up to 1,000. Calls are kept 7 days after they end.
object
object
object
object
object
object
object
FunctionCallSpec describes a call. Everything but state is immutable.
object
Function names a Function in the project.
Payload is an argument or a result: inline bytes of at most 64 KiB, or a content-addressed blob.
object
Blob is the sha256:
Encoding is Pickle (cloudpickle, the SDK) or JSON.
Inline is the payload, base64 on the wire, at most 64 KiB. Exactly one of inline and blob.
SHA256 is the hex digest of the payload, set on results.
MapID groups the calls of one .map(); the server adds the label nodus.dev/map.
MapIndex is the call’s position in its .map().
Session is the caller’s session id; claims take turns between sessions so no caller starves.
State is Running (the default) or the cancel state.
Timeout is the limit of this call, at most the Function’s (default the Function’s).
FunctionCallStatus is what Nodus observed about a call.
object
CompletionTime is when the call ended.
Conditions are Funded and Scheduled.
object
CostUSD is the worker time attributed to the call, whole seconds at the Function’s per-call rate.
RemoteError is an exception the function raised.
object
Message is the exception message, scrubbed.
Traceback is the formatted traceback, scrubbed.
Type is the exception’s qualified name; the SDK re-raises it when importable.
Message explains the phase in a sentence.
Phase is Queued, Running, Recovering, Succeeded, Failed or one of the two cancel phases.
Reason is RemoteError, DeadlineExceeded, RecoveryLimitExceeded, FunctionDeleted or the cancel reason.
Recoveries counts the re-dispatches after a worker loss.
Payload is an argument or a result: inline bytes of at most 64 KiB, or a content-addressed blob.
object
Blob is the sha256:
Encoding is Pickle (cloudpickle, the SDK) or JSON.
Inline is the payload, base64 on the wire, at most 64 KiB. Exactly one of inline and blob.
SHA256 is the hex digest of the payload, set on results.
Retries counts the exception retries used.
StartTime is when a worker last started the call.
FunctionCallWorker names the worker attempt a call is bound to.
object
Attempt is the worker attempt id.
Epoch is the attempt’s epoch; a result from another epoch is fenced.
Example generated
{ "apiVersion": "example", "kind": "example", "metadata": { "annotations": { "additionalProperty": "example" }, "creationTimestamp": "example", "deletionGracePeriodSeconds": 1, "deletionTimestamp": "example", "finalizers": [ "example" ], "generateName": "example", "generation": 1, "labels": { "additionalProperty": "example" }, "managedFields": [ { "apiVersion": "example", "fieldsType": "example", "fieldsV1": { "additionalProperty": "example" }, "manager": "example", "operation": "example", "subresource": "example", "time": "example" } ], "name": "example", "namespace": "example", "ownerReferences": [ { "apiVersion": "example", "blockOwnerDeletion": true, "controller": true, "kind": "example", "name": "example", "uid": "example" } ], "resourceVersion": "example", "selfLink": "example", "uid": "example" }, "spec": { "function": "example", "input": { "blob": "example", "encoding": "example", "inline": "example", "sha256": "example" }, "mapId": "example", "mapIndex": 1, "session": "example", "state": "example", "timeout": "example" }, "status": { "completionTime": "example", "conditions": [ { "lastTransitionTime": "example", "message": "example", "observedGeneration": 1, "reason": "example", "status": "example", "type": "example" } ], "costUSD": "example", "error": { "message": "example", "traceback": "example", "type": "example" }, "message": "example", "phase": "example", "reason": "example", "recoveries": 1, "result": { "blob": "example", "encoding": "example", "inline": "example", "sha256": "example" }, "retries": 1, "startTime": "example", "worker": { "attempt": "example", "epoch": 1 } }}default
Section titled “ default ”An error: a metav1.Status whose reason is a registered code.
Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).
object
object
object
Docs is the URL of the code’s docs page.
Fix says what to do next, for example a CLI command or the field to change.
object
object
RequestID identifies the request in logs and support tickets.
Example generated
{ "apiVersion": "example", "code": 1, "details": { "causes": [ { "field": "example", "message": "example", "reason": "example" } ], "group": "example", "kind": "example", "name": "example", "retryAfterSeconds": 1, "uid": "example" }, "docs": "example", "fix": "example", "kind": "example", "message": "example", "metadata": { "continue": "example", "remainingItemCount": 1, "resourceVersion": "example", "selfLink": "example", "shardInfo": { "selector": "example" } }, "reason": "example", "requestId": "example", "status": "example"}