Stream a running app's runs live, one per request
text/event-stream, the live counterpart of GET /v1/apps/{project}/invocations. Each data: line is one JSON object with a type:
ready, once, first.invocation, with aninvocationobject (the same shape as in the list) when a run finishes. It carries the console lines and the error that came with it, matched by order.timeis the host’s time when it finished. Lines no run claims within about 2 seconds arrive on their own as asysteminvocation. A request that runs longer than that can therefore show its early lines apart from it.dropped,closedand the: keepalivecomment: as inGET /v1/apps/{project}/tail. The viewer limits, the 10 minute session and the rate cap (100 invocations a second after the filters) are the same, and share the same slots.
GET /v1/apps/{project}/tail is unchanged: the Wrangler-shaped events sproutboat tail reads. Query strings and secret values are removed as in the list.
/v1/apps/{project}/invocations/tailAuthorizationBearer token · headerrequiredA team API key, sbk_..., from Settings, API keys.
x-api-keyAPI key · headerrequiredThe same key, in a header of its own.
projectstringrequiredThe app's name, unique within the team. 3 to 51 characters (or 1), lowercase letters, digits and dashes, not starting or ending with a dash.
statusstring[]ok (the run was not an error), error (status_code is ERROR: an exception, a failed outcome, a 5xx, or a cron run that did not answer 2xx), a code such as 404 or a class such as 5xx (requests only). Repeat the parameter or comma-separate.
methodstring[]HTTP methods (requests only), repeated or comma-separated.
handlerstring[]Only these kinds of run: fetch, scheduled, trigger, system. Repeat or comma-separate. Default: all.
pathstringA text the request path must contain (case-insensitive, at most 200 characters). Only requests have a path.
searchstringA text the method, path, a console line or an exception must contain (case-insensitive, at most 200 characters).
levelstringOnly runs with a line or exception of at least this level. warn is 13 and up, error 17 and up. An exception counts as an error; a console line has a level only where the host recorded one (none yet), so today this finds runs with an exception.
warnerrorThe event stream.
stringThe request is malformed. path names the field when one is at fault; some refusals (a digest mismatch, a body that is not JSON) carry a message only.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredinvaliderrorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerNo key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key lacks a grant (reason: forbidden, need: "<resource>:<action>").
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredforbiddenneedstringrequiredThe grant, as <resource>:<action>, for example app:write.
No such app, build, secret, manifest or claim in this team (another team's resource looks the same).
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerToo many live tails (tail-viewers, with the scope that is full and Retry-After), or key-rate-limited.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredkey-rate-limitedretry_after_sintegerrequiredSeconds to wait; also the Retry-After header.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredtail-viewersscopestringrequiredWhich limit is full.
appteamhostprocessretry_afterintegerrequiredSeconds to wait; also the Retry-After header.
The host agent answered something the Cloud could not handle (reason: agent-error).
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredagent-errorThe app's host is not reachable (host-unavailable), the app is not running on it yet (app-not-ready), or the audit log could not record the request (audit-unavailable). Retry shortly.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredhost-unavailableerrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredapp-not-readyerrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredaudit-unavailable