Skip to content

API Overview

API Overview

flow8 provides a comprehensive REST API for all platform operations.

Base URL

http://your-host:4454/api/

All endpoints return application/json. All request bodies must be Content-Type: application/json.

Authentication

Two methods are supported:

Session cookie (for browser clients):

Terminal window
curl -c cookies.txt -X POST http://host:4454/api/auth/login \
-d '{"email":"user@example.com","password":"password"}'
# Use cookies.txt in subsequent requests with -b cookies.txt

API key (for programmatic access):

Terminal window
curl -H "Authorization: Bearer eyJ..." http://host:4454/api/flows

See the Authentication page for creating and managing API keys.

Pagination

List endpoints support pagination via query parameters:

GET /api/flows?page=0&size=25
ParameterDefaultMaxDescription
page0Zero-based page number
size25100Items per page

Response includes pagination metadata:

{
"data": [...],
"total": 142,
"page": 0,
"size": 25,
"pages": 6
}

Error Format

{
"error": "FLOW_NOT_FOUND",
"message": "Flow with ID 65abc123 not found",
"statusCode": 404
}

Common error codes: UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION_ERROR, INTERNAL_ERROR.

Endpoint Index

Authentication

MethodPathDescription
POST/api/auth/loginSession login
POST/api/auth/logoutEnd session
GET/api/auth/meCurrent user info
POST/api/auth/api-keysCreate API key
GET/api/auth/api-keysList API keys
DELETE/api/auth/api-keys/:idRevoke API key

Flows

MethodPathDescription
GET/api/flowsList flows
POST/api/flowsCreate flow
GET/api/flows/:idGet flow
PUT/api/flows/:idUpdate flow
DELETE/api/flows/:idDelete flow
POST/api/flows/:id/runTrigger execution
GET/api/flows/:id/layersList flowlets
POST/api/flows/:id/layersAdd flowlet
PUT/api/flows/:id/layers/:layerIdUpdate flowlet
DELETE/api/flows/:id/layers/:layerIdDelete flowlet

Executions (Plays)

MethodPathDescription
GET/api/playsList all plays
GET/api/plays/:idGet play detail
GET/api/plays/:id/layersGet play layer results
POST/api/plays/:id/approveApprove a pending step
DELETE/api/plays/:idCancel a running play

Groups

MethodPathDescription
GET/api/groupsList groups
POST/api/groupsCreate group
PUT/api/groups/:idUpdate group
DELETE/api/groups/:idDelete group

KV Store

MethodPathDescription
GET/api/kvList KV entries
POST/api/kvSet KV value
DELETE/api/kv/:idDelete KV entry

Channels

MethodPathDescription
GET/api/channelsList channels
POST/api/channelsCreate channel
GET/api/channels/:idGet channel
PUT/api/channels/:idUpdate channel
DELETE/api/channels/:idDelete channel

Schedules

MethodPathDescription
GET/api/schedulesList schedules
POST/api/schedulesCreate schedule
PUT/api/schedules/:idUpdate schedule
DELETE/api/schedules/:idDelete schedule

WebSocket

ProtocolPathDescription
WS/api/wsReal-time execution events