The API Playground is a public-facing standalone page rendered without the WordPress theme wrapper. It provides a browser-based interface for sending live API requests against your site’s DMSI Advanced API.
URLs:
| Access point | URL |
|---|---|
| Public URL | yoursite.com/api/playground/ |
| Admin shortcut | DDLS > Developer > Playground (embeds the public page in an iframe with an “Open in new tab” link) |
Important: After activating DMSI Advanced API, you must flush WordPress permalinks before the
/api/playground/URL will resolve. Go to Settings > Permalinks and click Save Changes without changing any settings. This registers the custom rewrite rules the playground requires.
Playground features:
- Endpoint selector — dropdown menu populated from the live OpenAPI spec at
/wp-json/dmsi-api/v1/docs/openapi.json - Auto-generated form fields — path parameters, query parameters, and request body fields are generated automatically from the endpoint schema
- Authentication configuration — enter an API key once per session; the key is stored in
sessionStorageand is not persisted across browser sessions - Send Request button — executes the request and displays the formatted JSON response, HTTP status code, and response headers
- Request history — the last 10 requests for the session are stored in
localStorageand can be replayed - Saved requests — mark any request as a favourite to persist it in
localStoragefor future sessions - Copy cURL — generates and copies the equivalent cURL command for the current request
- Export as code — generates ready-to-paste code snippets in PHP, JavaScript, and Python
Access control:
The public playground page at yoursite.com/api/playground/ is accessible without WordPress authentication. Any API requests made through the playground use the API key entered in the authentication field — the playground itself does not confer any API access.
