Try the API
Every operation under Specifications has a built-in Try it panel on the right side of the page. Clicking the button sends a real HTTP request from your browser to whichever gateway you have configured, renders the response inline with syntax highlighting, and copies the generated curl command to your clipboard so you can paste it into a terminal or a scratch file.
The panel covers the same workflow as a classic Swagger UI page, with two differences: the request, response, and schema renderers are native Docusaurus components (they match the rest of the site theme, including dark mode), and the target server is editable per-request without leaving the page.
Configure the target
The Data Plane spec declares a single servers[] entry with protocol, host, and port variables. The defaults are:
| Variable | Default |
|---|---|
protocol | http |
host | localhost |
port | 8080 |
So every operation page opens with http://localhost:8080 as the default target — which matches the Quickstart Docker Compose setup. To point the panel at a different gateway, scroll to the Base URL card on the right side of any operation page and edit the three fields directly:
- Change
hostto the hostname or IP of your staging or production gateway (for examplegateway.acme.example.comor10.0.3.4). - Change
protocoltohttpswhen the gateway is behind a TLS terminator, or leave ithttpfor a local run. - Change
portto the port your deployment uses. Kubernetes gateways typically sit behind an ingress on443; Docker Compose sticks with8080.
Changes are per-tab and persist across operation navigation — switch from Chat completion to Create embeddings and your edited server values come along. Reload the page to reset to the defaults.
Paste an API key
Below the server card there is an Authentication section with a single apiKey (http, Bearer) field. Paste the plaintext gw_... value from your secret store into the field — it stays in browser memory only, is never written to disk, and is wiped on reload. See Authentication if you don't have a key yet.
The panel applies the key to the Authorization header of every request it sends from that tab. Requests to /actuator/health ignore the header, so you can verify connectivity without pasting a key first.
Send a request
- Fill in any required path, query, or header parameters in the Request card.
- Pick an example from the dropdown above the request body — the OpenAPI spec ships three presets for
Chat completion(simple,streaming, andstructured), and you can edit the body inline before sending. - Click
Send API Request(top-right of the panel). - The Response card updates with the status code, headers, body, and latency. Click Copy as cURL to send yourself the generated command.
A successful chat completion round-trips in 200–1500 ms on a local gateway with a real provider key. A failed call surfaces the DVARA error envelope — same shape documented in the Overview — so you can read the error.code right out of the response card.
Limitations
The Try it panel makes the request from your browser, so it's subject to the same rules as a cross-origin fetch():
- CORS must allow the docs origin. The Try-it panel sends a browser
fetch()from the docs origin to your gateway, so the gateway (or whatever reverse proxy fronts it) has to return CORS headers permitting that origin. If the browser rejects the call with a CORS error, open a terminal and run the generatedcurlcommand instead —curlis not subject to the browser's same-origin policy. - Streaming responses cannot render in the panel. When you send
stream: true, the panel shows the final raw SSE body after the stream completes; it does not render tokens as they arrive. Use a terminal or an SDK to exercise real streaming behavior. - Self-signed certificates will fail. The browser enforces TLS validation the same way it does for any fetch. If your staging gateway uses a self-signed cert, point at it with the host variable, copy the
curl, and add-kto skip verification in the terminal. - No file uploads. The data plane currently accepts JSON only; there is no
multipart/form-dataendpoint, so the panel does not render a file picker.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
net::ERR_CONNECTION_REFUSED | Gateway is not running at the configured host+port | Check docker ps or ./mvnw spring-boot:run, verify GET /actuator/health first |
401 UNAUTHORIZED | API key missing, wrong prefix, or revoked | Paste a fresh gw_... value in the Authentication field; see Authentication |
403 POLICY_DENIED | A tenant policy blocked the call (PII, guardrail, IP access, or content filter) | Check the DVARA Flightdeck's Policies and Audit pages to see which rule fired |
| CORS preflight error in the browser console | The gateway's CORS config does not allow the docs origin | Copy the curl command and run it from a terminal, or add the docs origin to the gateway's CORS allow-list |
| Response hangs with no output | Either the gateway is slow or your browser is blocking the response for inspection; check the network panel | Retry with the generated curl to rule out the browser |