OpenapiFunctions
Is the output of a function's most recent run — its error text when that run…
Is the output of a function's most recent run — its error text when that run failed, else what it printed.
GET /v1/functions/{name}/logs
| Address | https://api.hanzo.ai/v1/functions/{name}/logs |
| Method | GET |
| Operation | get_functions_by_name_logs |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Is the output of a function's most recent run — its error text when that run failed, else what it printed.
It is the LAST run only, and it is empty when the function has never run. There is no log retention behind this beyond the recorded invocation itself.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | Name is the function the URL names. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | logLines | ok |
200 body — 1 field.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
logs | body | string | — | Logs is that run's error text when it failed, else its output. |
Failure carries the platform error shape — see Errors.
Examples
hanzo functions logs <name>import { Configuration, FunctionsApi } from 'hanzoai';
const api = new FunctionsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getFunctionsByNameLogs({ name: 'name' });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_by_name_logs(name='name')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.FunctionsAPI.GetFunctionsByNameLogs(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_by_name_logs(&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).getFunctionsByNameLogs();curl https://api.hanzo.ai/v1/functions/<name>/logs \
-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?