docs(06): create phase plan for n8n API access
Phase 6: n8n API Access - 1 plan in 1 wave - Covers API-01 through API-04 requirements - Human checkpoint for API key creation + automated verification - Fixed: Use PUT (not PATCH) per current n8n docs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,15 +115,16 @@ Output: Verified API access with documented curl commands for workflow CRUD and
|
||||
-H "accept: application/json" \
|
||||
-H "X-N8N-API-KEY: ${N8N_API_KEY}")
|
||||
|
||||
# PATCH with same nodes/connections (no-op update to verify write access)
|
||||
echo "$WORKFLOW" | jq '{nodes: .nodes, connections: .connections}' | \
|
||||
curl -s -X PATCH "${N8N_HOST}/api/v1/workflows/{WORKFLOW_ID}" \
|
||||
# PUT with same nodes/connections (no-op update to verify write access)
|
||||
# Note: n8n public API uses PUT (full update), not PATCH
|
||||
echo "$WORKFLOW" | jq '{name: .name, nodes: .nodes, connections: .connections, settings: .settings}' | \
|
||||
curl -s -X PUT "${N8N_HOST}/api/v1/workflows/{WORKFLOW_ID}" \
|
||||
-H "accept: application/json" \
|
||||
-H "X-N8N-API-KEY: ${N8N_API_KEY}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @- | jq '.updatedAt'
|
||||
```
|
||||
Expected: Updated timestamp returned (workflow accepted the PATCH)
|
||||
Expected: Updated timestamp returned (workflow accepted the PUT)
|
||||
|
||||
4. **API-04: Execution History** - View recent workflow runs
|
||||
```bash
|
||||
@@ -145,13 +146,13 @@ Output: Verified API access with documented curl commands for workflow CRUD and
|
||||
All 4 curl commands return successful JSON responses:
|
||||
- GET /api/v1/workflows returns 200 with workflow list
|
||||
- GET /api/v1/workflows/{id} returns 200 with full workflow JSON
|
||||
- PATCH /api/v1/workflows/{id} returns 200 with updated timestamp
|
||||
- PUT /api/v1/workflows/{id} returns 200 with updated timestamp
|
||||
- GET /api/v1/executions returns 200 with execution records
|
||||
</verify>
|
||||
<done>
|
||||
- API-01: API key authenticates successfully (no 401/403)
|
||||
- API-02: Can read full workflow JSON including nodes and connections
|
||||
- API-03: Can push workflow changes (PATCH accepted, updatedAt changed)
|
||||
- API-03: Can push workflow changes (PUT accepted, updatedAt changed)
|
||||
- API-04: Can view execution history with status for each run
|
||||
- .env.n8n-api created with credentials (gitignored)
|
||||
</done>
|
||||
@@ -171,7 +172,7 @@ Run the 4 verification curl commands and confirm:
|
||||
All 4 requirements verified with working curl commands:
|
||||
- API-01: n8n API key created and accessible (curl returns 200)
|
||||
- API-02: Claude Code can read workflow via API (full JSON retrieved)
|
||||
- API-03: Claude Code can update workflow via API (PATCH succeeds)
|
||||
- API-03: Claude Code can update workflow via API (PUT succeeds)
|
||||
- API-04: Claude Code can view execution history and logs (executions listed)
|
||||
</success_criteria>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user