Is every serverless function the caller's org has published, each with its real…
Is every serverless function the caller's org has published, each with its real 7-day rollup.
GET /v1/functions
| Address | https://api.hanzo.ai/v1/functions |
| Method | GET |
| Operation | get_functions |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Is every serverless function the caller's org has published, each with its real 7-day rollup.
A row carries the function's runtime, resource limits, deployment target and its invoke endpoint, plus envCount — how many secrets it mounts. The rollup fields are ABSENT rather than zero when the function has not run in the window, so a console renders "—" instead of a fabricated 0.
Requires a validated principal; the listing is scoped to its org.
Request
GET /v1/functions takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | fnList | ok |
200 body — 17 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
functions | body | functionView[] | — | Functions is one row per published function. |
functions[].avgDurationMs | body | number | — | mean wall-clock of those runs |
functions[].createdAt | body | string | — | when it was first published |
functions[].endpoint | body | string | — | the path that invokes it |
functions[].envCount | body | integer | — | how many secret NAMES it mounts; values are never carried |
functions[].environment | body | string | — | the language it runs under |
functions[].errors7d | body | integer | — | how many of those runs failed |
functions[].image | body | string | — | the prebuilt image it runs, when it runs one instead of source |
functions[].invocations7d | body | integer | — | runs in the last 7 days; ABSENT, never 0, when it has not run |
functions[].lastDeployedAt | body | string | — | when its code last changed |
functions[].memoryLimit | body | string | — | the memory it runs with, and the multiplier on its compute charge |
functions[].name | body | string | — | the function's org-unique handle |
functions[].namespace | body | string | — | the display group it belongs to; the org is the isolation key |
functions[].status | body | string | — | whether it is ready to serve |
functions[].successRate | body | number | — | share of those runs that succeeded, 0..1 |
functions[].target | body | string | — | where it runs: empty for the sandbox, "fleet" for the org's GPU fleet |
functions[].timeoutSec | body | integer | — | its per-invocation deadline |
Failure carries the platform error shape — see Errors.
Examples
hanzo functions listimport { Configuration, FunctionsApi } from 'hanzoai';
const api = new FunctionsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getFunctions();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import FunctionsApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = FunctionsApi(client).get_functions()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.FunctionsAPI.GetFunctions(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, functions_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = functions_api::get_functions(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.FunctionsApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new FunctionsApi(client).getFunctions();curl https://api.hanzo.ai/v1/functions \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches functions through the functions tool, which names its 10 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_functions"
}
}
}'How is this guide?