Flow

List flow blocks

GET
/flows/{flow}/blocks

Returns the blocks of one file of the flow's current bundle, as Flux's read builds them on deploy (Flux spec §5.1): every unit of the file, with the file's source text, which their ranges index into. file is a path from GET /flows/{flow}/functions. Same access as GET /flows/{flow}. Not pinned to a deploy: a 404 for a listed file means the flow was re-deployed; fetch the function index again.

BearerAuth
headerAuthorizationBearer <JWT>

Admin token, API token issued via /api-tokens, or an OIDC JWT access token issued by the configured OIDC provider.

flow*string
Formatuuid
file*string

Canonical path of the file (Flux spec §5.3).

Response Body

The file's blocks and source.

application/json
  1. response
blocks*

Flux read result (Flux spec §5.1): file, units, actions and types. Its shape is @h2ofx/schema's FileBlocks.

source*string

The file's text as TypeScript reads it, without a byte-order mark: what Flare's Code view shows. Ranges count its lines from 1 and its columns in UTF-16 code units (Flux spec §4.2).

Example Request
curl -X GET 'https://example.com/api/hub/flows/497f6eca-6276-4993-bfeb-53cbbbba6f08/blocks?file=src%2Findex.ts'
Example Response
{  "blocks": {},  "source": "string"}