Send Requests
Learn how to use Quetzly's powerful API testing features to send requests to various geospatial services and APIs. This guide covers everything from basic requests to advanced testing scenarios.
Getting to the API Section
- Launch Quetzly
- Click the
API icon in the left sidebar
- You'll see the main request interface with two panels:
- Left Panel: Request configuration
- Right Panel: Map viewer and responses
Request Builder Interface
Basic Request Setup
The top section contains the core request configuration:
1. HTTP Method Selection
Choose from standard HTTP methods:
- GET: Retrieve data (most common for geospatial services)
- POST: Send data to create resources
- PUT: Update existing resources
- PATCH: Partial updates
- DELETE: Remove resources
2. Service Type Selection
Select the type of service you're testing:
- JSON: Standard REST APIs - Geojson or Json
- WMS: Web Map Service
- WFS: Web Feature Service
- Esri Map Service: ArcGIS Map Services
- Esri Feature Service: ArcGIS Feature Services
3. URL Input
Enter the endpoint URL you want to test. Examples:
# WMS GetCapabilities
https://example.com/geoserver/wms
# WFS GetFeature
https://example.com/geoserver/wfs
# ArcGIS Map Service
https://services.arcgis.com/example/arcgis/rest/services/layer/MapServer
# REST API
https://api.example.com/v1/data?f=json
4. Send Button
Click Send to execute the request and view the response.
Advanced Request Configuration
Query Parameters
Add custom query parameters to your requests:
- Click the "Query Params" tab (active by default)
- Enter parameter key-value pairs:
- Key: Parameter name (e.g.,
service,version,format) - Value: Parameter value (e.g.,
WMS,1.3.0,image/png)
- Key: Parameter name (e.g.,
- Click "Add" to create additional parameter pairs
- Click "Remove" to delete unwanted parameters
Note: At the moment the query parameters can only be used for a json type request. Support for WMS/WFS and other is still in developement. The other types use a simple GET request and can be visualized.
Example Parameters
JSON Request with Parameters to ArcGIS Service:
f: Response format (json, pjson, etc.)where: SQL where clauseoutFields: Fields to returngeometry: Spatial filter geometryspatialRel: Spatial relationshipreturnGeometry: Include geometry (true/false)
GEOJSON Request with Parameters:
# Geojson Request
https://earthquake.usgs.gov/fdsnws/event/1/query
format: geojsonstarttime: 2024-01-01endtime: 2024-01-02minmagnitude: 5
Headers
Add custom HTTP headers for authentication or content type specification:
- Click the "Headers" tab
- Add header key-value pairs:
- Authorization:
Bearer your-token-here - Content-Type:
application/json - Accept:
application/json - User-Agent:
Quetzly/1.0
- Authorization:
- Click "Add" for additional headers
- Click "Remove" to delete headers
Request Body
For POST, PUT, and PATCH requests, configure the request body:
- Click the "Body" tab
- Edit the JSON in the code editor
- Use the built-in syntax highlighting and validation
- Format your JSON properly for the target API
Example POST body for creating a feature:
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-122.4194, 37.7749]
},
"properties": {},
"id": 0
}
Response Analysis
After sending a request, the response section becomes visible with detailed information:
Response Status Bar
- Status: HTTP status code (200, 404, 500, etc.)
- Time: Request duration in milliseconds
- Size: Response size in bytes/KB/MB
Response Tabs
Body Tab
View the raw response content:
- JSON responses: Formatted with syntax highlighting
Headers Tab
Inspect response headers:
- Content-Type: Response format
- Content-Length: Response size
- Cache-Control: Caching directives
- Server: Server information
- Custom headers: Service-specific headers
Layers Tab
For geospatial services, this tab shows:
- Available layers: Detected from service metadata
- Layer properties: Name, title, description
- Add to map: Checkboxes to add layers to the map viewer
- Layer styling: Basic styling
Working with Geospatial Services
WMS (Web Map Service)
WMS Request:
- Set service type to "WMS"
- Ensure the url ends with /wms or includes ?SERVICE=WMS
- Send request to view available layers
- The GetCapabilities is called to identify layers
- Layers are listed fo you to select which ones should be added to the Map
- Select the layers and click add to map.
WFS (Web Feature Service)
WFS Request:
- Set service type to "WFS"
- Ensure the url ends with /wfs
- All Layers will be added to the map and layer list
ArcGIS Services
- For Map services, add the ArcGIS service url all the way up to the /MapServer
https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/State_County/MapServer
- For Feature services, add the ArcGIS service url all the way up to the /FeatureServer
https://organization.example.com/<context>/rest/services/USA/FeatureServer
- The Map and/or layers will be added to the map and layer list
JSON Requests
You can make custom Map and feature service queries by using the JSON request type.
Map Service Query:
- Set service type to "JSON"
- Add query endpoint:
/query - Add parameters:
f: jsonwhere: 1=1 (or specific filter)outFields: * (or specific fields)returnGeometry: true
Feature Service Operations:
- Set service type to "JSON"
- Use endpoints like
/query,/addFeatures,/updateFeatures - Configure appropriate parameters for the operation
For additional information refer to esri documentation for map services and feature services.
Map Visualization
When your request returns spatial data:
- Check the Layers tab in the response
- Select layers to add to the map
- View the data in the right panel map viewer
- Interact with features:
- Click features for attribute popup
- Pan and zoom to explore
- Use map controls for navigation
Map Controls
- Zoom in/out: Mouse wheel or +/- buttons
- Pan: Click and drag
- Feature info: Click on map features
Testing Workflows
Basic API Testing
- Enter endpoint URL
- Configure parameters
- Send request
- Analyze response
- Verify expected data
Authentication Testing
- Add authorization headers
- Test with valid credentials
- Test with invalid credentials
- Verify proper error handling
Performance Testing
- Monitor response times
- Test with different parameter values
- Test with varying data loads
- Note any performance patterns
Error Handling
- Test with invalid parameters
- Test with malformed requests
- Verify error messages are helpful
- Document error scenarios
Best Practices
Request Organization
- Use descriptive URLs: Make it clear what you're testing
- Group related tests: Keep similar requests together
- Document your tests: Add comments about expected behavior
Parameter Management
- Start simple: Begin with basic required parameters
- Add complexity gradually: Test one new parameter at a time
- Validate responses: Ensure responses match expectations
Troubleshooting
- Check network connectivity: Ensure endpoint is reachable
- Verify parameters: Double-check spelling and values
- Review documentation: Consult service documentation
- Test in browser: Try simple GET requests in a web browser
Common Issues and Solutions
Request timeout:
- Check network connection
- Verify endpoint URL is correct
- Try reducing request complexity
Authentication errors:
- Verify credentials are correct
- Check header format
- Confirm authentication method
Invalid response format:
- Check Accept headers
- Verify service supports requested format
- Review service documentation
Spatial data not displaying:
- Verify coordinate reference system
- The Viewer will automatically visualize data as web mercator. It's best to set your spatial reference output parameter to 4326 or 3857 in your request.
- Check data extent and bounds
- Ensure geometry is valid
What's Next?
Now that you know how to send requests:
- Learn about Request History to track your testing
- Explore Sets to organize and save your requests
- Set up Monitoring for continuous endpoint testing
Ready to organize your API tests? Continue to History to learn about request tracking and management.