TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Fail at random with 503 to test retries

GETPOSThttps://api.testingapis.com/api/chaos/flakySign in to see this endpoint's URL

Failures include Retry-After: 1. Available for GET and POST.

Parameters 1

NameTypeDescription
failRatequery · number (double)Probability of failure, 0 to 1 (default 0.5). Default: 0.5.

Responses

200
The request got through.
400
failRate is outside 0-1.
503
Simulated random failure.

Example

Request
curl -X GET "https://api.testingapis.com/api/chaos/flaky?failRate=0" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{"message": "Success — the request got through this time.", "failRate": 0}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.