Delete a rule
DELETE/v2/endpoints/:endpoint/rules/:ruleId
Permanently deletes a specific mock rule by its unique identifier. This operation cannot be undone.
Purpose:
- Clean up unused mock configurations
- Programmatically manage rule lifecycle
How It Works:
- Rule Removal: The rule is removed from the endpoint's rule array
- Order Adjustment: Remaining rules maintain their relative order
- Priority Shift: Rules below the deleted rule move up in priority
- Real-time Updates: Connected dashboard clients are notified.
Limitations:
- Operation is irreversible.
- Deleted rules cannot be recovered unless backed up externally
- Does not affect other endpoint settings or rules
Best Practices:
- Backup the rule before deletion (use GET /rules/{ruleId})
- Consider disabling the rule first to test impact before permanent deletion
- Verify the rule ID before executing this operation
- Review remaining rules to ensure correct execution order after deletion
Use Cases:
- Remove temporary test rules after testing
- Clean up rules after API contract changes
- Delete duplicate or conflicting rules
- Programmatic rule lifecycle management in CI/CD pipelines
Response: Returns the deleted rule ID and a success flag.
Request
Responses
- 200
- 401
- 404
Rule deleted
Unauthenticated - API key is missing or invalid.
Not Found - The requested resource does not exist.