Skip to content

api_reads

etl_craft.services.operations.api_reads

Exact HTTP identities and bounded history over shared operation documents.

RunsView dataclass

A page of runs, newest identity first, with an exclusive identity cursor.

get_pipeline

get_pipeline(ctx: OperationContext, code: str) -> PipelineView

Read one active definition without duplicating pipeline assembly.

get_runs

get_runs(ctx: OperationContext, code: str, limit: int = 20, before: int | None = None) -> RunsView

Read a bounded identity page without selecting a run by recency.

run_code

run_code(ctx: OperationContext, run_id: int) -> str

Resolve only the requested run's pipeline, never an active or recent replacement.

get_run_status

get_run_status(ctx: OperationContext, run_id: int) -> StatusView

Return the shared status document for an exact HTTP run identity.

get_attempt

get_attempt(ctx: OperationContext, attempt_id: int) -> AttemptView

Read one attempt with the same fields and conversions as CLI inspection.

attempt_log

attempt_log(ctx: OperationContext, attempt_id: int, offset: int = 0) -> Iterator[bytes]

Stream a stored attempt's canonical log in bounded chunks from a byte offset.