Hanzo
OpenapiFunctions

Is one function with everything a detail page needs in one round-trip: its…

Is one function with everything a detail page needs in one round-trip: its definition, its 7-day rollup, its trigger, its twenty most recent invocations…

GET /v1/functions/{name}

Addresshttps://api.hanzo.ai/v1/functions/{name}
MethodGET
Operationget_functions_by_name
AuthAuthorization: Bearer $HANZO_API_KEY

Is one function with everything a detail page needs in one round-trip: its definition, its 7-day rollup, its trigger, its twenty most recent invocations and the NAMES of the secrets it mounts.

Secret values are never read or returned. A name the caller's org does not hold is 404, which is also what another tenant's function looks like from here.

Request

1 field.

FieldInTypeRequiredDescription
namepathstringyesName is the function the URL names.

Response

StatusBodyMeaning
200functionDetailok

200 body — 31 fields.

FieldInTypeAlwaysDescription
avgDurationMsbodynumber
createdAtbodystring
endpointbodystring
envCountbodyinteger
environmentbodystring
errors7dbodyinteger
imagebodystring
invocations7dbodyinteger
lastDeployedAtbodystring
memoryLimitbodystring
namebodystring
namespacebodystring
recentInvocationsbodyinvocationView[]RecentInvocations is its twenty most recent runs, newest first.
recentInvocations[].durationMsbodyintegerhow long it took
recentInvocations[].idbodystringthe invocation's handle
recentInvocations[].methodbodystringthe HTTP method that triggered it
recentInvocations[].statusbodystringhow the run ended: ok, error or timeout
recentInvocations[].statusCodebodyintegerCode is the status the function's OWN code answered with, which is not the status of the reply — a program can answer 500 through a healthy sandbox.
recentInvocations[].timebodystringwhen it ran, RFC3339
secretsbodystring[]Secrets are the NAMES it mounts.
statusbodystring
successRatebodynumber
targetbodystring
timeoutSecbodyinteger
triggersbodytriggerView[]Triggers is how this function is reached.
triggers[].enabledbodybooleanwhether it currently fires
triggers[].functionNamebodystringthe function it calls
triggers[].idbodystringthe trigger's handle
triggers[].namebodystringa human label for it
triggers[].targetbodystringthe path it calls
triggers[].typebodystringwhat kind of trigger it is; HTTP is the only one today

Failure carries the platform error shape — see Errors.

Examples

hanzo functions get <name>

Functions API · All Hanzo APIs · Interactive reference

How is this guide?

On this page