Broken API

FREEMIUM
By WahrCode | Updated a month ago | Tools
Health Check

N/A

README

Broken API - RapidAPI Integration Testing

Welcome to the Broken API on RapidAPI! This API is designed to help you thoroughly test your integrations against various error scenarios that you might encounter in the real world. It mimics a broken production RESTful API, simulating common issues such as timeouts, incorrect status codes, missing or bad response bodies, and erroneous headers.

Table of Contents

Overview

The Broken API is a valuable tool for developers and QA testers looking to ensure their applications can gracefully handle unexpected issues that can occur with external APIs. By using this API, you can validate how your system responds to different error scenarios, thereby improving the reliability and resilience of your software.

How to Use

To use the Broken API, you need to create an account on RapidAPI (if you haven’t already) and subscribe to this API. Once subscribed, you will receive an API key that you can use to make requests to the API.

API Endpoints

Test Against Random Broken Events

You can test against a random broken event by using the following endpoints:

  • GET /broken
  • POST /broken
  • PUT /broken
  • PATCH /broken

These endpoints simulate random broken events, such as timeouts, incorrect status codes, missing or bad response bodies, and erroneous headers. The API will choose a random broken event for you.

Test Against a Specific Broken Event

You can test against a specific broken event by providing the type of error you want to simulate in the what_should_break path parameter. Use the following endpoints:

  • GET /broken/{what_should_break}
  • POST /broken/{what_should_break}
  • PUT /broken/{what_should_break}
  • PATCH /broken/{what_should_break}

Valid values for the what_should_break parameter are: timeout, status-code, body-missing, and body-wrong.

Request a Specific Status Code

You can request a specific status code to be returned using the following endpoints:

  • GET /status-code/{code}
  • POST /status-code/{code}
  • PUT /status-code/{code}
  • PATCH /status-code/{code}

Provide the desired status code in the code path parameter, within the range of 100 to 599.

Request a Specific Time to Wait

You can request a specific time to be waited before responding using the following endpoints:

  • GET /timeout/{time}
  • POST /timeout/{time}
  • PUT /timeout/{time}
  • PATCH /timeout/{time}

Specify the time to wait in milliseconds using the time path parameter, ranging from 1 to 30,000 milliseconds.

Response Codes

The Broken API returns various HTTP status codes to simulate different error conditions, including:

  • 200 OK: A successful response.
  • 503 Service Unavailable: Simulates a status code error.
  • 408 Request Timeout: Represents a request timeout.
  • 459 Unknown Status Code: Mimics an unknown status code.
  • Default responses represent various other error scenarios.

Examples

Here are some examples of how you can use the Broken API:

Test Against a Random Broken Event

GET https://broken-api.rapidapi.com/broken

Test Against a Specific Broken Event (e.g., Request Timeout)

GET https://broken-api.rapidapi.com/broken/timeout

Request a Specific Status Code (e.g., 202 Accepted)

GET https://broken-api.rapidapi.com/status-code/202

Request a Specific Time to Wait (e.g., 40 milliseconds)

GET https://broken-api.rapidapi.com/timeout/40

Support

If you have any questions, encounter issues, or need assistance with the Broken API, please reach out to our support team through the RapidAPI platform.

Happy testing!

Followers: 1
API Creator:
Rapid account: Wahr Code
WahrCode
wahrcoder
Log In to Rate API
Rating: 5 - Votes: 1