v1

latestOpenAPI 3.1.0Apache-2.02026-07-13153158.0 KB
invoke

Invoke a function synchronously

post/functions/{id}/invoke

Path parameters

idstring uuid required

Server-assigned function identifier (UUIDv4).

Headers

X-TensorWasm-Tenantinteger

Tenant scope (u64). Defaults to 0 if absent. Mandatory when the gateway runs with TENSOR_WASM_API_REQUIRE_TENANT=1.

Request body

exportstring nullable

Optional export-name override. When omitted (or null), the server tries _start first and falls back to main, matching the WASI command convention.

Response

Invocation complete

function_idstring uuid required

Server-assigned function identifier (UUIDv4).

{"stackTrail":"components:schemas:InvokeResult:properties:result","oasType":"schema","type":"unknown","description":"Invocation result. For exports returning `()` this collapses\nto the literal string `\"ok\"` (legacy back-compat envelope).\nFor exports with a non-empty result list this is a JSON\narray of return values — one element per wasm result slot,\nwith i32/i64 rendered as JSON integers and f32/f64 as JSON\nnumbers.\n"}