You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add End User lookup, Human Input Form, Workflow Resume Events APIs (v1.4.0)
Track dify 1.16.0-rc1 service_api additions:
- GET /end-users/{end_user_id}: resolve end-user details from IDs returned
by other APIs (e.g., created_by from file upload)
- GET/POST /form/human_input/{form_token}: fetch and submit paused
Human Input forms, completing the HITL loop started by 1.3.0 events
- GET /workflow/{workflow_run_id}/events: SSE stream for resuming
workflow events after a human-input pause
Introduces a reusable executeGetStreamRequest helper for future GET-SSE
endpoints. Bumps version to 1.4.0.
- Add Human Input (HITL) workflow event support for Dify 1.14.2+ (#162)
4
-
- New events: `human_input_required`, `workflow_paused`, `human_input_form_filled`, `human_input_form_timeout`
5
-
- New event models: `HumanInputRequiredEvent`, `WorkflowPausedEvent`, `HumanInputFormFilledEvent`, `HumanInputFormTimeoutEvent`
6
-
- New callback hooks on `WorkflowStreamCallback` and `ChatflowStreamCallback`: `onHumanInputRequired`, `onWorkflowPaused`, `onHumanInputFormFilled`, `onHumanInputFormTimeout`
3
+
- Add Service API for **End User** lookup (`GET /end-users/{end_user_id}`)
4
+
- New method on `DifyBaseClient` (available on chat/chatflow/workflow/completion clients): `EndUserResponse getEndUser(String endUserId)`
- Use case: when other APIs return `created_by` as an end-user ID, resolve `external_user_id` / `session_id`
7
+
- Add Service API for **Human Input Form** (companion to the Human Input events shipped in 1.3.0)
8
+
-`HumanInputFormResponse getHumanInputForm(String formToken)` — `GET /form/human_input/{form_token}`, fetch a paused form definition
9
+
-`void submitHumanInputForm(String formToken, HumanInputFormSubmitRequest request)` — `POST /form/human_input/{form_token}`, submit inputs + selected action + user to resume the workflow
10
+
- Methods live on `DifyBaseClient` so both workflow and chatflow apps can call them
11
+
- New models: `HumanInputFormResponse`, `HumanInputFormSubmitRequest`
12
+
- Add Service API for **Workflow Resume Events** stream (`GET /workflow/{workflow_run_id}/events`)
13
+
- New method on `DifyWorkflowClient`: `void streamWorkflowEvents(String workflowRunId, String user, Boolean includeStateSnapshot, Boolean continueOnPause, WorkflowStreamCallback callback)`
14
+
- After submitting a human-input form, use this endpoint to re-subscribe to the resumed workflow's events (SSE)
15
+
-`include_state_snapshot=true` replays a status summary of already-executed nodes; `continue_on_pause=true` keeps the stream open across multiple pauses
16
+
- Introduce reusable GET-SSE helper (`executeGetStreamRequest`) for future streaming endpoints
0 commit comments