Skip to main content

Delete request history

DELETE 

/v2/endpoints/:endpoint/requests

Deletes request history entries with optional filtering. Supports the same filtering parameters as GET, enabling selective bulk deletion of requests matching specific criteria.

Purpose

Use this endpoint to:

  • Bulk delete old or irrelevant request logs
  • Remove requests matching specific criteria (method, status, path, etc.)
  • Clean up test data after automated test runs

How It Works

  1. Build Query: Apply the same filters available in GET to target specific requests
  2. Execute Delete: All matching requests are permanently deleted
  3. Return Count: Response includes the number of deleted requests

Filtering Options

All GET filters are supported for selective deletion:

Time-Based:

  • dateFrom / dateTo: Delete requests within a date range
  • dateRange: Delete requests from a relative time period

Request Attributes:

  • method: Delete requests with specific HTTP method
  • path: Delete requests matching path pattern
  • status: Delete requests with specific status code
  • behavior: Delete requests handled by specific behavior type
  • ruleMatched: Delete requests that matched (or didn't match) rules

Content Search:

  • requestBody: Delete requests containing specific text in body
  • responseBody: Delete requests with specific response content

Delete All Requests

To delete ALL requests for an endpoint, call this endpoint without any query parameters.

Warning: This permanently removes all request history and cannot be undone.

Common Deletion Patterns

Delete requests older than 7 days:

DELETE /requests?dateTo=2024-01-08T00:00:00Z

Delete all failed requests (5xx errors):

DELETE /requests?status=500

Delete requests from last hour:

DELETE /requests?dateRange=1h

Delete requests to a specific path:

DELETE /requests?path=/api/test

Limitations

  • Operation is irreversible; deleted requests cannot be recovered
  • Associated multipart files are also deleted
  • Does not affect endpoint configuration, rules, or state

Use Cases

  • Post-Test Cleanup: Remove all requests after a test run completes
  • Retention Policy: Automatically delete requests older than N days
  • Privacy Compliance: Remove requests containing specific patterns

Request

Responses

Requests deleted successfully