v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01206322659.2 KB
projects

Fetch runtime logs for a deployed project component.

get/orgs/{org_id}/projects/{project_id}/envs/{env_id}/logs

Path parameters

org_idstring required
project_idstring required
env_idstring required

Query parameters

component'ui' | 'api' | 'workforce' nullable

Routing selector for the deployable units a Timbal project owns: the project-level frontend (Ui), the project-level backend (Api), and the N workforce components (Workforce, keyed on manifest_id).

Used as a ?component= query parameter on every surface that acts on one component at a time (GET /preview/logs, GET /envs/{env}/logs, etc.). Wire values are lowercase (ui/api/workforce). Surfaces that don't apply to a given variant (e.g. previews don't run workforce components today) reject with 501 NotImplemented instead of forking the schema — clients rely on a single shared vocabulary.

Distinct from [AppType], which is a type discriminator on workforce rows (Agent vs Workflow) carried in response payloads. ProjectComponent collapses both into Workforce because every surface that selects a workforce component keys on manifest_id, not on the Agent-vs-Workflow distinction (the underlying log pipeline, deployment shape, etc. are identical for both). Use [From<AppType>] to bridge: any workforce type — including the forward-compat AppType::Unknown catch-all — maps to ProjectComponent::Workforce.

Which component's logs to fetch. Shared vocabulary with GET /preview/logs (which 501s on workforce). workforce here covers agent and workflow components interchangeably. Resolves to the component's most recent deployment. Mutually exclusive with deployment_id; exactly one of the two must be provided.

deployment_idstring nullable

Fetch logs for one specific deployment (the id field in the deployments-list response) instead of the component's latest. Lets you read the runtime output of a failed or superseded deployment post-mortem. Mutually exclusive with component.

component_idstring nullable

Numeric workforce app id (the value the SDK reads from TIMBAL_APP_ID, also returned as id on each deployment in the deployments-list response). XOR with component_uid when component=workforce; forbidden for ui / api.

component_uidstring nullable

Workforce manifest uid (the _id field in timbal.yaml, also returned as uid on each deployment in the deployments-list response). XOR with component_id. Display name is deliberately not accepted as a selector — it's user-editable and not guaranteed unique within a project.

start_timeinteger nullable

ms since epoch. Defaults to end_time - 1h.

end_timeinteger nullable

ms since epoch. Defaults to now.

limitinteger nullable

Defaults to 50.

page_tokenstring nullable

Pagination cursor from a prior response. Returned only when cursor-based pagination is available for the component's runtime; ignored otherwise.

Response

Logs fetched

end_timeinteger required
limitinteger required
next_page_tokenstring nullable
start_timeinteger required