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
{{ message }}
Repository navigation
Commit a4c1152
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/workflows/blocks/human-in-the-loop.mdx
+25-12Lines changed: 25 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,14 +88,15 @@ Access resume data in downstream blocks using `<blockId.fieldName>`.
88
88
<Tab>
89
89
### REST API
90
90
91
-
Programmatically resume workflows using the resume endpoint. The `contextId` is available from the block's `resumeEndpoint` output or from the `_resume` object in the paused execution response.
91
+
Programmatically resume workflows through the v2 execution resource. The `contextId` is available from the block's `resumeEndpoint` output or from the `_resume` object in the paused execution response.
92
92
93
93
```bash
94
-
POST /api/resume/{workflowId}/{executionId}/{contextId}
94
+
POST /api/v2/workflows/{workflowId}/executions/{executionId}/resume
95
95
Content-Type: application/json
96
96
X-API-Key: your-api-key
97
97
98
98
{
99
+
"contextId": "<contextId>",
99
100
"input": {
100
101
"approved": true,
101
102
"comments": "Looks good to proceed"
@@ -109,11 +110,16 @@ Access resume data in downstream blocks using `<blockId.fieldName>`.
"description": "Resumes one human-in-the-loop pause context on the parent execution. The resumed attempt receives a new execution ID. Sync attempts return the execution resource, stream attempts return Server-Sent Events, and async or serialized attempts return a 202 receipt whose `statusUrl` is the v2 execution resource.",
1544
+
"tags": ["Workflows"],
1545
+
"security": [
1546
+
{
1547
+
"apiKey": []
1548
+
}
1549
+
],
1550
+
"parameters": [
1551
+
{
1552
+
"$ref": "#/components/parameters/WorkflowId"
1553
+
},
1554
+
{
1555
+
"name": "executionId",
1556
+
"in": "path",
1557
+
"required": true,
1558
+
"description": "The execution ID of the paused parent run.",
1559
+
"schema": {
1560
+
"type": "string",
1561
+
"minLength": 1
1562
+
}
1563
+
}
1564
+
],
1565
+
"requestBody": {
1566
+
"required": true,
1567
+
"description": "The pause context to resume and its optional input. Bodies over 10 MB and unknown keys are rejected.",
1568
+
"content": {
1569
+
"application/json": {
1570
+
"schema": {
1571
+
"type": "object",
1572
+
"additionalProperties": false,
1573
+
"required": ["contextId"],
1574
+
"properties": {
1575
+
"contextId": {
1576
+
"type": "string",
1577
+
"minLength": 1,
1578
+
"description": "The context ID of the human-in-the-loop pause point."
1579
+
},
1580
+
"input": {
1581
+
"description": "Input supplied to the paused block."
1582
+
}
1583
+
}
1584
+
},
1585
+
"example": {
1586
+
"contextId": "ctx_123",
1587
+
"input": {
1588
+
"approved": true,
1589
+
"comments": "Looks good to proceed"
1590
+
}
1591
+
}
1592
+
}
1593
+
}
1594
+
},
1595
+
"responses": {
1596
+
"200": {
1597
+
"description": "The completed, failed, paused, or cancelled resume execution resource.",
1598
+
"content": {
1599
+
"application/json": {
1600
+
"schema": {
1601
+
"type": "object",
1602
+
"required": ["data"],
1603
+
"properties": {
1604
+
"data": {
1605
+
"$ref": "#/components/schemas/ExecutionResource"
1606
+
}
1607
+
}
1608
+
},
1609
+
"example": {
1610
+
"data": {
1611
+
"executionId": "resume_exec_1",
1612
+
"workflowId": "wf_123",
1613
+
"status": "completed",
1614
+
"output": {
1615
+
"result": "approved"
1616
+
},
1617
+
"error": null,
1618
+
"durationMs": 420
1619
+
}
1620
+
}
1621
+
}
1622
+
}
1623
+
},
1624
+
"202": {
1625
+
"description": "The resume is queued. Poll `statusUrl` using the returned resume execution ID.",
0 commit comments