Documentation
Learn how to use API Test Hub to test and debug your APIs efficiently.
Getting Started
API Test Hub is a browser-based tool designed to simplify API testing. To begin, navigate to the main interface and enter your API endpoint URL in the provided input field.
- Enter a valid URL (e.g.,
https://api.example.com/endpoint
). - Select an HTTP method (GET, POST, PUT, etc.) from the dropdown.
- Configure query parameters, headers, or a JSON body as needed.
- Click "Send Request" to execute the API call.
Sending Requests
API Test Hub supports multiple HTTP methods and allows you to customize your requests extensively.
Query Parameters
Add key-value pairs for query parameters under the "Query Parameters" tab. These will be appended to the URL automatically.
Headers
Add custom headers (e.g., Authorization, Content-Type) in the "Headers" tab. Use the "+" button to add more headers.
Request Body
For POST, PUT, or PATCH requests, enter a JSON body in the "Body" tab. Syntax highlighting helps ensure valid JSON format.
Environment Variables
Use environment variables to manage dynamic values like API keys or base URLs. Define them in the "Environment Variables" section and reference them in the URL using {{key}}
syntax.
Example: Set baseUrl
to https://api.example.com
, then use https://{{baseUrl}}/endpoint
in the URL field.
Request History
Every request is saved locally in your browser. Access past requests via the "Show History" button, load them to reuse, or export them as a JSON file for sharing.
- Click a history item to load its details into the form.
- Use "Export History" to save requests as a JSON file.
- Use "Import History" to load a previously exported JSON file.
Troubleshooting
If you encounter issues, check the following:
- Ensure the URL is valid and accessible.
- Verify JSON body syntax in the "Body" tab.
- Check if headers like
Content-Type: application/json
are set correctly. - Adjust the timeout (default: 30s) for slow APIs.
For further assistance, visit our GitHub repository to report issues or contribute.