API Test Page

Use this page to test API endpoints and diagnose issues

Export API Test

Test the export API endpoint to ensure it's working correctly. This tool will help diagnose any issues with the API.

Test Configuration

Test Results

Error checking collections: HTTP error! status: 404
Collection check failed

Network Information

Request Details

No request made yet

Response Headers

No response received yet

Troubleshooting Tips

  • 404 Not Found: Check if the API endpoint path is correct. Make sure the API route exists at /api/export.
  • 500 Internal Server Error: There might be an error in the API implementation. Check server logs for details. Common causes include:
    • Invalid collection names (use the dropdown to select valid collections)
    • Issues with data structure in collections
    • Server-side processing errors
  • 400 Bad Request: The API request was invalid. Ensure:
    • The request body is properly formatted JSON
    • All required fields are included (collections, format, etc.)
    • Collection names are valid
  • Empty Results: If you receive empty data:
    • The collection might be empty or not exist
    • Date filters might be excluding all data
    • Try a different collection from the dropdown
  • JSON Parse Error: The API might be returning HTML instead of JSON. This often happens with server errors.
  • Network Error: Check your internet connection and ensure the server is running.
  • Empty Collections: If collections are showing as empty:
    • Check if content files exist in src/content/[collection-name]/ directory
    • Ensure content files follow the correct schema defined in src/content/config.ts
    • Add new content files to populate empty collections
    • Restart the development server after adding new content files

Collection Status

This section shows the status of each collection. Click "Check Collections" to verify which collections are available and contain data. Click on any collection indicator to quickly test it.

services
resources
events
photos
profiles
talents
jobs
docs
community-voices
news
pages
Available
Empty
Error

API Status Check

You can perform a simple API status check by sending a GET request to /api/export. This will return basic information about the API, including available collections.

0 views