A REST API response is the data returned by the API after an application makes an HTTP request. It typically includes an HTTP status code indicating the result of the request, a response body that contains the requested data, and headers that provide metadata. The response may also include cookies set by the server.

Hoppscotch uplifts this experience by providing an intuitive interface for analyzing responses, making it easier for you to visualize and interact with API data effectively.

Response Body

Depending on the content type of the response, Hoppscotch automatically presents the data in the appropriate format:

  • JSON: Formats the response in a structured JSON format for easy readability.
  • HTML: Renders the response as HTML for visual representation and structure content as a web page.
  • XML: Shows the response in XML format for compatibility with XML-based APIs.
  • Image: Displays image responses directly in the interface.
{
  "name": "Hoppscotch",
  "type": "Open-source API Development Ecosystem",
  "description": "A powerful platform for developing and testing APIs with an intuitive interface.",
  "url": "https://hoppscotch.io"
}

Raw Response

The Raw response tab in Hoppscotch presents the unprocessed response body, allowing you to view the exact data returned by the API without any formatting which can be particularly used for debugging or when you need to inspect the original response directly.

Response Headers

Response Headers give you important information about the API response that goes beyond just the data itself. They include information such as the content type, which indicates the format of the response (e.g., application/json or text/html), caching directives that control how the response can be stored and reused, security settings like CORS (Cross-Origin Resource Sharing) that help manage access, and various server-related information, like the server type and version.

Test Results

The Test Results section displays the outcomes of any assertions made on the API response, allowing you to verify key aspects such as status codes, response times, and the presence of expected data.

Save a response as an Example

In Hoppscotch, an example connects a specific request with its response, providing a complete view of how an API behaves. Each example includes the essential request details alongside the response information. You can create multiple examples for a single request, which is valuable for illustrating how the same endpoint might respond differently under various conditions.

To save a response as an example in Hoppscotch, follow these steps:

  • Navigate to the right-sidebar and select the collection with your request.
  • Choose the request and hit “Send.”
  • In the response section, click the “Save as Example” icon.
  • The example will be stored in request’s history in the collection for easy retrieval and reference later.
  • Click on the example and select “Try” to open it as a request in a new tab.

You can easily Edit the response details using the

menu icon, Save any changes made to the examples, and Duplicate them to generate various iterations.

Hoppscotch also supports importing collections with examples attached to each request from various platforms, including Postman, Insomnia, OpenAPI, and Hoppscotch.

Filter Response Body

To extract specific data points from the response body, you can apply filter using JSONPath syntax.

Download Response

You can download the response in various formats (JSON, XML, etc.) for offline analysis or record-keeping. Click the “Download” button and choose the format you wish to save.

Copy Response

To copy the entire response to the clipboard, simply click the “Copy” button.

Generate Data Schema

Using the “More” menu, you can generate a structured representation of the response data tailored to specific programming languages. You can download the file or copy the response in languages like TypeScript, C#, Go, and others, making it simpler for you to incorporate API responses into your applications.