Integrating headless frontends or third-party webhooks often stalls when developers guess undocumented query parameters, switch between terminal cURL windows, and inspect stale Postman collections. Every schema mismatch wastes debugging cycles across backend and frontend teams.
The PolyCMS API Explorer Plugin embeds an interactive REST API sandbox directly inside Perfex CRM so developers browse live endpoints, execute authenticated requests, and verify real JSON responses in seconds.
Building a decoupled frontend with PolyCMS? Pair the sandbox with our PolyStore variant URLs, sitemaps, and schema guide for full storefront integration.
| Sandbox Feature | Developer Action | Debugging Outcome |
|---|---|---|
| Endpoint Catalog | Auto-discovers active PolyCMS routes | Eliminates stale docs across module upgrades |
| Token Tester | Injects scoped Bearer auth headers | Confirms token permissions and HTTP 401/403 behavior |
| Schema Inspector | Displays required & optional fields | Prevents payload validation errors before coding |
| Live Runner | Executes GET/POST/PUT calls in-app | Shows exact status codes, headers, and response latency |
| Code Generator | Exports cURL and JavaScript fetch | Accelerates Next.js, Vue, and mobile client integration |
Step 1: Authenticate Your Session and Inspect Route Schemas
Activating the API Explorer Plugin adds an interactive console inside your PolyCMS admin tools without exposing unauthenticated Swagger endpoints to the public internet. Developers inspect active routes generated directly from installed PolyCMS and PolyStore modules so parameter lists always match the deployed version.
- Navigate to PolyCMS > Tools > API Explorer inside Perfex CRM and select an environment token from your API Access profile.
- Filter the left endpoint tree by resource group such as Pages, Posts, Media Database, Menus, or PolyStore Products.
- Expand any route to inspect required path parameters, pagination query strings, and expected JSON body schemas.
- Verify how visual layouts authored with MTBuilder visual page builder serialize into structured API fields.
Step 2: Execute Live Sandbox Calls and Export Client Snippets
Once a route schema is clear, test edge cases directly in the runner using read-only tokens before touching production write endpoints. You can also inspect how data from custom MTBuilder blocks and templates surfaces in headless responses.
- Test pagination limits, category slug filters, and missing-slug 404 responses directly in the parameter builder.
- Inspect response headers including Content-Type, Cache-Control, ETag, and rate-limit counters.
- Copy generated cURL or fetch snippets straight into your React, Next.js, or CI smoke-test scripts.
- Restrict API Explorer access to developer or Super Admin roles inside Perfex CRM staff permissions.
Common Pitfalls & Quick Fixes
- Sandbox Requests Return 401 Unauthorized: Verify your server preserves the Authorization Bearer header in .htaccess and confirm the selected API token is active and unexpired.
- Write Test Modifies Live Published Content: Switch the sandbox token to a read-only scope during exploration, or test POST and PUT mutations only on staging installs.
- New Custom Route Missing from Explorer Tree: Clear the PolyCMS route and schema cache so newly registered module or PolyStore endpoints reload automatically.
Frequently Asked Questions
Is the PolyCMS API Explorer Plugin exposed to public site visitors?
No. The API Explorer interface runs strictly inside the authenticated Perfex CRM admin area and respects granular staff role permissions. Public website visitors cannot access the interactive console, view internal route catalogs, or execute test payloads unless granted explicit administrator access.
Does the sandbox execute real database reads and writes?
Yes. Requests executed inside the API Explorer hit your live PolyCMS REST API endpoints rather than returning static mock data. That makes debugging headers, permissions, and JSON structure exact, though teams should use read-only tokens or staging environments for write tests.
Can I test PolyStore e-commerce and Media Database endpoints inside the sandbox?
Yes. The API Explorer dynamically lists active endpoints across PolyCMS core pages, blog posts, taxonomies, the Media Database, and installed extensions such as PolyStore. You can inspect product variant URLs, stock statuses, and optimized WebP media metadata from one unified admin console.
Does enabling the API Explorer Plugin slow down public frontend pages?
No. Explorer scripts, schema parsers, and UI styles load exclusively on the admin API Explorer screen. Public landing pages, blog routes, and automated REST API calls from external apps carry zero extra JavaScript or database overhead when the plugin is active.

Leave a Reply