API Explorer
Browse every route Studio finds in src/, build requests with params, headers, Bearer auth and JSON bodies, and send them through the Studio proxy.
On this page11
The Endpoints view (#/endpoints, shortcut g e) lists every HTTP route Studio found in your source and turns each one into a request builder. Requests go through Studio's own proxy, so there is no CORS setup and you see every response header.
Route discovery
Studio scans the .ts and .js files in src/ for calls on app, router or this with a literal path:
app.get('/health', health)
router.post('/users', authenticate(jwt), validate({ body: userSchema }), createUser)
router.delete('/users/:id', authenticate(jwt), requireRole('admin'), removeUser)For each call it records:
| Field | Taken from |
|---|---|
| Method | get, post, put, patch, delete, head or options |
| Path | The first argument (must start with /) |
| Handler | The last argument: a function or method reference such as createUser or users.list, otherwise anonymous |
| Middleware | The arguments in between, by name (authenticate(jwt) becomes authenticate; inline functions become inline) |
Duplicate method + path pairs are listed once. Press Refresh data after adding routes.
Endpoint list
The left pane shows all routes, grouped by their first path segment (/users, /products, ...):
- Search: filters by method, path, handler name and middleware names.
- Method chips:
ALLplus one chip per method present (GET, POST, PUT, PATCH, DELETE), each with a count. - Groups: click a group header to collapse or expand it. Collapsed groups open again while you search.
- Lock icon: shown on routes with a middleware whose name contains "auth" (for example
authenticate).
Selecting a route opens its request builder; the URL becomes #/endpoints/METHOD/ followed by the URL-encoded path. On narrow screens the list and the builder are shown one at a time, with an All endpoints back button.
Request builder
The header shows the method and path, the handler name and the middleware tags (auth middleware is highlighted). Two buttons sit on the right:
- Copy as cURL: a
curlcommand with the resolved URL, headers (including the Bearer token andContent-Type: application/jsonwhen there is a body) and--data-rawbody. - Copy URL: the full resolved URL.
Below it, the URL bar shows the resolved URL as you edit it (app URL, path with parameter values filled in, query string) next to the Send button.
Params
- Path parameters: one required field per
:param. Parameters whose name ends inidstart with1. Sending with an empty path parameter shows a warning and focuses the field. - Query parameters: name/value rows. A new empty row appears as you type; each row has an enable checkbox and a remove button.
Headers
Name/value rows with the same enable checkbox. Content-Type: application/json is added automatically when a body is sent, and the Auth tab adds Authorization.
Auth
A Bearer token field (masked, with a show/hide toggle and Clear). The token is saved in this browser's localStorage and sent as Authorization: Bearer ... on every request from every endpoint, unless you set your own Authorization header. If the route uses auth middleware, the tab names it.
Body
Available for POST, PUT, PATCH and DELETE. POST, PUT and PATCH start with a sample JSON body guessed from the path (login, register, users, products, orders, posts, otherwise a generic object).
- Live validation: Valid JSON, Empty body, or the parse error.
- Format pretty-prints the JSON, Sample restores the sample, Clear empties it.
GET and HEAD requests never send a body.
History
The last 10 requests to this endpoint, with status (or ERR), resolved path, duration and time. Click an entry to restore its parameters, headers and body. Clear history removes the list. History is stored in the browser.
Sending a request
Press Send or Ctrl Enter / Cmd Enter. Studio posts the request to POST /api/studio/proxy, which forwards it to your app and returns the full response:
- Only your app: the proxy always targets
http://localhost:plus your app port. The path must start with/; full URLs are rejected. - No CORS: the browser only talks to Studio, so your app needs no CORS headers for testing.
- Full response headers come back, not just the CORS-safelisted ones a browser would expose to a cross-origin script.
- Redirects are not followed: you see the
3xxresponse itself. - Requests time out after 30 seconds. Bodies over 5 MB are truncated (the response says so).
- Hop-by-hop headers (
Host,Connection,Content-Length, ...) are not forwarded.
Note
The proxy endpoint only accepts Content-Type: application/json bodies. That forces a CORS preflight, which only local origins pass, so other websites can't use Studio to call your app.
Response
The response card shows the status (colored by class), time, size and content type, with three tabs:
| Tab | Shows |
|---|---|
| Body | Pretty-printed, highlighted JSON, or the raw text for other content |
| Headers | All response headers, sorted by name, with a count |
| Raw | The status line, headers and body as plain text |
Copy body copies the (pretty-printed) body.
When the app is down
If the proxy cannot connect, the card shows Can't reach your app with the error (for example Could not reach the app at http://localhost:3000 (ECONNREFUSED). Is it running?), a reminder to start it with axil run, and a Retry button. The sidebar status switches to App not running. Other failures (bad input to the proxy) show Request could not be proxied.
Was this page helpful?