Replay is Redocly's built-in Try-It console, allowing users to interact with Insert’s API directly from their web browser. With Replay, you can test API requests and see real-time responses, all without writing a single line of code.
With Replay, you can:
- Send API requests to Insert from your browser and receive immediate feedback.
- Test different endpoints and parameters to see how they affect your products.
- Experiment with scenarios before implementing them in your code.
- Learn how Insert’s API works by interacting with it in a user-friendly environment.
Replay is integrated directly into Redocly’s documentation platform. To access Replay:
- Navigate to the API endpoint you want to test in the Redocly documentation.
- Click on the "Try It" button next to the endpoint description.
- The Replay console will open, pre-filled with the selected endpoint and parameters.
Before sending requests, you need to authenticate with your Insert account. Replay will prompt you to log in if you haven’t already authenticated.
Replay allows you to send GET, POST, PUT, DELETE, and other types of requests to Insert’s API. Here’s an example of how to list all products:
- Select the
GET /productsendpoint from the documentation. - Click the "Try It" button to open Replay.
- Click "Send Request."
Replay will display the response in the console, showing you the list of products returned by the API.
You can modify request parameters directly in Replay to test different scenarios. For example, you can change the product_id to see how the response changes:
- Select an endpoint with parameters, such as
POST /products/{product_id}. - Enter a different
product_idin the input field. - Click "Send Request" to see the response.
Replay displays the full response from the API, including the status code, headers, and body. This allows you to see exactly how Insert’s API behaves with different inputs.
Replay allows you to save your API requests and share them with others. This is useful for collaborative debugging or demonstrating how specific endpoints work.
Replay provides detailed error messages when requests fail, helping you debug issues quickly. You can see exactly what went wrong, whether it’s a missing parameter, authentication error, or something else.
- Start with Small Requests: Begin by testing simple requests to understand how the API works before moving on to more complex scenarios.
- Use Replay for Learning: Replay is a great tool for learning the Insert API, as it allows you to see how different endpoints and parameters interact.
- Save Frequently Used Requests: Save requests that you use often to speed up your workflow and avoid repetitive typing.