Compare API Endpoint Lists and Detect Breaking Changes Automatically
API developers and teams often need to quickly identify breaking changes between two contract versions. This workflow reliably detects removed endpoints and newly added required fields. Once imported, it can be triggered via webhook and delivers a structured compatibility assessment. The process saves valuable time, reduces the risk of errors, and reinforces quality assurance throughout API development.
Designed for developers, API owners, and teams, the API Breaking Change Checker enables automated compatibility checks for API contract changes. The workflow consists of three connected nodes: a webhook receives two API states via POST (each as an array of endpoint objects with method, path, and requiredFields). A code node analyzes whether endpoints have been removed or new required fields have been added. Results are returned as structured JSON, clearly listing affected endpoints and fields in the event of breaking changes. Invalid or incomplete input triggers a clear error message. No external credentials are required for setup, but webhook authentication in n8n should be enabled before production use. Since execution stores user data in n8n, data privacy must be considered. The workflow exclusively checks for removed endpoints and newly required fields—no further schema or type comparisons are included.
AI-generated image
Installation
1. Import the workflow into n8n.
2. Open the workflow and verify all nodes are correctly connected.
3. Start the test listener and copy the test URL displayed in the webhook node.
4. Send a POST request to the test URL using a tool like curl or Postman (Content-Type: application/json, see example below).
5. Check the result. Only after a successful test, publish/activate the workflow and use the production URL from the webhook node.
6. Before production use, set up webhook authentication in n8n to prevent unauthorized access.
Usage
Input format:
```json
{
"before": [
{"method": "GET", "path": "/users", "requiredFields": ["id"]},
{"method": "POST", "path": "/users", "requiredFields": ["name"]}
],
"after": [
{"method": "GET", "path": "/users", "requiredFields": ["id"]},
{"method": "POST", "path": "/users", "requiredFields": ["name", "email"]}
]
}
```
Expected output:
```json
{
"status": "breaking_changes",
"removed": [],
"added": [],
"newRequiredFields": [
{"endpoint": "POST /users", "fields": ["email"]}
]
}
```
HTTP status: 200
Error case (e.g., missing arrays):
```json
{
"before": null,
"after": []
}
```
Response:
```json
{
"status": "error",
"message": "before und after müssen Arrays sein."
}
```
HTTP status: 200
Notes:
- Only endpoint paths, methods, and new required fields are compared. Changes to optional fields or data types are not detected.
- Webhook authentication must be configured separately in n8n.
- Execution stores user data in n8n. Retention and access should be configured accordingly.
- Comparison rules can be adjusted in the code node.
Required connections and APIs
API connections
No saved API credentials were detected in the workflow JSON. Still check webhooks, target systems, credentials, and data protection before activation.
Nodes
WebhookCodeRespond to Webhook
Isolated functional test passed
Optional isolated functional test
The isolated data flow was tested without external services or credentials.
✓ Standard case with complete dataChecks the complete standard flow with valid sample data.Isolated functional test passed✓ Variation or boundary caseChecks a valid variation or an important boundary case.Isolated functional test passed✓ Additional processing ruleChecks this workflow's additional business processing rule.Isolated functional test passed✓ Invalid or incomplete inputChecks that invalid or incomplete data is rejected safely.Isolated functional test passed✓ Empty inputChecks that an empty request receives a controlled response.Isolated functional test passed